-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
UI: Fix excessive height in TabbedArgsTable #33205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
View your CI Pipeline Execution ↗ for commit acd744a
☁️ Nx Cloud last updated this comment at |
📝 WalkthroughWalkthroughThe TabbedArgsTable story file was refactored to use proper TypeScript typing with a dedicated meta constant and StoryObj-typed story exports. A new story variant, WithContentAround, was added. The component now wraps TabsView with a styled container that sets height to fit-content. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
✨ Finishing touches
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsx (1)
1-3: Typed meta and story objects look correct; consider whetherTabsViewshould be exposed as a subcomponentUsing a typed
metawithsatisfies Meta<typeof TabbedArgsTable>plusStoryObj<typeof meta>stories is a solid upgrade and will help keep ArgsTable/TabbedArgsTable stories type‑safe. Thetabsargs wiring againstNormal/Compact/Sections.argsalso matches the component’s expected shape.Minor design question: adding
TabsViewtosubcomponentsmeans this internal layout primitive will show up in autodocs. If the intent is purely to aid debugging this layout regression, that’s fine; otherwise you might consider omitting it fromsubcomponentsto keep the public docs surface focused on ArgsTable/TabbedArgsTable.Also applies to: 5-16, 17-42
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsx(3 hunks)code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx(3 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use camelCase for variable and function names
Files:
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsxcode/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Enable TypeScript strict mode
Export functions from modules for testing purposes
Files:
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsxcode/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx
**/*.{ts,tsx,js,jsx,json,html,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx,js,jsx,json,html,mjs}: Use ESLint and Prettier for code style enforcement
Run 'yarn prettier --write ' to format code after making changes
Run 'yarn lint:js:cmd ' to check for ESLint issues after making changes
Files:
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsxcode/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx
code/**/!(*.test).{ts,tsx,js,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
code/**/!(*.test).{ts,tsx,js,mjs}: Use 'logger' from 'storybook/internal/node-logger' for server-side (Node.js) logging, not console.log/console.warn/console.error
Use 'logger' from 'storybook/internal/client-logger' for client-side (browser) logging, not console.log/console.warn/console.error
Do not use console.log, console.warn, or console.error directly unless in isolated files where importing loggers would significantly increase bundle size
Files:
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsxcode/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/tooltip/WithTooltip.tsx:54-96
Timestamp: 2025-11-05T09:37:25.920Z
Learning: Repo: storybookjs/storybook — In code/core/src/components/components/tooltip/WithTooltip.tsx, the legacy WithTooltip implementation is intentionally reintroduced for backward compatibility and is deprecated; maintainers (per Sidnioulz) do not want maintenance or improvements on it. Prefer WithTooltipNew/Popover; avoid suggesting changes to WithTooltip.* going forward.
⏰ 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). (2)
- GitHub Check: normal
- GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (2)
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx (1)
6-7: ScopedTabsViewheight override matches the layout bugfix intentWrapping
TabsViewinStyledTabsViewwithheight: 'fit-content'keeps the change local toTabbedArgsTableand should prevent the args table from occupying full viewport height in DocsPage while leaving otherTabsViewusages untouched. The props are transparently forwarded, so behavior is preserved aside from the height rule.One thing to keep an eye on is the zero‑tab case (used by the
Emptystory):tabsFromEntriescan still be[]and is passed through unchanged. That’s pre‑existing behavior, but worth confirming thatTabsViewcontinues to handle an emptytabsarray gracefully with the new style applied.Also applies to: 17-19, 43-43
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsx (1)
44-59:WithContentAroundstory is a good targeted repro for layout issuesThe
WithContentAroundstory correctly reuses the sametabsargs and wrapsTabbedArgsTablewith surrounding content, which should make the excessive‑spacing bug easy to see and verify in isolation. The customrenderimplementation is straightforward and aligns with StoryObj typing.
UI: Fix excessive height in TabbedArgsTable (cherry picked from commit 82bd4ea)
Closes #33196
What I did
Set TabsView height to fit content in TabbedArgsTable. I chose to do that rather than edit TabsView because the height: 100% really helps with ensuring ScrollArea correctly works. If you remove it, for instance, you'll see the secondary TabsView in the A11y addon panel stops scrolling.
My reasoning is it's a lot easier to notice and debug an excessive height in the UI than it is to debug and notice an incorrect scroll behaviour.
We were missing stories to notice and diagnose this specific case, so I added them. Interestingly, the bug only occurs in DocsPage and not in standalone stories. I added an autodocs with TabbedArgsTable on the TabbedArgsTable stories so we have a repro case, even though it won't be covered by smoke tests.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Visit http://localhost:6006/?path=/docs/addons-docs-blocks-components-argstable-tabbedargstable--docs
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit
Style
Tests
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.