Skip to content

Conversation

dvirtz
Copy link
Contributor

@dvirtz dvirtz commented May 8, 2025

Problem

MBS-14013: entity create fails silently when begin date > end date

Solution

replace artist date editor with a react component

unlike the perl component, react validates the date range
@dvirtz dvirtz marked this pull request as draft May 8, 2025 12:41
@dvirtz
Copy link
Contributor Author

dvirtz commented May 8, 2025

Tests fail because HydratedDateRangeFieldset is missing begin/end area
edit: it also doesn't support different labels per artist type

date range component can now optionally have begin/end area components
@dvirtz dvirtz marked this pull request as ready for review May 12, 2025 06:56
@dvirtz
Copy link
Contributor Author

dvirtz commented Jul 21, 2025

@reosarevok did you have a chance to review this?

@dvirtz
Copy link
Contributor Author

dvirtz commented Jul 22, 2025

BTW, @reosarevok I did this before you asked me to consult you before implementing features in #3565 (comment) (although this is not a style issue so maybe that's not needed).
Feel free to reject it if you prefer a different solution.

@reosarevok
Copy link
Member

No, this is not style so that doesn't matter :) I haven't had time to check this (just came back from a holiday) but I will try to find some time. Did you manage to make it "support different labels per artist type" now? :)

@dvirtz
Copy link
Contributor Author

dvirtz commented Jul 28, 2025

No rush, I just wanted to know if you plan to review it or not.
It should change the label based on type now.

@reosarevok
Copy link
Member

Tested this locally and it does work, but @mwiencek might have comments about the code itself, so I'd want his review here.

Copy link
Member

@mwiencek mwiencek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! There's one bug which needs to be resolved, and it might take a bit of effort.

- introduce HydratedArtistDateRangeFieldset component
- add option to customize hidden id field in Autocomplete2 as artist form uses area_id instead of the default area.id
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.

3 participants