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

feat: UI override registry #19671

Merged
merged 4 commits into from
Apr 14, 2022
Merged

Conversation

suddjian
Copy link
Member

SUMMARY

When serving Superset, there are many cases where it may be desirable to customize specific UI elements. This PR introduces a UiOverrideRegistry for that purpose.

The new TypedRegistry is better suited for this than the existing Registry class, because different keys can have different types of values, and all the keys offered by Superset are enumerated here.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@suddjian suddjian requested a review from lilykuang April 12, 2022 19:47
@suddjian suddjian changed the title UI override registry feat: UI override registry Apr 12, 2022
@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #19671 (6f0f7dc) into master (9554135) will decrease coverage by 0.00%.
The diff coverage is 70.00%.

@@            Coverage Diff             @@
##           master   #19671      +/-   ##
==========================================
- Coverage   66.47%   66.46%   -0.01%     
==========================================
  Files        1681     1683       +2     
  Lines       64467    64459       -8     
  Branches     6607     6609       +2     
==========================================
- Hits        42856    42845      -11     
- Misses      19917    19920       +3     
  Partials     1694     1694              
Flag Coverage Δ
javascript 51.12% <70.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/packages/superset-ui-core/src/models/Registry.ts 100.00% <ø> (ø)
...rc/dashboard/components/DashboardEmbedControls.tsx 9.43% <25.00%> (+1.27%) ⬆️
...kages/superset-ui-core/src/models/TypedRegistry.ts 100.00% <100.00%> (ø)
...set-ui-core/src/ui-overrides/UiOverrideRegistry.ts 100.00% <100.00%> (ø)
superset-frontend/src/views/components/Menu.tsx 50.00% <0.00%> (-10.00%) ⬇️
...perset-frontend/src/views/CRUD/welcome/Welcome.tsx 74.22% <0.00%> (-0.78%) ⬇️
...set-frontend/src/components/Icons/AntdEnhanced.tsx 100.00% <0.00%> (ø)
.../explore/components/ExploreViewContainer/index.jsx 54.39% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9554135...6f0f7dc. Read the comment docs.

@suddjian suddjian merged commit 4927685 into apache:master Apr 14, 2022
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 15, 2022
* typed registry

* remove unintentional change

* lint

* fix

(cherry picked from commit 4927685)
@sadpandajoe
Copy link
Member

🏷️ preset:2022.15

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* typed registry

* remove unintentional change

* lint

* fix
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset:2022.15 preset-io size/L 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants