Skip to content

chore: make plugin tabs scrollable#3054

Open
yashmehrotra wants to merge 1 commit into
mainfrom
plug-tab
Open

chore: make plugin tabs scrollable#3054
yashmehrotra wants to merge 1 commit into
mainfrom
plug-tab

Conversation

@yashmehrotra

@yashmehrotra yashmehrotra commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Config tabs now support horizontal scrolling, making it easier to access all tabs on smaller screens.
    • Plugin-provided tabs now appear directly in the main tab list alongside built-in tabs.
  • Bug Fixes

    • The active tab is kept in view when switching between tabs, improving navigation on long tab rows.

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aws-preview Ready Ready Preview Jun 30, 2026 10:37am
flanksource-ui Ready Ready Preview Jun 30, 2026 10:37am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bffd6e01-382b-483c-899a-aaada213f139

📥 Commits

Reviewing files that changed from the base of the PR and between 7aba656 and 5f646f6.

📒 Files selected for processing (4)
  • src/components/Configs/ConfigDetailsTabs.tsx
  • src/components/Configs/ConfigPluginsDropdown.tsx
  • src/components/Configs/ConfigTabsLinks.tsx
  • src/ui/Tabs/TabbedLinks.tsx
💤 Files with no reviewable changes (1)
  • src/components/Configs/ConfigPluginsDropdown.tsx

Walkthrough

ConfigPluginsDropdown is deleted. Plugin tabs are now fetched directly inside useConfigDetailsTabs via a new useQuery call and merged into the returned tab list. TabbedLinks gains an optional scrollable prop that enables horizontal overflow and auto-scrolls the active tab into view. ConfigDetailsTabs removes the dropdown and sets scrollable on TabbedLinks.

Changes

Plugin tabs inlined + scrollable tab bar

Layer / File(s) Summary
TabbedLinks scrollable prop and scroll-into-view effect
src/ui/Tabs/TabbedLinks.tsx
Adds optional scrollable prop (default false); switches container to overflow-x-auto single-row layout when enabled; adds a useEffect/useRef to scrollIntoView the [aria-current="page"] tab on navigation; adds shrink-0 whitespace-nowrap to each NavLink when scrollable.
Plugin tabs fetched inside useConfigDetailsTabs
src/components/Configs/ConfigTabsLinks.tsx
Imports getPluginsForConfig, pluginTabKey, pluginTabPath, and PluginIcon; adds a useQuery keyed on ["config","plugins",id] to load plugins; computes pluginTabs entries; merges [...viewTabs, ...staticTabs, ...pluginTabs] unconditionally, removing the prior staticTabs-only branch.
Remove ConfigPluginsDropdown, wire scrollable
src/components/Configs/ConfigDetailsTabs.tsx, src/components/Configs/ConfigPluginsDropdown.tsx
Deletes the entire ConfigPluginsDropdown component file; removes its import and extraTabs prop from ConfigDetailsTabs; adds scrollable to the TabbedLinks JSX.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: making plugin tabs scrollable.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch plug-tab
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch plug-tab

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.

@yashmehrotra

Copy link
Copy Markdown
Member Author
image

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