Skip to content

Pass active tab to tabs partial view#2098

Merged
Oaphi merged 10 commits into
developfrom
trichoplax/indicate-active-tab-on-user-page
Jul 19, 2026
Merged

Pass active tab to tabs partial view#2098
Oaphi merged 10 commits into
developfrom
trichoplax/indicate-active-tab-on-user-page

Conversation

@trichoplax

@trichoplax trichoplax commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Main change

This passes the name of the active tab to the partial view app/views/users/_tabs.html.erb to remove the need for each tab to check the current page to decide if it should show as active.

This is a fairly trivial change at this stage, but will become more useful in #2063 where a Moderator Tools tab will be introduced that needs to show as active for 11 different URLs.

Additional changes

This pull request also includes other changes triggered by working on the tabs:

  • The Subscriptions page (for emails) had the tabs along the top, but wasn't listed among them, resulting in an odd look with no active tab. I've added a tab for Subscriptions to fix this, and removed the right hand panel for consistency with the other tabs.
  • The tabs now take up enough horizontal space that reading through them takes a while and they run on to two lines on smaller screens or at higher zoom levels. I've reduced their width with the following changes:
    • Removed the icon from the "Profile" tab.
    • Changed "Vote Summary" to "Votes".
    • Changed "Notifications" to "Inbox".
    • Changed "Subscriptions" to "Email".
    • Changed "All Communities" to "Network".

Let me know if you'd prefer the Subscriptions page to be an independent page with no tabs along the top, or if you'd prefer to avoid any of these width reducing changes.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.93%. Comparing base (1aa4379) to head (a32fc40).

Additional details and impacted files
Components Coverage Δ
controllers 76.73% <100.00%> (+<0.01%) ⬆️
helpers 85.47% <ø> (ø)
jobs 77.43% <ø> (ø)
models 93.14% <ø> (ø)
tasks 61.11% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trichoplax
trichoplax requested review from Oaphi and cellio July 16, 2026 14:51

@cellio cellio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Ran through the tabs at both desktop and phone sizes.

Comment thread app/views/users/_tabs.html.erb Outdated
@Oaphi
Oaphi self-requested a review July 19, 2026 01:09
@Oaphi
Oaphi merged commit 74ad58b into develop Jul 19, 2026
14 checks passed
@Oaphi
Oaphi deleted the trichoplax/indicate-active-tab-on-user-page branch July 19, 2026 01:10
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.

4 participants