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

Improvement/1st improvement design system #253

Merged
merged 14 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.vscode
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"tabWidth": 2,
"trailingComma": "all"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need two different linter tools? ESLint should handle code formatting concerns.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On metalk8s and xcore. We use ESLint for code quality rules and prettier for formatting rules.
ESLint can indeed do both but I (subjective opinion) prefer prettier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have never user Prettier.io and would love to have your opinion on "what is the advantage of using Prettier for formatting concerns over Eslint?". We could have a side discussion on this topic if you want.

"trailingComma": "all",
"singleQuote": true
}
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
stories: ["../stories/*.@(js|mdx)"],
stories: ["../stories/**/*.stories.@(js|mdx)"],
addons: ["@storybook/addon-essentials", "@storybook/addon-knobs"],
};
27 changes: 27 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,30 @@ const withThemeProvider = (Story, context) => {
};

export const decorators = [withThemeProvider];

export const parameters = {
options: {
storySort: {
order: [
"Style",
["Color", "Icons"],
"Components",
[
"Navigation",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be ordered alphabetically for better readability?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For headers on level 1 (STYLE, COMPONENT), the order should be predefined.
For the Intro and Style section, the order of levels 2 should be predefined.
For the library itself (inside COMPONENTS), it could be alphabetical order, however it makes sense to put Navigation at the beginning, to set Input and Selector next to each other, and also Chart and Progress & loading aside, as they are rather visual components.
At the end/bottom, it could be miscellaneous components.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this explanation.

"Button",
"Chips",
"Checkbox",
"Toggle",
"Dropdown",
"Input",
"Selector",
"Chart",
"Progress & loading",
"Table",
"Notification",
],
"Guideline",
],
},
},
};
Loading