Skip to content
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

Reactify custom WTForms fields #6265

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

duartegalvao
Copy link
Member

@duartegalvao duartegalvao commented Apr 2, 2024

This PR adds the following components:

  • a FinalPersonLinkField, so that the PersonLinkField can be added to final forms
    • also includes a wrapper for abstracts and contributions, with predefined roles
  • a SessionColorPicker and a FinalSessionColorPicker
  • a LocationField and a FinalLocationField
  • an ItemListField, a FinalItemListField and a FinalReferencesField

Moreover, it includes a new dev module with a page to test all of the custom React fields in /dev/react/fields. Also, the ChoicesSetup was refactored using the new ItemListField.

This will be important for future rectifying of timetable-related dialogs for #6220.

@ThiefMaster
Copy link
Member

I recommend adding some wrappers for the different object types - check the PersonLinkListFieldBase subclasses in Python what roles we set and on which conditions this depends.

@duartegalvao
Copy link
Member Author

I recommend adding some wrappers for the different object types - check the PersonLinkListFieldBase subclasses in Python what roles we set and on which conditions this depends.

I guess we can skip the abstracts one for now, right?

@ThiefMaster
Copy link
Member

yeah... unless we want to move all dialogs in one go, which might actually not be such a bad idea considering the huge amount of awful complexity the wtforms-based backend of this field requires (for sending back the data when re-rendering the form)

@duartegalvao duartegalvao marked this pull request as draft April 5, 2024 09:15
@duartegalvao duartegalvao force-pushed the final-person-link-field branch 6 times, most recently from a46c92d to b7bc845 Compare April 12, 2024 12:03
@duartegalvao duartegalvao force-pushed the final-person-link-field branch 3 times, most recently from a29f289 to 71d3482 Compare April 18, 2024 10:15
@duartegalvao duartegalvao changed the title Add FinalPersonLinkField Reactify custom WTForms fields Apr 18, 2024
@duartegalvao duartegalvao marked this pull request as ready for review April 18, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants