-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use ModComponentRef
instead of flat extensionId
and blueprintId
in panel entries
#8756
Conversation
ModComponentRef
instead of flat extensionId and blueprintId in panel runtimeModComponentRef
instead of flat extensionId
and blueprintId
in panel runtime
Playwright test resultsDetails Open report ↗︎ Flaky testschrome › tests/workshop/createMod.spec.ts › can create a new mod from a yaml definition and update it Skipped testschrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options |
}); | ||
export function sidebarEntryFactory<T = PanelEntry>( | ||
export function sidebarEntryFactory( |
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.
The previous formulation was not type-safe because there was no constraint on the type. There's no reason for the overrides to use generics, so remove them
ModComponentRef
instead of flat extensionId
and blueprintId
in panel runtimeModComponentRef
instead of flat extensionId
and blueprintId
in panel entries
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8756 +/- ##
==========================================
- Coverage 74.24% 74.24% -0.01%
==========================================
Files 1332 1332
Lines 40817 40852 +35
Branches 7634 7636 +2
==========================================
+ Hits 30306 30330 +24
- Misses 10511 10522 +11 ☔ View full report in Codecov by Sentry. |
* @param modComponentRef | ||
* @see selectEventData | ||
*/ | ||
export function mapModComponentRefToEventData( |
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.
Helper method to avoid needing to map field names at telemetry sites
* | ||
* @throws TypeError if the extensionId or extensionPointId is missing | ||
*/ | ||
export function mapMessageContextToModComponentRef( |
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.
Helper method to avoid remapping field names in bricks. Eventually, we need to stop using the logger context in bricks to produce the mod component ref given that the MessageContext nullness type is too weak
|
||
expect(state).toStrictEqual({ | ||
...state, | ||
activeKey: eventKeyForEntry(originalPanel), | ||
}); | ||
}); | ||
|
||
it("sets activeKey to the active key of any panel with the same modId as the removedEntry if it exists and there is no matching extensionId", () => { | ||
it("sets activeKey to the active key of any panel with the same modId as the removedEntry if it exists and there is no matching component id", () => { |
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.
it("sets activeKey to the active key of any panel with the same modId as the removedEntry if it exists and there is no matching component id", () => { | |
it("sets activeKey to the active key of any panel with the same modId as the removedEntry if it exists and there is no matching mod component id", () => { |
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
What does this PR do?
ModComponentRef
instead of flatextensionId
andblueprintId
in panel runtimeRemaining Work
Discussion
Future Work
ModComponentRef
in Quick Bar protocol #8758MessageContext
, which has weaker nullness constraintsModComponentRef
:id
(modComponentId
would be redundant),modId
,starterBrickId
extensionId
in exported panel runtime codeuseDocumentPreviewRunBlock
For more information on our expectations for the PR process, see the
code review principles doc