-
Notifications
You must be signed in to change notification settings - Fork 25
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
#9378: decouple mod options args from form states to apply to all mod components #9379
Conversation
Playwright test resultsDetails
Flaky testsmsedge-setup › setup/unaffiliated.setup.ts › authenticate with unaffiliated user Skipped testschrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options |
expect(updatedExistingComponent?.optionsArgs).toEqual(updatedOptionsArgs); | ||
}); | ||
|
||
test("deleted mod component form states don't have their options args updated", () => { |
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.
These tests are no longer relevant
* @deprecated - Do not use versioned state types directly, exported for testing | ||
* @since 2.1.6 | ||
*/ | ||
export type EditorStateV10 = Except< |
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.
Type changes
Finish todo Fix more type errors [WIP] refactor analysis Fix types/tests
0ad99cf
to
a9c1a82
Compare
const ModOptionsDefinitionEditor: React.VFC = () => { | ||
const [activeField, setActiveField] = useState<string | null>(null); | ||
const modId = useSelector(selectActiveModId); | ||
assertNotNullish(modId, "Expected active mod id"); | ||
|
||
const { |
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.
Refactor to use AsyncStateGate
} | ||
|
||
/** @internal */ | ||
export function migrateEditorStateV9( |
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.
@grahamlangford migration code here. Note the use of dirty
to decide whether to set the dirty options args
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9379 +/- ##
==========================================
+ Coverage 74.24% 75.33% +1.08%
==========================================
Files 1332 1374 +42
Lines 40817 41884 +1067
Branches 7634 7764 +130
==========================================
+ Hits 30306 31553 +1247
+ Misses 10511 10331 -180 ☔ View full report in Codecov by Sentry. |
* Mod-level editor state passed to the runtime/analysis engine | ||
* @since 2.1.6 | ||
*/ | ||
export type DraftModState = { |
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.
This DraftModState type will eventually contain the other mod-level information for the draft:
- Mod Options Definitions
- Mod Variable Definitions
- Mod Metadata
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?
optionsArgs
to be tracked at the mod-level instead of on form statesdraftModState
type with mod-level edits to pass to the runtime/analysis engineRemaining Work
main
to get #9376: fix options args focus/active subtab resetting #9377Future Work
For more information on our expectations for the PR process, see the
code review principles doc