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

1343 category checkboxes #1351

Merged
merged 4 commits into from
Nov 26, 2024
Merged

1343 category checkboxes #1351

merged 4 commits into from
Nov 26, 2024

Conversation

dmijatovic
Copy link
Contributor

@dmijatovic dmijatovic commented Nov 19, 2024

Add checkboxes to all levels of organsation and community categories

Closes #1343
Closes #1348

Changes proposed in this pull request:

  • Altered data generation module for creating catgories. Generate category names have "global, organisation or community" word to indicate the type of category.
  • When deleting organisation from software/project related categories are also deleted.
  • Add checkboxes to all levels of categories for organisation software/projects. Selecting "lower" level item results is automatical selection of "higer" levels. Deselecting "higer" level item results in automatic "deselection" of all children items.
  • Add option to "fold" child items in order to shorten the list length (for easier reading)
  • This functionality is implemented only for organisation and community related categories. Global categories, used only for software are not included in this PR.

How to test:

  • make start to build and generate test data
  • login as rsd admin
  • select software with organisation categories. Try to change values at different levels and see what your experience is with new approach. This is POC to discuss.
  • select project with organisation categories and test the categories approach. The working should be the same as for software.
  • enable communities module in the settings.json and test the functionality for community categories
  • add also global categories to software. Confirm that global categories have checkboxes only at "lowest" level.
  • confirm that categories are ordered alphabetically by name

Remark
Further improvements might be needed concerning the order on the software and project page. For software, in particular, we can have 3 types of categories: global, organisation and community specific categories. Currently all category groups/types are listed in alphabetical order.

image

Example global categories (not changed)

image

Example organisation/community categories (changed)

image

PR Checklist:

  • Increase version numbers in docker-compose.yml
  • Link to a GitHub issue
  • Update documentation
  • Tests

@dmijatovic dmijatovic force-pushed the 1343-checkboxes branch 3 times, most recently from a45d4bb to fed0913 Compare November 21, 2024 09:43
@dmijatovic dmijatovic changed the title 1343 checkboxes 1343 category checkboxes Nov 21, 2024
@dmijatovic dmijatovic force-pushed the 1343-checkboxes branch 4 times, most recently from 8f62b5f to 37546e9 Compare November 21, 2024 19:13
@dmijatovic dmijatovic marked this pull request as ready for review November 21, 2024 19:28
Copy link
Collaborator

@ewan-escience ewan-escience left a comment

Choose a reason for hiding this comment

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

Found the following bug: add a top level category, but don't select any children, of an organisation or community to software and save. Edit the categories again, deselect and select the same top level category as in the step before and save. The category is now not saved anymore.

@jmaassen
Copy link
Member

jmaassen commented Nov 25, 2024

Seems to work well for all the test case I could come up with.

I agree that the layout will become an issue when all flavors of categories are in use at the same time. But will that ever happen?

fix: software organisation categories select/decelet/save
Copy link

@dmijatovic dmijatovic merged commit 09bc2c6 into main Nov 26, 2024
5 checks passed
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.

categories: the order of appearance categories: checkboxes only available for leaf elements?
3 participants