Skip to content
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

V9 Docsite: Hide Addons tab from mobile viewports #23339

Merged

Conversation

TristanWatanabe
Copy link
Member

Current Behavior

  • Addons tab visible on mobile viewports:
    image

New Behavior

  • Addons tab now hidden on mobile viewports:

image

Related Issue(s)

Fixes #23161

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 31, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 26adba4:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented May 31, 2022

📊 Bundle size report

🤖 This report was generated against 5090df2a0e145fa2664852334e62592ec6cef5ac

@size-auditor
Copy link

size-auditor bot commented May 31, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 5090df2a0e145fa2664852334e62592ec6cef5ac (build)

/*
* Hides "Addons" button from mobile view nav.
*/
nav > button:last-child {
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels brittle to me. Storybook might change its DOM structure and then this won't work anymore.

Is it possible to use the showPanel property to disable this via Storybook's API?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah setting showPanel:false does hide the add-ons panel from showing on desktop viewports but for some reason, it still shows up as a tab in mobile viewports 😥

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Filed an issue with Storybook.

@ling1726
Copy link
Member

ling1726 commented Jun 1, 2022

The addons and canvas tabs should only be visible during the internal devloop. Apart from the fact that this happens who does it impact ?

@TristanWatanabe
Copy link
Member Author

The addons and canvas tabs should only be visible during the internal devloop. Apart from the fact that this happens who does it impact ?

Not super critical but the consensus has been that the addons tab provides no value to visitors of the docsite and only adds noise so hiding/removing it might be the way to go.

@ling1726
Copy link
Member

ling1726 commented Jun 1, 2022

The addons and canvas tabs should only be visible during the internal devloop. Apart from the fact that this happens who does it impact ?

Not super critical but the consensus has been that the addons tab provides no value to visitors of the docsite and only adds noise so hiding/removing it might be the way to go.

Do you see the addons tab when you visit the public docsite ???

@TristanWatanabe
Copy link
Member Author

The addons and canvas tabs should only be visible during the internal devloop. Apart from the fact that this happens who does it impact ?

Not super critical but the consensus has been that the addons tab provides no value to visitors of the docsite and only adds noise so hiding/removing it might be the way to go.

Do you see the addons tab when you visit the public docsite ???

Yup 😥

06003242-B8E3-4B6C-A3AD-8E2BDEC8A081

@ling1726
Copy link
Member

ling1726 commented Jun 1, 2022

Yup 😥

Ouch, is this just an iOS thing ?

image

@spmonahan
Copy link
Contributor

Ouch, is this just an iOS thing ?

No, you can see it on desktop if you shrink the width of the browser window to "mobile" size.

Copy link
Contributor

@spmonahan spmonahan left a comment

Choose a reason for hiding this comment

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

Too bad showPanel: false doesn't work for mobile viewports. This is fine by me as an interim solution and hopefully it'll be fixed upstream in Storybook soon.

@TristanWatanabe TristanWatanabe merged commit 3762d05 into microsoft:master Jun 1, 2022
@TristanWatanabe TristanWatanabe deleted the hide-addons-button branch June 1, 2022 19:51
marwan38 pushed a commit to marwan38/fluentui that referenced this pull request Jun 13, 2022
* hide add-ons button

* add showPanel:true to hide addons from desktop too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Storybook Addons panel is available on mobile-width viewports
6 participants