Issue1489 global search bar
Link to relevant issue(s), if any
- Resolves some parts of #1489
Description of the changes in this PR
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-onlyclass, color contrast) - [ ] The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)
Quality Gate failed
Failed conditions
66.9% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarQube Cloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarQube for IDE
Quality Gate failed
Failed conditions
67.6% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarQube Cloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarQube for IDE
Quality Gate failed
Failed conditions
16.7% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)
See analysis details on SonarQube Cloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarQube for IDE
SonarQube is complaining about the repetitive nature of the two dropdown menus in the search bar, wishing for a generic parameterized implementation that renders the different dropdown menus. In this case where we should ever have just the two menus for vocab and language, I am not sure getting rid of the repetitive code would improve the readability or the maintainability of the code.
The requested changes were applied. I'll make sure the related epic contains the updated specifications, or the request for discussion thereof. I ended up splitting the language updating mechanism from the language parsing mechanism for ease of maintenance.
Quality Gate failed
Failed conditions
2 Security Hotspots
10.6% Duplication on New Code (required ≤ 3%)