feat(soup): collapsible view tabs with dropdown fallback#2133
feat(soup): collapsible view tabs with dropdown fallback#2133evanhutnik merged 3 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe changes consolidate per-view tab components into a shared Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx (1)
225-229: 🧹 Nitpick | 🔵 TrivialRedundant
typeofchecks - items are always objects.Given
list: { value: string; label: string }[], eachitemis always an object. Thetypeof item === 'object'ternary condition is always true, making the else branches dead code.♻️ Simplify item accessors
- const itemValue = () => - typeof item === 'object' ? item.value : item; - const itemLabel = () => - typeof item === 'object' ? item.label : item; + const itemValue = () => item.value; + const itemLabel = () => item.label;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx` around lines 225 - 229, The itemValue and itemLabel accessors contain redundant typeof checks because items are typed as { value: string; label: string } and thus always objects; replace the ternary expressions in the itemValue and itemLabel arrow functions to directly return item.value and item.label respectively (update the anonymous render callback where itemValue and itemLabel are declared) and remove the dead else branches so the accessors are simpler and align with the list type.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx`:
- Around line 225-229: The itemValue and itemLabel accessors contain redundant
typeof checks because items are typed as { value: string; label: string } and
thus always objects; replace the ternary expressions in the itemValue and
itemLabel arrow functions to directly return item.value and item.label
respectively (update the anonymous render callback where itemValue and itemLabel
are declared) and remove the dead else branches so the accessors are simpler and
align with the list type.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: eb2324c1-9b00-45f9-aab2-cd77b3324cbc
📒 Files selected for processing (2)
js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsxjs/app/packages/app/component/next-soup/soup-view/soup-view.tsx
Summary
SoupViewTabsin aCollapsibleHeaderItemso tabs automatically collapse into a compact dropdown when the header runs out of horizontal spacepriority: 1(after the search bar atpriority: 0)Old (Desktop):


New (Desktop):
Old (Mobile):


New (Mobile):