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: adjust width for non multi select inputs #11911

Merged
merged 2 commits into from
Dec 3, 2020

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Dec 3, 2020

SUMMARY

slight formatting fix for selects when used as filters on the CRUD pages for example that was introduced in #11732

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
_DEV__Superset

AFTER:
_DEV__Superset

TEST PLAN

visual comparisons

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@eschutho eschutho force-pushed the elizabeth/non-multi-select-width branch from 757c871 to f6bd186 Compare December 3, 2020 03:26
Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the quick fix!

@codecov-io
Copy link

codecov-io commented Dec 3, 2020

Codecov Report

Merging #11911 (76b2915) into master (61064b9) will decrease coverage by 2.26%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11911      +/-   ##
==========================================
- Coverage   66.04%   63.78%   -2.27%     
==========================================
  Files         927      462     -465     
  Lines       45016    28418   -16598     
  Branches     4309        0    -4309     
==========================================
- Hits        29730    18125   -11605     
+ Misses      15151    10293    -4858     
+ Partials      135        0     -135     
Flag Coverage Δ
cypress ?
javascript ?
python 63.78% <ø> (-0.37%) ⬇️

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

Impacted Files Coverage Δ
superset/db_engine_specs/mysql.py 79.59% <0.00%> (-12.25%) ⬇️
superset/db_engine_specs/sqlite.py 65.62% <0.00%> (-9.38%) ⬇️
superset/databases/commands/create.py 83.67% <0.00%> (-8.17%) ⬇️
superset/databases/commands/update.py 85.71% <0.00%> (-8.17%) ⬇️
superset/utils/celery.py 96.42% <0.00%> (-3.58%) ⬇️
superset/models/core.py 85.98% <0.00%> (-2.97%) ⬇️
superset/datasets/api.py 89.25% <0.00%> (-2.81%) ⬇️
superset/views/core.py 72.12% <0.00%> (-2.57%) ⬇️
superset/db_engine_specs/base.py 85.60% <0.00%> (-1.87%) ⬇️
superset/result_set.py 96.69% <0.00%> (-1.66%) ⬇️
... and 473 more

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 61064b9...76b2915. Read the comment docs.

Comment on lines 261 to 266
const styles = {
background: 'none',
border: 'none',
outline: 'none',
padding: 0,
};
Copy link
Member

Choose a reason for hiding this comment

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

perhaps this object should be defined as a const as INPUT_TAG_STYLES?

Then you could get rid of the function entirely and just do:

inputStyle={isMultiWithValue ? { ...INPUT_TAG_STYLES, width: '100%' } : INPUT_TAG_STYLES}

on line 335

Copy link
Member Author

Choose a reason for hiding this comment

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

SGTM! I made one slight change, and named it INPUT_TAG_BASE_STYLES b/c they don't apply as is to all the input tags.

@nytai nytai merged commit 04f993e into apache:master Dec 3, 2020
@nytai nytai deleted the elizabeth/non-multi-select-width branch December 3, 2020 19:27
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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 size/S 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants