Skip to content

Global Search twig-template#1758

Merged
joelit merged 17 commits intomainfrom
issue1745-global-search-twig
May 15, 2025
Merged

Global Search twig-template#1758
joelit merged 17 commits intomainfrom
issue1745-global-search-twig

Conversation

@joelit
Copy link
Contributor

@joelit joelit commented Jan 30, 2025

Reasons for creating this PR

Link to relevant issue(s), if any

Description of the changes in this PR

  • This PR implements the twig template for global search
  • In the absence of a search field, the result page can be tested by visiting [Skosmos-home]/en/search?clang=en&q=kissa

Known problems or uncertainties in this PR

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 Jan 30, 2025
@joelit joelit self-assigned this Jan 30, 2025
@codecov
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.94%. Comparing base (d048386) to head (f8c240e).
Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
src/controller/WebController.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1758      +/-   ##
============================================
+ Coverage     70.90%   70.94%   +0.04%     
- Complexity     1650     1651       +1     
============================================
  Files            33       33              
  Lines          4330     4330              
============================================
+ Hits           3070     3072       +2     
+ Misses         1260     1258       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 30, 2025

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

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

See analysis details on SonarQube Cloud

@joelit
Copy link
Contributor Author

joelit commented Jan 30, 2025

Rebased the branch to main in order to allow automatic merging

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.

I gave a few suggestions for minor code adjustments.

Looking at the search result page, I see several layout issues. The spacing between the icons and the text is sometimes nonexistent, and there are sometimes extra spaces before commas:

image

But this is not consistent as sometimes the result items are rendered just fine:

image

@osma osma moved this from Needs review to Reviewed - further actions needed in Skosmos 3.x Backlog Mar 11, 2025
@joelit
Copy link
Contributor Author

joelit commented Mar 11, 2025

OK, the inconsistency of the search results for search result property label spacing and property value spacing is pretty weird, and probably has further implications for the consistency of the twig template. I'll track this down to the root cause.

@osma osma modified the milestones: 3.0-alpha.1, 3.0-alpha.2 Mar 20, 2025
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.

A couple of issues still need fixing:

  1. The spacing between icons and text on the search results page is still a bit erratic
  2. SonarCloud complains about unnecessary escape characters

@joelit joelit force-pushed the issue1745-global-search-twig branch from dac6433 to 47f0fca Compare March 20, 2025 15:54
@sonarqubecloud
Copy link

@joelit joelit moved this from Reviewed - further actions needed to In progress in Skosmos 3.x Backlog May 13, 2025
@joelit joelit requested a review from UnniKohonen May 15, 2025 08:41
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.

Otherwise looks good to me, but there seems to be one unused CSS rule.

Also, IMO, the fontsize of preflabel links is too small, compare this PR (1) to the mockup layout (2). The same issue is also present on the vocab search result page.

1 image

2 image

@joelit joelit requested a review from UnniKohonen May 15, 2025 11:38
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

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.

LGTM!

@joelit joelit merged commit 73ae8e5 into main May 15, 2025
9 of 10 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Issue/PR closed in Skosmos 3.x Backlog May 15, 2025
@joelit joelit deleted the issue1745-global-search-twig branch May 15, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global Search twig-template

3 participants