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(react-message-bar): force links to be underlined #32850

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mainframev
Copy link
Contributor

@mainframev mainframev commented Sep 17, 2024

According to design spec links inside MessageBar should be underlined

Previous Behavior

image

New Behavior

image

Related Issue(s)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 17, 2024

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.1 MB
272.019 kB
1.1 MB
272.079 kB
178 B
60 B
react-link
Link
17.192 kB
6.98 kB
17.327 kB
7.032 kB
135 B
52 B
react-message-bar
MessageBar (all components)
24.722 kB
9.205 kB
24.805 kB
9.24 kB
83 B
35 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-breadcrumb
@fluentui/react-breadcrumb - package
113.699 kB
31.498 kB
react-components
react-components: Button, FluentProvider & webLightTheme
69.14 kB
20.137 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
218.317 kB
63.258 kB
react-components
react-components: FluentProvider & webLightTheme
44.447 kB
14.59 kB
react-portal-compat
PortalCompatProvider
8.39 kB
2.64 kB
react-timepicker-compat
TimePicker
107.387 kB
35.758 kB
🤖 This report was generated against 441012aee100cd7cf77801e7f5c757ff6942e645

@mainframev mainframev requested a review from a team September 17, 2024 10:31
@mainframev mainframev changed the title fix(react-message-bar): update examples to have underlined links fix(react-message-bar): force links to be underlined Sep 18, 2024
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 18, 2024

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 650 612 5000
Button mount 317 300 5000
Field mount 1137 1142 5000
FluentProvider mount 707 751 5000
FluentProviderWithTheme mount 81 78 10
FluentProviderWithTheme virtual-rerender 41 41 10
FluentProviderWithTheme virtual-rerender-with-unmount 77 84 10
MakeStyles mount 881 857 50000
Persona mount 1808 1759 5000
SpinButton mount 1387 1412 5000
SwatchPicker mount 1700 1649 5000

@@ -0,0 +1,7 @@
{
Copy link
Collaborator

@fabricteam fabricteam Sep 18, 2024

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.badgeMask.chromium.png 11 Changed
Avatar Converged.Badge Mask RTL.chromium.png 5 Changed
Drawer 1 screenshots
Image Name Diff(in Pixels) Image Type
Drawer.overlay drawer full.chromium.png 1162 Changed
MessageBar 9 screenshots
Image Name Diff(in Pixels) Image Type
MessageBar.Multiline Without Actions.chromium.png 67 Changed
MessageBar.Intents.chromium.png 67 Changed
MessageBar.Multiline No Actions.chromium.png 67 Changed
MessageBar.Auto.chromium.png 17 Changed
MessageBar.Multiline.chromium.png 67 Changed
MessageBar.Intents RTL.chromium.png 67 Changed
MessageBar.Intents High Contrast.chromium.png 91 Changed
MessageBar.Square.chromium.png 17 Changed
MessageBar.Intents Dark Mode.chromium.png 46 Changed

@marcosmoura
Copy link
Contributor

This might be unrelated to this PR. But I am wondering if all links should be underlined in the context of the Design System. If that's the case, maybe it would be worth exploring if we can make this change to the @fluentui/react-link package itself?

Copy link
Member

@ling1726 ling1726 left a comment

Choose a reason for hiding this comment

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

These kinds of selectors are costy and also fragile - they depend on the styles of the component. Let's introduce a context for this if it only applies to MessageBar. Similar to https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-avatar/library/src/contexts/AvatarContext.ts

};

export const MessageBarBodyContextProvider = messageBarContext.Provider;
export const useMessageBarBodyContext = () => React.useContext(messageBarContext) ?? messageBarBodyContextDefaultValue;
Copy link
Member

Choose a reason for hiding this comment

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

It should be inverted i.e. react-link has a context provider as in future another component can also tweak Link's behavior

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right, makes sense, updated 👍🏻

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]: Links should be underlined in MessageBar
5 participants