MBS-12748: Convert area edit form to React#3659
Open
Serial-ATA wants to merge 4 commits intometabrainz:masterfrom
Open
MBS-12748: Convert area edit form to React#3659Serial-ATA wants to merge 4 commits intometabrainz:masterfrom
Serial-ATA wants to merge 4 commits intometabrainz:masterfrom
Conversation
Contributor
Author
|
The area editing test is failing, I'll take a look soon |
reosarevok
requested changes
Oct 31, 2025
Member
reosarevok
left a comment
There was a problem hiding this comment.
It seems from the test failure that editing the area is also removing its type (type_id now appears both in old and new). IIRC, that's because in the tests you need to specify the same type as it already has, otherwise values in selects get lost for some reason.
The flicker of the type bubble you might be seeing should be solved by 0d6b18a (feel free to cherry-pick it if you want it).
The ISO validation errors should probably disable form submission. In the recording PR I'm doing const hasErrors = hasSubfieldErrors(state.form) - something like that probably makes sense?
In general this seems to work quite well!
45c7b86 to
f7b88e9
Compare
We will need an equivalent to this for many editors, so it makes sense for it to be a reusable component.
505b1ae to
2565772
Compare
2565772 to
8ab8977
Compare
reosarevok
reviewed
Dec 1, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Solving MBS-12748, converting the area edit form and creation page to React.
Solution
root/area/edit_form.ttto ReactEventEditFormcomponentroot/area/create.ttto Reactroot/static/scripts/common/components/TypeBubble.js) to share between the event edit form and the area edit formServer/Validation.pmto JS inroot/static/scripts/edit/utility/iso3166.jsFormRowTextListSimpleto take an optionaldispatchfunction, so that the ISO 3166 codes can be validated in real timeTesting
I've tested creating areas on
/area/create, and editing existing areas on/area/xxx/edit. I've tested that the area types are all present and can be set, invalid ISO 3166 codes are rejected, and multiple codes can be added.