fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

RFC appearance migration

Open petdud opened this issue 3 years ago • 3 comments
trafficstars

Current Behavior

Fluent V9 changes the default appearance of input components (Dropdown, Input, TextArea). V0 input components default background color is grey-ish, whereas in V9 the background color is white.

New Behavior

This RFC explores potential solutions for partners, so they could migrate input components to V9 without the extra work of adding an additional prop to input components.

Partners should also easily revert the decision to the default appearance value if they decide so, without changing inputs individually.

👀 PREVIEW

petdud avatar Aug 02 '22 11:08 petdud

📊 Bundle size report

🤖 This report was generated against 347e2f68a22630b6de882ef032e5a42695b64774

fabricteam avatar Aug 02 '22 11:08 fabricteam

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 913adc9f78a4caa10f65513655c17f07bd342c8a:

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

codesandbox-ci[bot] avatar Aug 02 '22 11:08 codesandbox-ci[bot]

Asset size changes

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

Baseline commit: c02b44a98770f8d9da499dbacadcf377eb5efb45 (build)

size-auditor[bot] avatar Aug 02 '22 11:08 size-auditor[bot]

IMO this should not have an impact in FluentUI, so it's a big no for New token alias to theme.

Both Composed component and Wrap the library components on application side seems like a bad idea for the Nova component, although both sound like sound choices for an application POV.

Global css selector sounds like a hack.

Unify design sounds like the way to go forward here, but it's no go for the design team 🙈.

I'm kind of thorn here 😅. I'd still go for Composed component or Wrap the library components on application side, but I have no idea how to solve this for Nova

bsunderhus avatar Aug 23 '22 13:08 bsunderhus

If we want to affect all components in a tree we can go only with "New token" or "CSS selector". I also proposed "React Context" option to determine defaults. IMO it has some benefits as it affects React's behavior.

layershifter avatar Aug 24 '22 11:08 layershifter

I also proposed "React Context" option to determine defaults.

Added pros and cons.

miroslavstastny avatar Sep 12 '22 07:09 miroslavstastny

Because this pull request has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

The pull request will still be available for reference. If it's still relevant to merge at some point, you can reopen or make a new version based on the latest code.

msft-fluent-ui-bot avatar Feb 12 '23 18:02 msft-fluent-ui-bot

React context solution was implemented in #25262. The RFC has been updated to document the implemented solution.

miroslavstastny avatar May 08 '23 21:05 miroslavstastny