-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: reorganize specs and adapter extensions #10359
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## canary #10359 +/- ##
=======================================
Coverage 54.41% 54.42%
=======================================
Files 2335 2332 -3
Lines 107921 107901 -20
Branches 17817 17815 -2
=======================================
- Hits 58728 58727 -1
+ Misses 47857 47848 -9
+ Partials 1336 1326 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally SpecProvider.$
might be aesthetically better :)
Merge activity
|
### TL;DR Refactored `SpecProvider` singleton access pattern and reorganized adapter/extension code structure. ### What changed? - Changed `SpecProvider.getInstance()` to `SpecProvider._` for cleaner singleton access - Moved adapter/extension code from `_common` directory to dedicated `adapters` and `extensions` folders - Consolidated adapter extensions into a single file - Removed unused dependencies from package.json - Deleted unnecessary schema files - Extracted `MobileSpecsPatches` class into the mobile patching code - Updated all references to use the new `SpecProvider._` accessor ### How to test? - Verify all specs are properly registered and accessible via `SpecProvider._` - Test adapter functionality for HTML, Markdown, Notion HTML and plain text - Check mobile-specific features and patches work correctly - Ensure preview functionality works in both page and edgeless modes ### Why make this change? - Improves code organization by properly separating adapters and extensions - Simplifies singleton access pattern - Removes unnecessary dependencies and files - Makes the codebase more maintainable by consolidating related functionality
8a389ee
to
2cf9a8f
Compare
TL;DR
Refactored
SpecProvider
singleton access pattern and reorganized adapter/extension code structure.What changed?
SpecProvider.getInstance()
toSpecProvider._
for cleaner singleton access_common
directory to dedicatedadapters
andextensions
foldersMobileSpecsPatches
class into the mobile patching codeSpecProvider._
accessorHow to test?
SpecProvider._
Why make this change?