Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

refactor: finish stardust to fluent rename #2165

Merged
merged 15 commits into from Dec 12, 2019
Merged

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Dec 11, 2019

Breaking Changes

This PR only renames "Stardust UI" to "Fluent UI", including all variants. No other changes were made.

createComponent()

  1. ✏️ Rename the render() callback param key from stardust to config:
    import { createComponent } from '@fluentui/react'
    
    createComponent({
    -   render({ stardust }) => {},
    +   render({ config }) => {},
    })
  2. ✏️ Rename the typing CreateStardustComponentConfig to CreateComponentConfig.
  3. ✏️ Rename the typing RenderStardustResultConfig to CreateComponentRenderConfig.
  4. ✏️ Rename the className of the returned component from ui-stardust-component to fluent-ui-component.

💡 The displayName of the returned component was renamed from StardustComponent to FluentUIComponent. It is unlikely that your code relied on this displayName but we're including it here for completeness.

Theme

  1. ✏️ Rename the StardustAnimationName typing to AnimationName.
  2. ✏️ If you have a custom theme that maps required icon names to your icon names, the required icon names have changed their prefix from stardust-* to icon-*:
    const myTheme: ThemePrepared = createTheme({
      ...
      icons: {
    -  'stardust-checkmark': { isSvg: boolean, icon: SvgIconSpec },
    +  'icon-checkmark': { isSvg: boolean, icon: SvgIconSpec },
      ...
    }, 'my-theme')

Debug

✏️ Rename window.localStorage.stardustDebug to window.localStorage.fluentUIDebug, if you had enabled debug.


This PR finishes the work by renaming Stardust references to Fluent UI. We've renamed the repo and packages. We've also published the docs and packages under the new Fluent UI and @fluentui name.

@levithomason levithomason changed the title refactor: rename stardust to fluent refactor: finish stardust to fluent rename Dec 11, 2019
@@ -25,7 +26,7 @@

Make sure you have [Node.js][1] version v8 or later installed.

You can contribute to Stardust by being an official [contributor](setup-local-development.md#contributors) or without permissions, as a [collaborator](setup-local-development.md#collaborators)
You can contribute to FluentUI by being an official [contributor](setup-local-development.md#contributors) or without permissions, as a [collaborator](setup-local-development.md#collaborators)
Copy link
Member

Choose a reason for hiding this comment

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

Curious of the reasoning for using FluentUI rather than Fluent UI? I know that more directly matches the scope name, but I thought the lack of a dash in the scope name was just an unfortunate artifact of fluent-ui being taken already.

Copy link
Member Author

Choose a reason for hiding this comment

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

Per Joseph McLaughlin, they got a lot of feedback on the FluentUi initial idea and they changed the official guidance. It is now officially Fluent UI. 👍

He said he'd make an official announcement to the internal team today. Not sure if it happened yet. I do have the design guidance PDF if you'd like a copy 😄

import { WithAsProp, withSafeTypeForAs } from '../../types'

export interface ProviderBoxProps
extends UIComponentProps<ProviderBoxProps>,
ContentComponentProps,
ChildrenComponentProps {}

const ProviderBox = createComponent<WithAsProp<ProviderBoxProps>>({
const ProviderBox = createComponentPrivate<WithAsProp<ProviderBoxProps>>({
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
const ProviderBox = createComponentPrivate<WithAsProp<ProviderBoxProps>>({
const ProviderBox = createComponentInternal<WithAsProp<ProviderBoxProps>>({

className = 'ui-stardust-component',
const createComponentPrivate = <P extends ObjectOf<any> = any>({
displayName = 'FluentComponent',
className = 'fluent-ui-component',
Copy link
Member

Choose a reason for hiding this comment

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

breaking change

'stardust-pause': themeIcons['pause'],
'stardust-play': themeIcons['play'],
'icon-checkmark': themeIcons['accept'],
'icon-circle': themeIcons['icon-circle'],
Copy link
Member

Choose a reason for hiding this comment

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

Not sure I understand this line

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like this is a teams theme icon literally named iconCircle.

See packages/react/src/themes/teams/components/Icon/svg/icons/iconCircle.tsx

@levithomason levithomason merged commit 73e7a7a into master Dec 12, 2019
@levithomason levithomason deleted the docs/rename-to-fluent branch December 12, 2019 23:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants