-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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: Dynamic imports for the Icons component #14318
feat: Dynamic imports for the Icons component #14318
Conversation
superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #14318 +/- ##
==========================================
+ Coverage 76.81% 76.93% +0.12%
==========================================
Files 955 955
Lines 48249 48021 -228
Branches 6032 6032
==========================================
- Hits 37063 36947 -116
+ Misses 10990 10876 -114
- Partials 196 198 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@pkdotson Ephemeral environment spinning up at http://52.89.241.110:8080. Credentials are |
Ephemeral environment shutdown and build artifacts deleted. |
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.
LGTM! Thanks for implementing this!
/testenv up |
@rusackas Ephemeral environment spinning up at http://54.203.92.75:8080. Credentials are |
I'm SO tempted to merge this... I think the code LGTM. One minor naming nit remains as an open comment. The bigger issue is perf testing:
|
As you can see in this video, in an unrealistic scenario where all 100+ icons are being loaded at once, you will see for a moment them loading. I haven't noticed this behavior in a real-life scenario though. Loading is basically instant.
Haven't noticed any particular improvement in the bundle size CC @rusackas |
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.
LGTM. Let's do this!!! :D
Ephemeral environment shutdown and build artifacts deleted. |
* master: (38 commits) refactor(native-filters): allow cascading only for filter_select (apache#14441) test(maximize-chart): Add tests to maximize chart action (apache#14371) fix: fixing mysql error message (apache#14416) feat: Logic added to limiting factor column in Query model (apache#13521) change relationship (apache#14435) fix: bootstrap data permissions (apache#14348) fix: parse simple string error message values (apache#14360) chore: add stack trace to all calls of logger.error (apache#14382) update README with new docs and recordings (apache#14432) Renamed impyla from implya in impala.mdx and Renamed PIP package impyla from impala in index.mdx (apache#14425) fix(native-filters): fix filter scope error (apache#14426) feat: Adding limiting_factor column to Query model (apache#14234) feat: Add etag caching to dashboard APIs (apache#14357) chore: Moves Card to the components folder (apache#14139) feat: Dynamic imports for the Icons component (apache#14318) feat: Support env vars configuration for WebSocket server (apache#14398) fix: SQLLab role permissions (apache#14372) fix(native-filters): always show filters without dataset (apache#14409) fix error getting partitionQuery from table.partition (apache#14369) refactor: Boostrap to AntD - Tabs (apache#14048) ...
* Add aria-label and twotone * Enhance LazyIcon * Fix tests and solve ject warnings * Add new line * Revert package-lock to master * Fix failing test * Implement icon overrides * Fix failing storybook * Clean up * Improve var name
SUMMARY
It enhances the
Icons
component with dynamic imports and auto-generation ofaria-label
. As a POC, it changes the existingalert-solid
icon with the newIcons.AlertSolid
implementation.Remarks:
As the Icons are now dynamically imported, test cases need to wait for the Icons to be imported and re-rendered to pass without warnings. In a react-testing-library setup, this translates to using the
findBy*
promise-based approach as shown in this PR.BEFORE / AFTER:
Alert
Datasource Control
Datasource Editor
Alerts & Reports