In an effort to ensure maintenance and development in
office-ui-fabric-react continues to be sustainable, we are proposing
the task of breaking out controls into smaller packages within this
repo. These packages will be consumed and re-exported by
office-ui-fabric-react as to not change the API surface of
office-ui-fabric-react itself.
Doing this work has several benefits:
The specific packages will contain the following controls:
| @uifabric/$PACKAGE | controls |
|--------------------|----------|
| react-fundamentals | ActivityItem, DocumentCard, HoverCard, Breadcrumb, CommandBar, Nav, OverflowSet, Pivot, ResizeGroup, ContextualMenu, Announced, Color, Divider, Grid, Icon, Icons, Image, Keytip, KeytipData, KeytipLayer, Link, Separator, Stack, Text, Callout, Dialog, Layer, Modal, Overlay, Panel, Popup, ScrollablePane, Sticky, Tooltip, FocusTrapZone, FocusZone, Autofill, Button, Checkbox, ChoiceGroup, ChoiceGroupOption, ComboBox, Dropdown, Label, Rating, SearchBox, SelectableOption, Slider, SpinButton, TextField, Toggle, Coachmark, MessageBar, PositioningContainer, ProgressIndicator, Shimmer, Spinner, TeachingBubble |
| react-data-views | Check, DetailsList, GroupedList, List, MarqueeSelection, SelectedItemsList, ShimmeredDetailsList |
| react-date-time | Calendar, DatePicker |
| react-people | Facepile, Persona, PersonaCoin, PersonaPresence |
| react-pickers | ColorPicker, ExtendedPicker, FloatingPicker, Pickers, SwatchColorPicker |
Work will be staged 1 package at a time, moving necessary controls from office-ui-fabric-react then publishing a minor release. This will ensure that pull requests are reviewable and releasable at regular intervals.
Please add comments!
@jdhuntington should we rename the recently created @uifabric/lists package in #9106 as you have it above, @uifabric/react-list?
Luckily, we have deferred publishing and are free to perform a rename without penalty. Though I personally think it should be plural since it will contain a number of list components and helpers.
@jdhuntington will we be tracking build time as part of the success criteria of this modularization effort?
My hope would be that the modularization work results in a quicker inner dev loop or at the very least does not regress.
@KevinTCoughlin Good question. I think that "not making the build slower" is an important goal, though I don't expect it to improve either. The main success criteria is to break circular dependency chains and enable more flexible versioning/release schemes in the future.
The react-commanding package sounds like it has various heavy components, that people might want to avoid... and ContextualMenu which I assume even pretty light apps will need. Maybe the code is more related than I might thing, but should ContextualMenu be more separate?
Also Nav is often big enough to be its own thing. -- (I'm not that familiar with the actual fabric controls... just some gut thinking thoughts)
@KevinTCoughlin I wonder whether it could make sense to use a more generic name for react-lists, like react-collections. Would allow us to add components in the future that don't use a row-based layout strategy.
Here are my 5 centomments 馃槃
Tooltip should probably be classified as a surface.OverflowSet, ResizeGroup, Keytips and some list utils maybe like Selection, AutoScroll.ContextualMenu could easily be classified as a surface too.OverflowSet, ResizeGroup and ContextualMenu from react-commanding it can be easily named as react-navigation. The only odd player here is CommandBar...react-layout which would have within itself Stack and in the future Grid?My comments:
ContextualMenu if most of the other packages use it, for example.)Omit is just a type helper that is replaced with Omit in TS3.5, although it's probably a bit too soon to deprecate it entirely. Maybe a react-helpers or react-types package? Keytips would fit, maybe surfaces? It is used by a number of components. Maybe @kelseyyoung has some input.GlobalSettings is part of packages\utilities.. are those also being split? Would also affect Customizations, Customizer, etc.I'm up for any categorization of keytips really; out of the ones listed in the original table I think it mostly fits in react-commanding because it gives a way to trigger executable controls through keyboarding; the Keytip component itself is just a visual way to show that. However, as Jason mentioned, because it's used by many components perhaps it does need its own package
Putting this on hold, as it would mean several major changes across consuming codebases.
We will likely be picking this up again soon.
Most helpful comment
@jdhuntington should we rename the recently created
@uifabric/listspackage in #9106 as you have it above,@uifabric/react-list?Luckily, we have deferred publishing and are free to perform a rename without penalty. Though I personally think it should be plural since it will contain a number of list components and helpers.