Skip to content

Dev tab - Don't render empty sections or the tab #3600

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

Merged
merged 2 commits into from
Mar 12, 2025
Merged

Conversation

Inbal-Tish
Copy link
Collaborator

Description

Dev tab - Don't render empty sections or the tab:
No usage without snipper, no banner without description and no Dev tab without props

Changelog

Dev tab - Don't render empty sections or the tab

Additional info

Comment on lines +63 to +68
const api = component.props;
const tabsArray = api ? [...tabs, devTab] : tabs;

// TODO: align Tabs bottom border with TabItem's selected indication line
if (tabs) {
return <Tabs className="main-tabs">{getTabItems([...tabs, devTab])}</Tabs>;
return <Tabs className="main-tabs">{getTabItems(tabsArray)}</Tabs>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we remove Dev tab based on props, it won't render things like notes and tips, no?
Which component/page has this issue (has no api)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's why I based it on the props - that the most important feature that without it I don't think we need the tab.
Can you think of a case where we don't have props but need to display the extend/modifiers/snippet?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not really, approving, worse case we'll change it

@ethanshar ethanshar assigned Inbal-Tish and unassigned ethanshar Mar 12, 2025
@Inbal-Tish Inbal-Tish assigned ethanshar and unassigned Inbal-Tish Mar 12, 2025
@ethanshar ethanshar merged commit f0fa1db into master Mar 12, 2025
1 check passed
@ethanshar ethanshar deleted the docs/fix_Dev_tab branch March 12, 2025 08:01
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.

2 participants