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

Fix issue preventing copying text out of theme storybook documentation #24135

Merged
merged 3 commits into from
Jul 29, 2022

Conversation

behowell
Copy link
Contributor

@behowell behowell commented Jul 28, 2022

Current Behavior

It is not possible to copy text out of theme documentation on these pages:

The root cause is a bug in storybook:

New Behavior

A workaround for the storybook bug is to turn off the "Show code" buttons for these stories:
image

In this case, there is nothing interesting in the code (it just shows a wrapper component like <Colors />), so there's no harm in removing it for the theme documentation. In fact, for that reason it's probably clearer to not have the "Show code" button, so this change should remain even after the underlying storybook issue is fixed.

Related Issue(s)

@behowell behowell requested a review from khmakoto July 28, 2022 22:13
@behowell behowell requested a review from a team as a code owner July 28, 2022 22:13
@behowell behowell self-assigned this Jul 28, 2022
@github-actions github-actions bot added this to the July Project Cycle Q3 2022 milestone Jul 28, 2022
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 28, 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 9bc1db9:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 28, 2022

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
78.972 kB
24.012 kB
react-alert
Alert
82.123 kB
20.499 kB
react-avatar
Avatar
48.533 kB
13.78 kB
react-avatar
AvatarGroup
138.314 kB
40.998 kB
react-avatar
AvatarGroupItem
68.248 kB
19.109 kB
react-badge
Badge
22.494 kB
7.157 kB
react-badge
CounterBadge
23.397 kB
7.449 kB
react-badge
PresenceBadge
23.947 kB
7.022 kB
react-button
Button
35.716 kB
9.503 kB
react-button
CompoundButton
42.789 kB
10.738 kB
react-button
MenuButton
38.334 kB
10.368 kB
react-button
SplitButton
45.667 kB
11.715 kB
react-button
ToggleButton
50.941 kB
10.924 kB
react-card
Card - All
67.014 kB
19.206 kB
react-card
Card
62.696 kB
18.126 kB
react-card
CardFooter
8.461 kB
3.555 kB
react-card
CardHeader
9.504 kB
3.896 kB
react-card
CardPreview
8.562 kB
3.61 kB
react-combobox
Combobox (including child components)
74.425 kB
23.999 kB
react-combobox
Dropdown (including child components)
73.938 kB
23.991 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
190.54 kB
52.487 kB
react-components
react-components: FluentProvider & webLightTheme
32.036 kB
10.577 kB
react-dialog
Dialog (including children components)
83.895 kB
25.077 kB
react-divider
Divider
16.321 kB
5.837 kB
react-image
Image
10.68 kB
4.215 kB
react-input
Input
23.554 kB
7.644 kB
react-label
Label
9.238 kB
3.815 kB
react-link
Link
12.082 kB
4.88 kB
react-menu
Menu (including children components)
117.801 kB
35.808 kB
react-menu
Menu (including selectable components)
121 kB
36.288 kB
react-overflow
hooks only
10.839 kB
4.146 kB
react-popover
Popover
105.483 kB
32.077 kB
react-portal
Portal
9.844 kB
3.677 kB
react-positioning
usePositioning
23.854 kB
8.299 kB
react-provider
FluentProvider
14.913 kB
5.658 kB
react-radio
Radio
30.481 kB
10.406 kB
react-radio
RadioGroup
14.319 kB
5.711 kB
react-select
Select
20.746 kB
7.299 kB
react-slider
Slider
26.136 kB
8.387 kB
react-spinbutton
SpinButton
44.227 kB
12.492 kB
react-spinner
Spinner
19.932 kB
6.363 kB
react-switch
Switch
26.951 kB
8.688 kB
react-text
Text - Default
11.572 kB
4.537 kB
react-text
Text - Wrappers
14.882 kB
4.977 kB
react-textarea
Textarea
23.078 kB
7.707 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
28.995 kB
6.215 kB
react-theme
Teams: Light theme
16.973 kB
4.86 kB
react-tooltip
Tooltip
44.853 kB
15.406 kB
🤖 This report was generated against 50b08528ea6ed19e13f002276fb880271771e425

@size-auditor
Copy link

size-auditor bot commented Jul 28, 2022

Asset size changes

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

Baseline commit: 50b08528ea6ed19e13f002276fb880271771e425 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 28, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1264 1201 5000
Button mount 813 798 5000
FluentProvider mount 1495 1417 5000
FluentProviderWithTheme mount 623 619 10
FluentProviderWithTheme virtual-rerender 521 515 10
FluentProviderWithTheme virtual-rerender-with-unmount 545 559 10
MakeStyles mount 1673 1737 50000
SpinButton mount 2522 2415 5000

@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Fix issue preventing copying text out of theme storybook documentation",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"comment": "Fix issue preventing copying text out of theme storybook documentation",
"comment": "fix: Fix issue preventing copying text out of theme storybook documentation.",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I fix fixed the description 👍

@behowell behowell enabled auto-merge (squash) July 29, 2022 16:36
@behowell behowell merged commit e6bec62 into microsoft:master Jul 29, 2022
@behowell behowell deleted the docs/fix-copying-theme-docs branch July 29, 2022 23:32
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]: Cannot copy token names from doc site [Bug]: Unable to copy colors from the v9 documentation
4 participants