Skip to content

fix: always show all CRE links on CRE pages without collapsing (#901)#909

Open
shreeshtripurwarcomp23-coder wants to merge 1 commit into
OWASP:mainfrom
shreeshtripurwarcomp23-coder:fix/901-always-expand-cre-links
Open

fix: always show all CRE links on CRE pages without collapsing (#901)#909
shreeshtripurwarcomp23-coder wants to merge 1 commit into
OWASP:mainfrom
shreeshtripurwarcomp23-coder:fix/901-always-expand-cre-links

Conversation

@shreeshtripurwarcomp23-coder
Copy link
Copy Markdown

Fixes #901

Problem

On a CRE page, lists of linked CREs were being collapsed after 5 items,
requiring users to click "Show more" to see the rest. This happened because
the collapse logic in CommonRequirementEnumeration.tsx did not distinguish
between CRE links and links to external standards.

Fix

Added a check in CommonRequirementEnumeration.tsx: if all links in a group
are CREs, show all of them without collapsing and hide the "Show more" button.
Links to external standards still collapse as before.

This matches the logic already present in DocumentNode.tsx (allLinksAreCres).

Changes

  • application/frontend/src/pages/CommonRequirementEnumeration/CommonRequirementEnumeration.tsx
    • Import DOCUMENT_TYPES from ../../const
    • Compute allLinksAreCres before rendering each link group
    • Use visibleResults (full list when CREs, sliced otherwise) instead of inline slice
    • Guard the "Show more" button with !allLinksAreCres

@Pa04rth
Copy link
Copy Markdown
Collaborator

Pa04rth commented May 24, 2026

@shreeshtripurwarcomp23-coder Add the screenshot/screen recording of the result

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.

Do not collapse CREs

2 participants