Skip to content

fix: category description not shown when no tags available#1061

Open
Hell1213 wants to merge 2 commits intoCCExtractor:masterfrom
Hell1213:fix/regression-category-description
Open

fix: category description not shown when no tags available#1061
Hell1213 wants to merge 2 commits intoCCExtractor:masterfrom
Hell1213:fix/regression-category-description

Conversation

@Hell1213
Copy link

@Hell1213 Hell1213 commented Mar 12, 2026

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

My familiarity with the project is as follows (check one):

  • I have never used the project.
  • I have used the project briefly.
  • I have used the project extensively, but have not contributed previously.
  • I am an active contributor to the project.

Closes #1060

Problem

On /regression/, category descriptions don't show when no tags are available. The description stays hidden even when a category is selected.

Root Cause

JavaScript condition if(hash === "") only checks for empty string, but urlParams.get("category") returns null when no category parameter exists in URL.

Fix

  • Changed const hash to let hash for reassignment
  • Updated condition to if(!hash || hash === "") to handle both null and empty cases
  • Added test case

Files Changed

  • templates/regression/index.html: Fixed JavaScript logic
  • tests/test_regression/test_controllers.py: Added test

Testing

  • All existing tests pass (41 regression tests)
  • New test verifies category description HTML structure

@sonarqubecloud
Copy link

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.

[BUG] Category description not displayed on regression page when no tags are available

1 participant