-
-
Couldn't load subscription status.
- Fork 206
refactor: Rename components and group them on Storybook #332
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e151203:
|
638fd6a to
b376ffa
Compare
b376ffa to
abe38a2
Compare
abe38a2 to
b1076eb
Compare
Sheesh, that's a big PR. I think we should first rename the components and then later on rework their APIs if needed.
But first let's take care of component names.
I went through the win95 design guidelines and have some thoughts:
- 🔴 Anchor to Link - I'd stay with Anchor. React apps are almost always used with react router and it's better to avoid name clash with react routers
<Link />component - 🔴 Bar to MenuBarHandle: I'd name it
Handle, more versatile as it can be used for more things than just Menu - 🔴 ColorInput to ColorPicker - I'd stay with
ColorInput. ColorPicker would be more appropriate to somehting like this:
Screenshot 2022年08月04日 at 18 14 28
- 🟢 Cutout to ScrollView
- 🟢 Desktop to Monitor
- 🔴 List to MenuList, ListItem to MenuItem- I'd go with
MenuListandMenuList.Item - 🔴 NumberField to SpinBox - I'd name it
NumberInput. I know it's called SpinBox in the guideline but most devs and designers are not familiar with that name. - 🗑 LoadingIndicator to a variant of ProgressBar - let's actually remove the LoadingIndicator from the library
- 🟢 Progress to ProgressBar
- 🔴 Select to ComboBox - the ComboBox is actually totally different component - It's a mix of a textinput and a select component. The design guidelines refer to our Select component as a "Dropdown list" (see page 131 and 137). I think I'd stay with
Selecthere as it's the most common name for such component - 🟡 TabBody to TabContent - not sure about that rename. any particular reason for name change here?
- 🔴 TextField to TextBox - I know it's called TextBox in the guideline, but I'd rather make it consistent with other inputs we have and call it
TextInput(would look nice alongColorInputandNumberInput - 🗑 Toolbar to MenuBar - I think the toolbar right now is terrible, I think we should rethink it and improve it or remove it from the library
- 🟢 Tree to TreeView
- 🔴 WindowHeader to WindowTitle - Right now Window has terrible API, we should rethink it. As for naming I think we should name its subcomponents WindowFrame, TitleBar, TitleText.. (see page 86 onwards)
Additional renames we need that I've found in the guideline:
- Fieldset to GroupBox (page 35, 140)
- Panel to Frame (page 85)
- Divider to Separator (page 116)
b1076eb to
fa914ca
Compare
fa914ca to
d6046b6
Compare
@arturbien thanks for the thorough review. Following your notes, I moved Storybook and property changes to individual PRs, and adjusted all component names.
Additionally:
- This PR still groups the components on Storybook (the groups sorting ended up on the other PR so don't pay too much attention to that).
- TabContents was aligned to WindowContents, as it's the closest I could think of. TabFrame would be best if we consider WindowFrame.
- Toolbar: what do you have in mind to enhance this component?
- Window: I reverted to WindowHeader, but I'm not sure if your intent is to rename WindowContent to WindowFrame and WindowHeader to WindowTitle, or to have a new WindowTitle inside WindowHeader, alongside WindowControls? What do you have in mind to enhance this component?
This also renames the menu variant to thin.
BREAKING CHANGE: LoadingIndicator was removed from the library.
...ield to NumberInput
This also moves TabBody and Tab inside Tabs
This also adds the field variant and refactors createBorderStyles to implement all border styles.
This also moves the Table* subcomponents into the Table folder.
This also moves Windows* subcomponents to the Windows folder.
d6046b6 to
e151203
Compare
🎉 This PR is included in version 4.0.0-beta.12 🎉
The release is available on:
Your semantic-release bot 📦🚀
Uh oh!
There was an error while loading. Please reload this page.
Following up on #285, I'd like to propose the following changes:
/docsto StorybookThe following components were renamed:
BartoHandleCutouttoScrollViewDesktoptoMonitorDividertoSeparatorFieldsettoGroupBoxListtoMenuListListItemtoMenuListItemLoadingIndicatorwas deletedPaneltoFrameProgresstoProgressBarTextFieldtoTextInputTreetoTreeViewThe following components were moved (not altering any exports):
Tab,TabBodyalongsideTabsTableBody,TableDataCell,TableHead,TableHeadCell,TableRowalongsideTableWindowContent,WindowHeaderalongsideWindowAdditionally, this was changed:
createBorderStyleswas refactored with all possible border styles, aligned with Windows 95 terminologySwitchBase: moved tocommonfolderComponent.displayNameto improve React debugging.mdxfiles, given they were almost identical to the already existing storiesAll changes are backward compatible by exporting the previous names with files on
src/legacy, and marked as@deprecated, with the exception ofLoadingIndicator.Closes #285.