-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
RFC: Support for Fluent UI contrib packages #27480
Open
ling1726
wants to merge
18
commits into
microsoft:master
Choose a base branch
from
ling1726:rfc/second-party-packages
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1d45cf2
RFC: Support for components in the Fluent UI umbrella that are not core
ling1726 c791c44
Update rfcs/react-components/non-core-components.md
ling1726 9878bde
Update rfcs/react-components/non-core-components.md
ling1726 6cb2b84
Update rfcs/react-components/non-core-components.md
ling1726 fb2a711
Update rfcs/react-components/non-core-components.md
ling1726 d32363f
Update rfcs/react-components/non-core-components.md
ling1726 edf4ace
Update rfcs/react-components/non-core-components.md
ling1726 69079d9
add table of contents
ling1726 71414fc
updates based on review
ling1726 1adf5bb
updates based on review
ling1726 b788ab2
Updates based on feedback
ling1726 e36421e
update toc
ling1726 d537782
single proposal for code hosting and publishing
ling1726 36c5784
extra point
ling1726 8d1e30a
update doctoc
ling1726 90afb7b
formatting
ling1726 11827e2
improve reusable tooling proposal
ling1726 3280c49
Add monorepo solution
ling1726 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -230,128 +230,59 @@ for OSS authors that want to extend the library. This recommendation is made to | |||||
We can look at a case by case basis if more concrete dependencies on the core library are needed. This policy should | ||||||
be enforced by automation that needs to be disabled in the cases where stricter dependencies are necessary. | ||||||
|
||||||
### | ||||||
|
||||||
### Packages scope and hosting | ||||||
|
||||||
#### Option 1: Current monorepo using existing scope | ||||||
|
||||||
All extension packages will use the same `@fluentui/` scope. Two new prefixes will be introduced: | ||||||
|
||||||
- `@fluentui/labs-` - For experimental packages that need validating - replacement for pre-release tags | ||||||
- `@fluentui/contrib-` - For official extensions to the core library | ||||||
|
||||||
##### Pros | ||||||
|
||||||
- 👍 Easier setup | ||||||
- 👍 Nothing new to learn | ||||||
- 👍 Extension packages always use latest code | ||||||
- 👍 Issue reporting path does not change | ||||||
#### New package scope | ||||||
|
||||||
##### Cons | ||||||
|
||||||
- 👎 We might not want the same release cadence - releasing a fix for a extension component would release all of core | ||||||
- 👎 More release script work | ||||||
- 👎 Extra load on the CI as more extension components are needed | ||||||
- 👎 Not possible to have more separation from core components without lots of tooling hacks | ||||||
- 👎 Issue reporting path does not change | ||||||
|
||||||
#### Option 2: New package scope and monorepo | ||||||
A new scope `@fluentui-contrib/` will be created for extension packages that will be a part of the Fluent umbrella. | ||||||
However these packages are not considered a part of the core library. These packages must follow the requirements | ||||||
mentioned earlier above. | ||||||
|
||||||
Creates a new package scope, `@fluentui-contrib/` for all components/packages that are extensions. All packages | ||||||
with this new scope will be hosted in a separate monorepo. | ||||||
#### Self code hosting | ||||||
|
||||||
##### Pros | ||||||
Code for `@fluentui/contrib` packages should be self hosted. The Fluent UI team will provide bootstraping utilities | ||||||
for contributors to set up their repositories and have: | ||||||
|
||||||
- 👍 Very clear differentiation between core and extension | ||||||
- 👍 Creates a clear boundary for FUI team and partners to collaborate | ||||||
- 👍 Clear path to upgrade/downgrade packages between core and extension (i.e. experiments/compat) | ||||||
- build | ||||||
- type check | ||||||
- linting | ||||||
- unt tests | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- browser tests | ||||||
- playground/storybook | ||||||
- publishing | ||||||
|
||||||
##### Cons | ||||||
We plan to leverage [NX](https://nx.dev/) which supports migrations, so that any updates made to build infra should | ||||||
be easy to consume by partners' repositories. | ||||||
|
||||||
- 👎 Need to bump core dependencies | ||||||
- 👎 Need to maintain a new NPM organization and credentials | ||||||
- 👎 Initially could cause some confusion if we don't communicate this well | ||||||
This build and infra should be aligned towards our ideal goal for the Fluent UI monorepo to avoid diverging. This will | ||||||
also ensure that partners can easily consume all the improvements the Fluent UI build team deliver. | ||||||
|
||||||
### Documentation | ||||||
#### Documentation federation | ||||||
|
||||||
Fluent UI production components should always be documented regardless of whether they are core/extension components. | ||||||
This section describes the ways to document extension components. | ||||||
The repo scaffolding tools that we intend to create should setup a storybook infrastructure. We can leverage | ||||||
storybook federation so that all documentation for contributor packages will be visible from the Fluent UI docsite. | ||||||
|
||||||
#### Current docsite | ||||||
#### Publish credentials | ||||||
|
||||||
Create a new section in our docsite explicitly for extension components alongside core components. | ||||||
The Fluent UI team will be responsible for distributing publishing credentials to contributors that want to publish | ||||||
packages under the `@fluentui-contrib/` scope. NPM allows [creating granular access tokens](https://docs.npmjs.com/creating-and-viewing-access-tokens) that can be scoped for specific packages. | ||||||
|
||||||
##### Pros | ||||||
|
||||||
- 👍 Existing infrastructure already setup | ||||||
- 👍 Enforces consistent documentation approach | ||||||
|
||||||
##### Cons | ||||||
|
||||||
- 👎 Do we want to document extension components in the same way? | ||||||
- 👎 For separate repo, would need to think about how to consume stories | ||||||
- 👎 Needs work to support independently versioned packages | ||||||
|
||||||
#### New docsite | ||||||
|
||||||
Creates a new docsite for extension components that will be linked to the current docsite. | ||||||
|
||||||
##### Pros | ||||||
|
||||||
- 👍 It's not hard to link between docsites that share the same look and feel | ||||||
- 👍 Clear boundary for users to distinguish core/extension components | ||||||
- 👍 Possible to change documentation approach | ||||||
|
||||||
##### Cons | ||||||
In order for a contributor to publish their code, they must submit a request to the Fluent UI team for access credentials | ||||||
which should be given after a review of: | ||||||
|
||||||
- 👎 Manage the infra for another domain and publish | ||||||
- 👎 Needs work to support independently versioned packages | ||||||
- Design spec | ||||||
- Code/API architecture | ||||||
- Repo build and infra | ||||||
|
||||||
### Partner code hosting | ||||||
#### Pros/Cons | ||||||
|
||||||
Partner teams might want to build scenario/product specific components, with guidance and support from the Fluent UI | ||||||
team. The Fluent UI team should have a say in the quality of the code that is shipped by partner teams under the | ||||||
Fluent UI umbrella and work with them to establish these quality criteria and ownership. This section proposes | ||||||
two different ways we should host partner code. | ||||||
|
||||||
#### GitHub | ||||||
|
||||||
##### Pros | ||||||
|
||||||
- 👍 Get different organizations in microsoft directly involved in open source | ||||||
|
||||||
##### Cons | ||||||
|
||||||
- 👎 Access management and compliance boundaries will be complicated | ||||||
- 👎 Figure out how to make sure partners maintain their projects properly | ||||||
|
||||||
#### ADO mirroring | ||||||
|
||||||
Partner teams can continue to host their code in respective ADO repositories and we host a mirror for their | ||||||
code in GitHub so that it is visible in open source for issue reporting and third party extensionutions. | ||||||
|
||||||
##### Pros | ||||||
|
||||||
- 👍 Already done in open source - React does this | ||||||
- 👍 Partners can stick to the tools they know but still have open source presence | ||||||
|
||||||
##### Cons | ||||||
|
||||||
- 👎 Complicated infra work | ||||||
- 👎 Potentially less accountability for partner teams that do this | ||||||
|
||||||
#### Both | ||||||
|
||||||
We let partner teams decide how they would like to participate in creating official Fluent powered components. | ||||||
|
||||||
##### Pros | ||||||
|
||||||
- 👍 Everybody is happy and can have a presence in open source | ||||||
- 👍 Maximum microsoft coverage for open source | ||||||
|
||||||
##### Cons | ||||||
👍 Fluent UI allows partners to iterate quickly | ||||||
👍 Fluent UI will make the final decision on requirements before publishing | ||||||
👍 Easy way to track large numbers of contributor packages - must request publishing permission | ||||||
👍 Partners can setup 'ready to publish' repository easily | ||||||
👍 Partners can use whatever code platform they want | ||||||
👍 Documentation will be in one place (Fluent UI docsite) | ||||||
|
||||||
- 👎 Cons of both solutions | ||||||
- 👎 More work | ||||||
- 👎 Figure out how to make sure partners maintain their projects properly | ||||||
👎 Work needed to implement build/infra that can be shared | ||||||
👎 Need to maintain build/infra | ||||||
👎 Fluent UI team needs to be proactive maintaining links to contributors |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these bootstrapping utilities have an update path? If Fluent improves the pipelines/storybook/etc. can we ensure downstream bootstrappers can easily update to get new behavior also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it's what is mentioned with the intention to use NX to work on these bootstrapping utilities, since the tool supports migrations which can be run when upgrading