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

Search result tweaks for autocomplete #1623

Merged
merged 6 commits into from
Apr 18, 2024
Merged

Conversation

joelit
Copy link
Contributor

@joelit joelit commented Apr 18, 2024

Link to relevant issue(s), if any

Description of the changes in this PR

  • Filtered duplicate results with unique=true parameter. This changes the amount of search results recieved
  • Alternate labels are displayed in italics
  • Notation codes are shown if showNotation configuration parameter is set for the vocabulary
  • Notation code results are returned and bolded if they match the search term

Known problems or uncertainties in this PR

The language for the search is not set yet. That fuctionality should come in the follow-up pull request.

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)

@joelit joelit added this to the 3.0 milestone Apr 18, 2024
@joelit joelit requested a review from UnniKohonen April 18, 2024 09:38
@joelit joelit self-assigned this Apr 18, 2024
Copy link
Contributor

@UnniKohonen UnniKohonen left a comment

Choose a reason for hiding this comment

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

Everything seems to work as intended. Added a very minor suggestion to code but this can be merged IMO.

resource/js/vocab-search.js Outdated Show resolved Hide resolved
joelit and others added 2 commits April 18, 2024 14:52
Co-authored-by: UnniKohonen <45235116+UnniKohonen@users.noreply.github.com>
Copy link

sonarcloud bot commented Apr 18, 2024

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud

@joelit joelit merged commit 4917447 into main Apr 18, 2024
8 of 10 checks passed
@joelit joelit deleted the issue1514-searchResultTweaks branch April 18, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
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