-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature: Associate categories inputs with their parents in selecting/deselecting #773
Feature: Associate categories inputs with their parents in selecting/deselecting #773
Conversation
…ps in browse page
…d when selected and deselect children of parent when deselected
@syphax-bouazzouni |
C'est super bravo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to resolve the conflicts and do the old changes request
@syphax-bouazzouni I added it to the upload and edit ontology forms, Ready to be merged now. |
We need to change the behavior in the browse page to be:
|
@Bilelkihal what is the state of this? will it be abandoned or adapted or is it already good to be merged? |
To my knowledge we were waiting for the federation to be activated and the new features related to categories assessed before enabling this. |
… to select or deselect children with their parents
@syphax-bouazzouni Ready for review |
@@ -130,12 +130,14 @@ def ontology_categories_input(ontology = @ontology, categories = @categories) | |||
categories ||= LinkedData::Client::Models::Category.all(display_links: false, display_context: false) | |||
|
|||
render Input::InputFieldComponent.new(name: '', label: 'Categories') do | |||
content_tag(:div, class: 'upload-ontology-chips-container') do | |||
content_tag(:div, class: 'upload-ontology-chips-container', 'data-controller': 'parent-categories-selector', 'data-parent-categories-selector-categories-value': "#{categories.to_json}", 'data-parent-categories-selector-target': "chips") do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you pass here "#{categories.to_json}"
, in the code you need only the children categories of the clicked chip category.
Said otherwise move the logic from the controller js to Ruby
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, but also the logic of categories is changed since the time I created this PR, so I need to adapt it to the changes done before merging
@syphax-bouazzouni This PR is ready to be merged |
We did a mistake here: but in the attribution of categories in upload or edit forms: |
PR description
This PR updates the category selection logic to ensure that:
Demo
Enregistrement.de.l.ecran.2025-01-02.a.16.40.48.mov
This behavior is implemented in the following features