-
Notifications
You must be signed in to change notification settings - Fork 220
Evaluate if we can move away from Notice component #2280
Comments
@nerrad I would love if you can help me evaluate this and reach a decision here, notices is hitting us hard now (the bulk of the weight introduced in #2399 is by notices) all products is the same, we can assume that notices will be added to every interactive block we will develop (all products, Cart and Checkout, single product and any future product). We should evaluate if we should move it to an independent bundle or build something our own, the notice implementation is simple and straightforward, the snackbar is slightly more complicated but still very doable. |
With the bulk of the weight coming from Dashicons, I'd prefer to do what's needed to eliminate that instead of building our own replacement for what we're using from GB core. |
I just realized that I hadn't prioritized this. I think we need to consider this a blocker to releasing 2.7.0 because that's the tag that will be merged to WC Core and thus introduce the significant weight increases in the bundle-sizes for various existing built files (All products, and filter blocks). I'd like to avoid duplicating work in creating our own notice components in lieue of the WordPress package. @senadir , I think you were working on a way to address this? |
Even after the improvements from #2664, the size of |
Removing notice will potentially remove other dependencies, but if we ever found ourself doing animations we can reuse some of those things, you can create an issue, but I'm certain the extra weight is from the effect-ful imports in |
Keep in mind we use the snackbar notices which in turn uses react-spring. I think at some point we're going to have to look investigate using lazy loading more. That way some of the extra package dependencies could be pulled in only when needed. So while I'm 💯 on continuing to look at where we can reduce bundlesizes, I'm not convinced removing our usage of WordPress notices is the way to go because it means we just have to reproduce all of that code for what I imagine will likely be marginal gain. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Investigating the increased bundle size in
All Product
it seems it was caused by us pulling inNotice
component, that pulled in other dependencies like Dashicon, this could be fixed by #2140 or by building our custom component.Notice in itself also pulls dashicons and some other dependencies.
The text was updated successfully, but these errors were encountered: