-
Notifications
You must be signed in to change notification settings - Fork 314
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
feat(webpack): BREAKING CHANGE Upgrade to webpack 5 and react-styleguidist 12.0.1 #3568
Conversation
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.
took a quick scan for now
"webpack-bundle-analyzer": "^3.6.0", | ||
"webpack-cli": "^3.3.10", | ||
"webpack-dev-server": "^3.10.1", | ||
"webpack": "^5.92.0", |
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.
can we check the bundle sizes between webpack 4 and webpack 5?
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.
updated description with images
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.
few more questions but looks fine to me
discardComments: { removeAll: true }, | ||
parser: safeParser, | ||
}, | ||
ignoreOrder: true, |
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.
i have a feeling our CSS throughout the repo isn't structured consistently to be able to use this setting. is this needed?
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.
scripts/webpack.config.js
Outdated
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line | ||
// `...`, |
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.
i don't quite understand this comment. when do we uncomment this line?
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.
removed
src/components/menu/Menu.md
Outdated
@@ -28,7 +27,7 @@ const MenuSectionHeader = require('box-ui-elements/es/components/menu') | |||
<MenuSeparator /> | |||
<MenuSectionHeader>Menu Section</MenuSectionHeader> | |||
<MenuLinkItem> | |||
<Link href="/#">Awesome Link</Link> |
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.
nit: looks like you can keep this as <Link />
s in this file and SelectMenuLinkItem.md
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.
fixed
@@ -13,7 +13,7 @@ The `messages` property is a map of message keys and translated strings. All the | |||
If you are using the CDNs, the i18n messages are included in the bundle. | |||
|
|||
Example of using the `language` and `messages` properties: | |||
```jsx | |||
```jsx static |
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.
qq: what's this change do?
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.
prevents react-styleguidist from rendering the code, this is presenting the code as an example not meant to be rendered
"webpack-bundle-analyzer": "^3.6.0", | ||
"webpack-cli": "^3.3.10", | ||
"webpack-dev-server": "^3.10.1", | ||
"webpack": "^5.92.0", |
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.
from the screenshot, the elements are almost doubling in size. was that expected? iirc dev console assets sizes after the webpack 4 upgrade were reduced so i'm curious what's happening here
The `<MenuLinkItem>` component is required to wrap anchor tags since there are special ARIA rules for those. | ||
The `<SelectMenuLinkItem>` component is for items that can be selected with a checkmark. | ||
|
||
Following the following standards: [WAI-ARIA Menu](https://www.w3.org/TR/wai-aria-practices-1.1/#menu) |
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.
this is a broken link. maybe https://www.w3.org/TR/wai-aria-1.1/#menu?
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.
oh I literally copy paste from this file
Following the following standards: [WAI-ARIA Menu](https://www.w3.org/TR/wai-aria-practices-1.1/#menu) |
Good catch, ill update both places.
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.
Approved, thank you! I left a few comments, but they are not blocking.
The `<MenuLinkItem>` component is required to wrap anchor tags since there are special ARIA rules for those. | ||
The `<SelectMenuLinkItem>` component is for items that can be selected with a checkmark. |
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.
Why are these docs and code snippet duplicated across Menu.md
and SelectMenuLinkItem.md
? Would it be better to show at least one example of MenuLinkItem
?
<SelectMenuLinkItem isSelected> | ||
<Link href="#">View Profile</Link> | ||
</SelectMenuLinkItem> | ||
<SelectMenuLinkItem> | ||
<Link href="#">Awesome Link</Link> | ||
</SelectMenuLinkItem> |
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.
nit: the tab spacing is not consistent here compared to other md files. It seems like there is a preference for 4 space tabs
The `<SelectMenuLinkItem>` component is for items that can be selected with a checkmark. | ||
|
||
Following the following standards: [WAI-ARIA Menu](https://www.w3.org/TR/wai-aria-1.1/#menu) | ||
|
||
### Examples | ||
|
||
``` |
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.
nit across this entire pr:
``` | |
```js |
…idist 12.0.1 (box#3568) * chore(webpack): Upgrade webpack to 5 * chore(webpack): update stylegudist and resolve import and state issue * chore(webpack): fix chromatic-deploy and flow error * chore(webpack): feedback * chore(webpack): feedback * chore(webpack): feedback * chore(webpack): feedback * chore(webpack): feedback * chore(webpack): feedback * chore(webpack): feedback --------- Co-authored-by: Jerry Jiang <[email protected]>
Before | After