-
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
#9137: types and migrations for mod variable declaration section (1/3) #9138
Open
twschiller
wants to merge
17
commits into
main
Choose a base branch
from
feature/9137-variable-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d271de3
[WIP] type and migration changes
twschiller 7f04fea
Fix migrations
twschiller 023a27d
Fix comment
twschiller 18fe24f
Merge remote-tracking branch 'origin/main' into feature/9137-variable…
twschiller b97e0b3
Add migration test
twschiller ee5cfb3
Strengthen return type
twschiller b900a33
[WIP] Page Editor save logic
twschiller 8ec0434
#9137: fix broken tests
twschiller 465e19a
Merge remote-tracking branch 'origin/main' into feature/9137-variable…
twschiller 7c61e42
#9137: fix playwright test
twschiller 984cbec
Try fixing snapshot
twschiller de5c305
Rename variablesDefinition
twschiller cf862d0
Merge remote-tracking branch 'origin/main' into feature/9137-variable…
twschiller f427c75
Try fixing yaml
twschiller 5bed175
Remove trailing newline
twschiller 73568c6
Update snapshots
twschiller 39b6ae7
Merge remote-tracking branch 'origin/main' into feature/9137-variable…
twschiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why the mismatch between
mod.variables
andvariablesDefinition
on the formState?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.
Matching the naming conventions for the 2 types:
pixiebrix-extension/src/types/modDefinitionTypes.ts
Line 125 in ee5cfb3
Mod definition:
Versus form state:
Personally, I'm indifferent. So if there's preference on where the team wants the naming to go, we should adopt it now to avoid having to write another migration in the future
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.
I think we should be migrating to a world where the formstate and the mod definition are as similar as possible (ideally a formstate would just be a mutable mod definition?). I would like to have @BLoe to weigh in though since he's spent the most time dealing with the form states in the Page Editor
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.
In general, I'd prefer to use the
Definitions
andValues
suffixes everywhere possible to differentiate between the definitions and current values. I don't really care if we do that here/now or a DX change later that updates these all at once to add the suffix.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.
In
ModDefinition
, everything is definition. So using suffix on sub-properties would be redundant. Therefore, I wouldn't use the suffix there:I've updated the change in ModComponent clarify that it's the definition and not the variables themselves