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

fix: Database selector overflow #17369

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Fixes the database selector overflow.

@rusackas

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-11-08 at 9 45 27 AM

Screen Shot 2021-11-08 at 9 46 19 AM

TESTING INSTRUCTIONS

1 - Go to SQL Editor
2 - Select a database with a long name
3 - Check that the text is overflowed correctly

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

@@ -97,8 +107,10 @@ const SelectLabel = ({
databaseName: string;
}) => (
<LabelStyle>
<Label>{backend}</Label>
{databaseName}
<Label className="backend">{backend}</Label>
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better if we created separate styled components instead of adding classes to the container?

Copy link
Member Author

Choose a reason for hiding this comment

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

Every styled component generates a class underneath. I think this pattern is better for highly correlated components like this example, where all subcomponents are part of an atomic label. Breaking styles into multiple components for atomic units seems worse.

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Tested, works perfectly

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

Lgtm!

@codecov
Copy link

codecov bot commented Nov 8, 2021

Codecov Report

Merging #17369 (9769f5c) into master (ee87b01) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17369   +/-   ##
=======================================
  Coverage   77.14%   77.14%           
=======================================
  Files        1036     1036           
  Lines       55759    55759           
  Branches     7628     7628           
=======================================
  Hits        43013    43013           
  Misses      12490    12490           
  Partials      256      256           
Flag Coverage Δ
javascript 71.41% <ø> (ø)

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

Impacted Files Coverage Δ
...frontend/src/components/DatabaseSelector/index.tsx 95.00% <ø> (ø)
...frontend/src/components/TimezoneSelector/index.tsx 95.45% <0.00%> (-2.28%) ⬇️
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 87.71% <0.00%> (+0.58%) ⬆️

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 ee87b01...9769f5c. Read the comment docs.

@michael-s-molina michael-s-molina merged commit ed4a628 into apache:master Nov 8, 2021
const selection = await screen.findByTitle(
'GMT -06:00 (Mountain Daylight Time)',
);
const selection = await screen.findByTitle('GMT -06:00 (America/Belize)');
Copy link
Member

Choose a reason for hiding this comment

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

we should coverage "offsetsToName" in src/components/TimezoneSelector/index.tsx. I have a seprate PR do this.

@sadpandajoe
Copy link
Member

🏷️ 2021.44

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Nov 8, 2021
* fix: Database selector overflow

* Fix TImezoneSelector test

* Removes unused imports

(cherry picked from commit ed4a628)
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
* fix: Database selector overflow

* Fix TImezoneSelector test

* Removes unused imports
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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:2021.44 size/S 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants