Skip to content

Conversation

@hlbmtc
Copy link
Contributor

@hlbmtc hlbmtc commented Feb 3, 2026

Hide "In The News" and "Communities" for minimal UI mode

Summary by CodeRabbit

  • Features
    • Navigation communities link visibility now respects minimal UI mode setting
    • News sorting option in feed filters now respects minimal UI mode setting, providing a streamlined interface when enabled

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

This PR conditionally hides UI elements based on the PUBLIC_MINIMAL_UI flag. The communities navigation link and news hotness sort option are disabled when minimal UI mode is active, across both desktop and mobile navigation paths.

Changes

Cohort / File(s) Summary
Navigation Links
front_end/src/app/(main)/components/headers/hooks/useNavbarLinks.tsx
Conditionally includes communities link in both desktop menu and mobile menu only when PUBLIC_MINIMAL_UI is false.
Feed Filters
front_end/src/app/(main)/questions/components/feed_filters/main.tsx
Imports usePublicSettings and gates mainSortNewsVisible and NewsHotness sort option on PUBLIC_MINIMAL_UI being disabled; updates memo dependencies accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • aseckin
  • ncarazon

Poem

🐰 A flick of the switch, communities go,
News hotness fades like morning's first glow,
Minimal mode whispers, "hide what's not key,"
The UI dances, lean as can be! ✨

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Minimal UI: remove news & communities' directly summarizes the main changes: conditionally hiding the communities link and the 'In The News' sort option based on the PUBLIC_MINIMAL_UI flag.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/minimal-ui-remove-comms-news

🧹 Recent nitpick comments
front_end/src/app/(main)/questions/components/feed_filters/main.tsx (1)

124-126: Consider adding mainSortNewsVisible to the dependency array.

The mainSortOptions memo uses mainSortNewsVisible (which now depends on PUBLIC_MINIMAL_UI), but the dependency array only includes [t, isLargeScreen]. While PUBLIC_MINIMAL_UI is likely a static configuration that won't change at runtime, the dependency array is technically incomplete.

The existing eslint-disable suggests this was intentional—if PUBLIC_MINIMAL_UI is guaranteed to be constant per deployment, this is acceptable. Otherwise, consider updating the deps.

♻️ Optional fix to include all dependencies
     ],
-    // eslint-disable-next-line react-hooks/exhaustive-deps
-    [t, isLargeScreen]
+    [t, isLargeScreen, mainSortNewsVisible, mainSortNewVisible]
   );
front_end/src/app/(main)/components/headers/hooks/useNavbarLinks.tsx (2)

176-176: Missing LINKS.communities in dependency array.

The menuLinks memo now uses LINKS.communities but it's not included in the dependency array (lines 199-214). While this is unlikely to cause issues since LINKS is memoized on t and the pattern of listing individual LINKS.* properties is established, the dependency is technically incomplete.

♻️ Optional fix to add missing dependency
   }, [
     LINKS.about,
     LINKS.aggregationExplorer,
     LINKS.aiBenchmark,
+    LINKS.communities,
     LINKS.createQuestion,
     LINKS.faq,

233-233: Missing LINKS.communities in dependency array.

Same issue as menuLinks—the mobileMenuLinks memo uses LINKS.communities but it's not in the dependency array (lines 299-320).

♻️ Optional fix to add missing dependency
   }, [
     LINKS.about,
     LINKS.services,
     LINKS.aggregationExplorer,
     LINKS.aiBenchmark,
+    LINKS.communities,
     LINKS.createQuestion,
     LINKS.faq,
📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e636332 and 36bae19.

📒 Files selected for processing (2)
  • front_end/src/app/(main)/components/headers/hooks/useNavbarLinks.tsx
  • front_end/src/app/(main)/questions/components/feed_filters/main.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build Docker Image / Build Docker Image
  • GitHub Check: Backend Checks
  • GitHub Check: integration-tests
  • GitHub Check: Frontend Checks
🔇 Additional comments (3)
front_end/src/app/(main)/questions/components/feed_filters/main.tsx (3)

20-20: LGTM!

The usePublicSettings import and PUBLIC_MINIMAL_UI destructuring are correctly implemented.

Also applies to: 42-42


93-94: LGTM!

The logic correctly hides the news sort option when minimal UI mode is active while preserving the existing screen size and user state conditions.


149-154: LGTM!

The condition !mainSortNewsVisible && !PUBLIC_MINIMAL_UI correctly ensures NewsHotness appears in the dropdown only when:

  1. It's not already shown in main sort options, AND
  2. Minimal UI mode is not active

The dependency array properly includes all reactive values.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hlbmtc hlbmtc requested a review from ncarazon February 3, 2026 11:52
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🧹 Preview Environment Cleaned Up

The preview environment for this PR has been destroyed.

Resource Status
🌐 Preview App ✅ Deleted
🗄️ PostgreSQL Branch ✅ Deleted
⚡ Redis Database ✅ Deleted
🔧 GitHub Deployments ✅ Removed
📦 Docker Image ⚠️ Retained (auto-cleanup via GHCR policies)

Cleanup triggered by PR close at 2026-02-03T14:29:04Z

@hlbmtc hlbmtc merged commit 0cbacbe into main Feb 3, 2026
7 of 8 checks passed
@hlbmtc hlbmtc deleted the feat/minimal-ui-remove-comms-news branch February 3, 2026 14:29
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.

2 participants