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

Add favorite:boolean to controlled vocab #439

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

crowesn
Copy link
Contributor

@crowesn crowesn commented Mar 7, 2024

Resolves #428

Add favorite:boolean variable to the ControlledVocabulary object along with view components to edit and display. Add sort to @repair_type which feeds the Repair Type form drop-downs, so that vocab terms marked as favorite will sort to top of select options.

This allows admin to choose repair type terms that should sort to top of options. The sort has only been applied to repair types but could be applied to other controlled vocab select menus.

I should note that in the issue, preservation staff requested a specific order for repair types. I think this is a compromise that allows them to control priority of the terms without the rigidity of hard-coding the order. The trade-off is a lack of precision.

We should check with Preservation staff to confirm if this solution is acceptable.

@crowesn
Copy link
Contributor Author

crowesn commented Mar 7, 2024

h/t to @Janell-Huyck for this implementation idea!

@crowesn crowesn force-pushed the 428/add-favorite-boolean-to-vocab branch from 43fade9 to a41d2fb Compare March 7, 2024 16:25
@hortongn hortongn self-assigned this Mar 11, 2024
Copy link
Member

@hortongn hortongn left a comment

Choose a reason for hiding this comment

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

@crowesn This works great. Very glad users can control the favorites from the interface. Just see my feature spec comment in-line.

spec/features/end_to_end_spec.rb Show resolved Hide resolved
@crowesn crowesn force-pushed the 428/add-favorite-boolean-to-vocab branch 4 times, most recently from a708478 to a917e63 Compare March 12, 2024 19:17
@crowesn crowesn force-pushed the 428/add-favorite-boolean-to-vocab branch from a917e63 to 84fe906 Compare March 12, 2024 19:24
@crowesn
Copy link
Contributor Author

crowesn commented Mar 12, 2024

@Janell-Huyck this should be ready to deploy to libappstest now. Thanks!

@hortongn hortongn merged commit b133e86 into qa Apr 2, 2024
2 checks passed
@hortongn hortongn deleted the 428/add-favorite-boolean-to-vocab branch April 2, 2024 17:49
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.

Reorder options in Repair Type select for In-House Repairs form
2 participants