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

Rename package from office-ui-fabric-react to @fluentui/react #14789

Closed
xugao opened this issue Aug 27, 2020 · 0 comments
Closed

Rename package from office-ui-fabric-react to @fluentui/react #14789

xugao opened this issue Aug 27, 2020 · 0 comments

Comments

@xugao
Copy link
Contributor

xugao commented Aug 27, 2020

As the Fabric brand has evolved to Fluent UI, we're getting close to a new major release, and as such we have a few things you can help with to prepare to upgrade:

  • Rename your dependencies and imports from office-ui-fabric-react to @fluentui/react
  • Fix deep imports if you have them

Package rename details

We've updated our component package name from office-ui-fabric-react to @fluentui/react. Today we publish both names in lock step, giving you a way today to update your imports without any additional changes.

In our upcoming version 8 release, we are planning to discontinue publishing both names in lock step, so there will not be v8 of the office-ui-fabric-react package and only the current package name @fluentui/react will be moving forward with version 8+.

We strongly recommend updating your imports now, before we release our next major. This will ensure you are able to continue receiving updates in the future.

As always we will still take patches and minor fixes to office-ui-fabric-react@7 in a branch on demand, same as v5 and v6.

Deep imports: what are they, why are they bad?

Some partners have deep imports into the current Fabric package; for example:

import { ActionButton } from 'office-ui-fabric-react/lib/components/Button/ActionButton/ActionButton';

This has never been supported officially, as we've always recommended to use either the package import or a "top level import" meaning a file directly under the /lib/ path.

import { ActionButton } from '@fluentui/react'; // Good
import { ActionButton } from '@fluentui/react/lib/Button'; // Also good

We cannot guarantee any deep import will continue working across major releases. They will break any time any given file is moved, renamed, or even when the casing is changed. This would create a massive surface contract that we are not able to support.

If you have deep imports in your product, please update them now to only use package or top-level imports. (And please, let us know if you depend on something that is not exported. We can fix that.)

If you have any questions/concerns, please let us know. We are here to help!

See #15152 for specific work items for the rename.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants