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

Feature: Associate categories inputs with their parents in selecting/deselecting #773

Draft
wants to merge 11 commits into
base: development
Choose a base branch
from

Conversation

Bilelkihal
Copy link
Collaborator

@Bilelkihal Bilelkihal commented Oct 10, 2024

PR description

This PR updates the category selection logic to ensure that:

  • When a child category is selected, all of its parent categories will automatically be selected.
  • When a parent category is deselected, all of its child categories will be deselected automatically.

Example:

  • If the parent category is ANIMAL and its children are DOG and CAT:
    • Selecting DOG or CAT will automatically select the ANIMAL category.
    • Deselecting the ANIMAL category will automatically deselect both DOG and CAT

This behavior is implemented in the following features

  • Browse page ✅
  • Upload Ontology Form ✅
  • Edit Submission Form ✅

Demo

Enregistrement.de.l.ecran.2024-10-11.a.12.10.17.mov
Enregistrement.de.l.ecran.2024-11-07.a.15.35.42.mov
Enregistrement.de.l.ecran.2024-11-07.a.15.36.31.mov

@Bilelkihal Bilelkihal self-assigned this Oct 10, 2024
@Bilelkihal Bilelkihal changed the title Feature: Select children of category when selecting it Feature: Associate categories and children in inputs Oct 10, 2024
@Bilelkihal Bilelkihal changed the title Feature: Associate categories and children in inputs Feature: Associate categories and children inputs in Browse, Upload ontology and edit submission pages Oct 10, 2024
@Bilelkihal Bilelkihal changed the title Feature: Associate categories and children inputs in Browse, Upload ontology and edit submission pages Feature: Auto-select/deselect child categories when selecting/deselecting parent category Oct 10, 2024
@Bilelkihal Bilelkihal changed the title Feature: Auto-select/deselect child categories when selecting/deselecting parent category Feature: associate Oct 10, 2024
@Bilelkihal Bilelkihal changed the title Feature: associate Feature: Associate categories input with their parents in selecting/deselection Oct 10, 2024
@Bilelkihal Bilelkihal changed the title Feature: Associate categories input with their parents in selecting/deselection Feature: Associate categories inputs with their parents in selecting/deselection Oct 10, 2024
…d when selected and deselect children of parent when deselected
@Bilelkihal
Copy link
Collaborator Author

@syphax-bouazzouni
This PR is based on the branch from PR #772. Once that PR is merged, the number of files in this PR will be reduced.

@jonquet
Copy link

jonquet commented Oct 11, 2024

C'est super bravo.

@Bilelkihal Bilelkihal changed the title Feature: Associate categories inputs with their parents in selecting/deselection Feature: Associate categories inputs with their parents in selecting/deselecting Oct 11, 2024
@syphax-bouazzouni syphax-bouazzouni marked this pull request as draft October 16, 2024 21:17
@syphax-bouazzouni syphax-bouazzouni marked this pull request as ready for review November 1, 2024 19:45
@syphax-bouazzouni syphax-bouazzouni self-requested a review November 1, 2024 19:47
Copy link
Collaborator

@syphax-bouazzouni syphax-bouazzouni left a 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

@Bilelkihal
Copy link
Collaborator Author

@syphax-bouazzouni I added it to the upload and edit ontology forms,
and resolved all the conflicts with the federation categories refresh code.

Ready to be merged now.

@Bilelkihal
Copy link
Collaborator Author

We need to change the behavior in the browse page to be:

  • Selecting a parent select all children
  • Deselecting a parent deselect all the children

@syphax-bouazzouni
Copy link
Collaborator

@Bilelkihal what is the state of this? will it be abandoned or adapted or is it already good to be merged?
If abandoned you can close it.
If need to be adapted transform it into a draft.
If ready to be merged I will do the review.

@Bilelkihal Bilelkihal marked this pull request as draft November 28, 2024 15:19
@jonquet
Copy link

jonquet commented Dec 1, 2024

To my knowledge we were waiting for the federation to be activated and the new features related to categories assessed before enabling this.

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