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

Merge OUFR and react-next into react #15152

Closed
6 of 7 tasks
ecraig12345 opened this issue Sep 21, 2020 · 1 comment · Fixed by #15515
Closed
6 of 7 tasks

Merge OUFR and react-next into react #15152

ecraig12345 opened this issue Sep 21, 2020 · 1 comment · Fixed by #15515

Comments

@ecraig12345
Copy link
Member

ecraig12345 commented Sep 21, 2020

This is part 1/4 in a series of changes that will happen in master after v7 development moves to a branch, but before beta publishing:

  1. (this) Merge OUFR and react-next into react #15152 OUFR/react-next merge
  2. Re-export date-time components from react #14679 Move date-time components
  3. Move @uifabric packages under @fluentui scope #13384 uifabric/fluentui package renames
  4. Set up beta releases #14689 set up beta releases

This will be done across multiple PRs, and some of the work can be split up between multiple people.

  • Merge OUFR into react (1 person)
  • Merge react-next into react (last chance to review FC changes). This can be split into groups of components to be done by different people. (EDIT: This was WAY more complicated than expected--see comment below.)
  • Delete OUFR and update code references to react-next
  • Either delete react-next or make it into a pure re-export package from react (and bump version to 9-alpha)
  • Update gitignore so that removed files don't come back in a bad merge
  • Update code references to react-next
  • Delete "next" versions of vr/perf tests
@ecraig12345
Copy link
Member Author

ecraig12345 commented Oct 15, 2020

The "merge react-next into react" step ended up being WAY more complicated than expected. Here's the procedure and tracking we used (leaving it here for reference for future releases)...


If the v7 component implementation is in react-internal (most components), the react-next implementation should be moved to react-internal (NOT react). In the steps, react(-internal) means whichever of the two packages is appropriate for your component.

Full steps:

  1. Move the component code and tests from react-next to react(-internal). Steps:
    1. Find where the v7 component is currently located (either react-internal or react) and delete the whole folder react(-internal)/src/components/ComponentName.
    2. Move the whole folder react-next/src/components/ComponentName to react(-internal)
    3. Update any react-next or react imports in the moved code to relative imports. If it's in react-internal also change those to relative imports. (A few things must still be deep-imported from react-internal; we'll fix this later.)
  2. Update the component's root file in react-next (e.g. react-next/src/Fabric.ts) to re-export from @fluentui/react/lib/ComponentName
  3. Delete any *Next perf-tests or vr-tests for the component
  4. Delete react-examples/src/react-next/ComponentName/docs (they should be exact duplicates; even if they're not, the react versions are more likely to be correct)
  5. Compare the examples and .doc.tsx in react-examples/src/react-next/ComponentName with the react versions. If the example names and content appear unchanged you can just delete the react-next versions. Otherwise copy over the moved examples to the react folder (fixing imports to be from react), and delete any remaining react-next example/doc files.
    • Note: Even if the component is in react-internal, the examples should be under react-examples/src/react and import from @fluentui/react
  6. Update snapshots and API in react(-internal) and react-next

In the PR, be sure to look at:

  • Perf test: is the new implementation slower?
  • Screener: any visual regressions?
  • Bundle size (not sure if it will be accurate until all components move)
Component Assignee PR/notes
Callout Jon done
ChoiceGroup Elizabeth done
Coachmark Elizabeth done
ComboBox + Autofill Jon done
ContextualMenu Jon done
Dropdown Jon done
Fabric Tomi done
FloatingPicker/ExtendedPicker Jon done
FocusTrapZone Mak done
Image Tomi done
Layer Caleb done
MessageBar Caleb done
OverflowSet Caleb done
Persona Jon done
Popup Mak done
Rating Elizabeth done
ResizeGroup Elizabeth done
SearchBox Caleb done
SelectedItemsList Caleb done
Shimmer Caleb done
SpinButton Caleb done
SwatchColorPicker Caleb done
TextField Elizabeth done

Ignore/delete react-next versions due to not yet converted:

  • Breadcrumb (done)
  • Modal (done)
  • Keytip

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

Successfully merging a pull request may close this issue.

2 participants