Skip to content

feat: add a showInTOC setting for the issue table of contents badge - #162

Merged
nuest merged 2 commits into
codecheckers:mainfrom
nuest:show-in-toc
Aug 26, 2026
Merged

feat: add a showInTOC setting for the issue table of contents badge#162
nuest merged 2 commits into
codecheckers:mainfrom
nuest:show-in-toc

Conversation

@nuest

@nuest nuest commented Aug 13, 2026

Copy link
Copy Markdown
Member

IssueTOC rendered its badge unconditionally, so a journal that turned off the CODECHECK article sidebar still got badges in issue listings with no way to stop them. The two displays are now controlled separately: showArticleSidebar governs the article page, showInTOC the badge.

The defaults differ deliberately. showInTOC treats unset as "show", because the badge predates the setting and journals that never configure it should keep the behaviour they have; showArticleSidebar keeps treating unset as "hide". The test dataset sets the sidebar explicitly and leaves showInTOC alone, so the default-on path is the one exercised.

Adds an e2e spec covering both states and that the setting does not disturb the article sidebar — verified to fail if IssueTOC stops consulting it.

The settings-form interaction the sidebar spec had grown moves into a cy.setCodecheckSetting(fieldId, enabled) support command rather than being copied. Both specs restore what they change in an after() hook.

@nuest
nuest marked this pull request as ready for review August 13, 2026 09:24
@nuest
nuest merged commit 45a4599 into codecheckers:main Aug 26, 2026
3 checks passed
@nuest
nuest deleted the show-in-toc branch August 26, 2026 10:50
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.

1 participant