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

Sort concepts in hierarchical view by label and locale #1626

Merged
merged 10 commits into from
Apr 24, 2024

Conversation

UnniKohonen
Copy link
Contributor

@UnniKohonen UnniKohonen commented Apr 23, 2024

Reasons for creating this PR

Concepts in hierarchical view are not currently sorted. This PR add functionality to sort concepts by their label according to locale.

Link to relevant issue(s), if any

Description of the changes in this PR

Sort concepts in hierarchy by label and locale when they are added to hierarchy tree

Addresses requirement 9 in #1521

Known problems or uncertainties in this PR

Concepts are only sorted by label and locale, not notation codes or notation sorting style

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@UnniKohonen UnniKohonen added this to the 3.0 milestone Apr 23, 2024
@UnniKohonen UnniKohonen self-assigned this Apr 23, 2024
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

null labels should be handled, otherwise this looks good!

resource/js/tab-hierarchy.js Show resolved Hide resolved
@@ -61,7 +61,7 @@ describe('Vocabulary home page', () => {
cy.get('#tab-alphabetical').contains('a', 'care institutions').click()

// check the concept prefLabel
cy.get('#concept-heading h1').invoke('text').should('equal', 'care institutions')
cy.get('#concept-heading h1', {'timeout': 15000}).invoke('text').should('equal', 'care institutions')
Copy link
Member

Choose a reason for hiding this comment

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

Is this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was failing before without the timeout but now it isn't anymore. I'll take it out

@UnniKohonen UnniKohonen marked this pull request as ready for review April 24, 2024 12:01
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

LGTM, please check the SonarCloud suggestions

Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@UnniKohonen UnniKohonen merged commit ad24e05 into main Apr 24, 2024
10 checks passed
@UnniKohonen UnniKohonen deleted the hierarchy-sort-label-by-locale branch April 24, 2024 12:51
@osma osma modified the milestones: 3.x, 3.0 Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done (verified in test.dev.finto.fi, set Milestone 3.0 for both issue & PR)
Development

Successfully merging this pull request may close these issues.

2 participants