-
Notifications
You must be signed in to change notification settings - Fork 22
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
#9419: add registry lookup to platform protocol #9421
base: main
Are you sure you want to change the base?
Conversation
@@ -76,9 +74,6 @@ export async function init(): Promise<void> { | |||
registerBuiltinBricks(); | |||
registerContribBricks(); | |||
markDocumentAsFocusableByUser(); | |||
// Since 1.8.2, the brick registry was de-coupled from the runtime to avoid circular dependencies | |||
// Since 1.8.10, we inject the platform into the runtime | |||
initRuntime(brickRegistry); |
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.
Required registry methods are in the platform now
import { nowTimestamp } from "@/utils/timeUtils"; | ||
import { flagOn } from "@/auth/featureFlagStorage"; | ||
import castError from "@/utils/castError"; | ||
|
||
// Introduce a layer of indirection to avoid cyclical dependency between runtime and registry | ||
// eslint-disable-next-line local-rules/persistBackgroundData -- Static | ||
let brickRegistry: RegistryProtocol<RegistryId, Brick> = { |
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.
Available in the platform now
Playwright test resultsDetails Open report ↗︎ Flaky testschrome › tests/pageEditor/copyMod.spec.ts › run a copied mod with a built-in integration Skipped testschrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9421 +/- ##
==========================================
+ Coverage 74.24% 75.64% +1.39%
==========================================
Files 1332 1398 +66
Lines 40817 42311 +1494
Branches 7634 7795 +161
==========================================
+ Hits 30306 32006 +1700
+ Misses 10511 10305 -206 ☔ View full report in Codecov by Sentry. |
What does this PR do?
block
->brick
on TypedBrickMapDiscussion
Future Work
contentScript
context. Some of these should be moved to the main platform protocol, others to the content script platform:pixiebrix-extension/src/bricks/effects/reactivate.ts
Line 20 in a4812c9
For more information on our expectations for the PR process, see the
code review principles doc