-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Convert form_row_text_list
to React
#3264
base: master
Are you sure you want to change the base?
Convert form_row_text_list
to React
#3264
Conversation
Thanks for opening your first pull request for MusicBrainz Server, and welcome to our community! 🎉 |
Can one of the admins verify this patch? |
@brainzbot, add to whitelist |
Thanks a lot for submitting this pull request! Please note that there is some work in progress to start with converting Event edit form to React, as MBS-11063 is a sub-task of MBS-12755. Sorry if it wasn’t clear from the ticket, I just added a comment to avoid any further misinterpretation. We will review the Event PR #2672 at first, and see if your present contribution can help with making it even better. |
Ah thanks, I hadn't seen MBS-11063. The list of tasks on MBS-12755 was collapsed for some reason so I only saw the first 5. #2672 will help simplify my implementation of the area edit form later, since it adds the |
fc004e4
to
f0cda38
Compare
I started working on some improvements here, hope you don't mind me pushing them to the branch :) |
cce2cc6
to
ef0676f
Compare
334b075
to
eb77d3d
Compare
This is needed to be able to use the component in our TT forms until all forms are converted (and makes it easier to test without having to fully convert the entity editors to React).
This allows testing the code. We eventually will want to use it in all TT forms and drop the TT version.
This is a lot better for translators than "Add {item}" (and needed for Estonian at least to actually be translated correctly in a simple way). For area, we don't want translations though since it's an admin form.
This was a hack needed for JQuery to work on this, but with React it's AFAICT entirely useless.
This matches what we do elsewhere in the codebase.
It makes sense for this to be a reusable component, but then we should reuse it.
This allows us to remove the TextList jquery code that the TT version uses.
This will be needed (or at least helpful) anyway when we use this in a larger React form so we might as well get it ready now.
This is not ideal, but it's the same as in production - and associating it with the repeatable field is invalid HTML.
7fbe85e
to
9e41078
Compare
I think this is fine now but @mwiencek, please do recheck. @Serial-ATA, feel free to ask about anything :) I know it probably feels like I changed everything, but it was great to have a good starting point and I hope you do submit the stuff for area (with some modifications needed probably, but that's ok) if you still have it around :) |
Thanks for taking this over, I had forgotten about it 😄. I still have the area form branch. I'll bring it up to date once this is merged. |
Just a comment that if we do merge this as-is then you'd want to use |
Problem
This is related to MBS-12755. This is just converting the
form_row_text_list
TT macro to a React component to make the conversion of the edit pages possible.Solution
This is just a direct translation of the TT macro. I'm no web developer, so this may not be the best.
Testing
I converted
area/edit_form.tt
separately and tested with that.I didn't include that yet to keep this simple.
Further action
I plan to use this to convert the edit pages in follow up PRs.