feat: convert NuVs export scope selector to a tabs widget#1085
Conversation
The Contigs/ORFs scope selector in the NuVs export dialog is now an accessible tabs widget (WAI-ARIA tabs pattern) instead of a toggle group, with each option's preview shown in its tab panel. Add a Radix-backed Tabs primitive to src/base (Tabs/TabsList/ TabsTrigger/TabsContent) with segmented and vertical variants, and adopt it in NuvsExport, CreateAnalysis, QuickAnalyze, and Groups, removing the duplicated inline Radix styling. The existing route-navigation Tabs/TabsLink components are renamed to NavTabs/NavTab to free the Tabs name. Also correct the contig export filename suffix (was "configs").
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
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. Comment |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In
AdministrationTabs, the children are passed toNavTabsas{...tabs}, which will spread the array as props instead of rendering the elements; this should be{tabs}to correctly render the tab list. - The
verticalvariant inTabshardcodes agrid-cols-4layout on the root, which may be inflexible for future layouts (e.g., different column ratios or additional panels); consider making the grid configuration customizable via props or class overrides.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `AdministrationTabs`, the children are passed to `NavTabs` as `{...tabs}`, which will spread the array as props instead of rendering the elements; this should be `{tabs}` to correctly render the tab list.
- The `vertical` variant in `Tabs` hardcodes a `grid-cols-4` layout on the root, which may be inflexible for future layouts (e.g., different column ratios or additional panels); consider making the grid configuration customizable via props or class overrides.
## Individual Comments
### Comment 1
<location path="apps/web/src/administration/components/AdministrationTabs.tsx" line_range="25" />
<code_context>
}
- return <Tabs>{...tabs}</Tabs>;
+ return <NavTabs>{...tabs}</NavTabs>;
}
</code_context>
<issue_to_address>
**issue (bug_risk):** Using `{...tabs}` here spreads the array as props instead of rendering the tab elements as children.
`{...tabs}` spreads each array entry as a separate prop on `NavTabs`, which is incorrect and likely to cause a runtime error. To render the tab elements, you should pass them as children:
```tsx
return <NavTabs>{tabs}</NavTabs>;
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
Tabsprimitive tosrc/base(Tabs/TabsList/TabsTrigger/TabsContent) withsegmentedandverticalvariants, and adopt it inNuvsExport,CreateAnalysis,QuickAnalyze, andGroups— removing the previously duplicated inline Radix styling. The existing route-navigationTabs/TabsLinkare renamed toNavTabs/NavTabto free theTabsname.configs) and add tests covering tab switching and both export download paths.