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

1341 category improvements #1388

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

1341 category improvements #1388

wants to merge 8 commits into from

Conversation

dmijatovic
Copy link
Contributor

@dmijatovic dmijatovic commented Feb 3, 2025

Custom categories improvements

Closes #1341
Closes #1362
Closes #1365

Changes proposed in this pull request:

  • Changed labels on input form of custom categories for organisation and community (image 1)
  • Removed capitalization style for custom organisation and community categories (image 2)
  • The selection popup shows both label and description during the selection (image 3)
  • Implemented chip visual layout on software page, similar to project page (image 4)
  • Fix failing tests
  • Added search in add category modal for organisation and community. We search for (partial) value in short_name and name.

How to test:

  • make start to build and generate test data
  • enable communities in settings.json. You will need to refresh/reload page for changes to take effect
  • login as rsd_admin to be able to define categories on all "instances"
  • navigate to first organisation and create new categories. Confirm input form has "Label" and "Description" labels. Create some categories with "custom" capitalization like "eScience", "sTranGe CaSiNG"
  • navigate to software/project and select some of new categories. Confirm that both label and description are shown during the selection. Try search option.
  • view software and confirm selected categories are shown in the new layout (image 4)

Global custom categories (unchanged)

image

Input labels for categories on organisation and communities page

image

Removed capitalization from category chip

image

Select & search category (example)

image

Custom categories on software page

image

PR Checklist:

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

@dmijatovic dmijatovic force-pushed the 1341-categories branch 2 times, most recently from f7eb8b2 to 4284285 Compare February 3, 2025 17:16
refactor: show modal after loading to avoid form resizing
Copy link
Contributor

@cmeessen cmeessen left a comment

Choose a reason for hiding this comment

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

In the initial implementation "Name" was dedicated as full name, whereas "Short name" was the shortened form. It was not intended as a description, this would be a dedicated property. Thus, I strongly suggest to add a dedicated description field if this is required as this does not work with the use case we have already in production.

@bakhshir
Copy link

bakhshir commented Feb 4, 2025

This looks good. And I agree with @cmeessen that we might be misusing the full name field as basically description field. But unfortunately, we need it this way. We can continue using full name field as description, if search functionality is implemented - it would be easier to search.

@dmijatovic
Copy link
Contributor Author

dmijatovic commented Feb 4, 2025

@cmeessen and @bakhshir Thanks for you feedback!

The label change (Short name to Label and Name to Description) is change in the labels shown to user in the organisation and communities section only.

The working of "global" custom categories is not changed in order to avoid any impact on the Helmholtz categories implementation. The structure of the categories table remains unchanged. I assumed that Helmholtz use global categories only.

We seem to have slightly different use cases where different labels are more clear to users. In both cases we only need 2 inputs. Maybe we can use labeling that includes both labels?

  • Short name / Label
  • Full name / Description

Let me know what you think. Other suggestions/ideas are welcome. If you would like to discuss this PR in more details in person you are welcome to join our standup.

@dmijatovic dmijatovic requested a review from cmeessen February 6, 2025 09:03
@dmijatovic
Copy link
Contributor Author

@cmeessen and @bakhshir

I have made following changes on the category labels (see image 1 and 2 in the PR description)

  • Global categories remains unchanged
  • Categories for organisations and communities use original labels. Additional help text is added to clarify how values are used

Let me know what you think about this approach

Copy link

sonarqubecloud bot commented Feb 6, 2025

Quality Gate Failed Quality Gate failed for 'rsd-frontend'

Failed conditions
3.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

Search when adding categories Capitalization for Categories categories should not have a lenghty text?
3 participants