Skip to content

Conversation

Devansh-ops
Copy link

  • Breaking change?
    No. Defaults only apply when the URL lacks hideInternal and no prior preference exists in localStorage. Existing explicit URL values and saved preferences continue to work as before.

What changes did you make? (Give an overview)

  • Frontend (Topics → ListPage.tsx): When the URL has no hideInternal param, derive the value from localStorage('hideInternalTopics'), defaulting to true if missing.
  • Respect explicit URL values (?hideInternal=true/false).
  • Parse the stored value as a real boolean ('true'/'false') instead of truthy/falsy.
  • Avoid mutating the existing URLSearchParams instance (create a new one before calling setSearchParams).

Closes #1073.

Is there anything you'd like reviewers to focus on?

  • URL precedence over localStorage (explicit URL should win).
  • Whether we should persist the default ('true') back to localStorage on first run (current change does, for consistency across sessions).
  • Any preference on naming/placement if you’d like this logic factored into a small helper.

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to

  • Manually (IST):

    • Clear localStorage; open Topics → ?hideInternal=true gets appended.
    • Toggle to show internal; reload persists as expected.
    • Visit with ?hideInternal=false in URL; list shows internals; reload preserves via URL/localStorage.
  • Unit checks

  • Integration checks

  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES) — note: UI behavior now defaults to hiding internal topics; added a short note to docs if required
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)
cute-bush-baby

@kapybro kapybro bot added status/triage Issues pending maintainers triage area/topics status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Oct 8, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Devansh-ops! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

@Devansh-ops Devansh-ops force-pushed the issues/1073-hide-internal-default branch 3 times, most recently from 4ad3066 to ff885ef Compare October 9, 2025 03:15
Update the test in ListPage.spec.tsx to correctly assert the initial
state of 'hideInternalTopics' as truthy, then toggling to falsy and
back to truthy. This ensures the test matches the component's new behavior.
@Devansh-ops Devansh-ops force-pushed the issues/1073-hide-internal-default branch from ff885ef to ab9807b Compare October 9, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/topics status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FE: UX: Hide internal topics by default

1 participant