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: make dataset list sort case insensitive #14528

Merged
merged 1 commit into from
May 24, 2021

Conversation

mistercrunch
Copy link
Member

SUMMARY

On chart/add, current sort is case sensitive which is no good.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-05-07 at 9 14 28 AM

Screen Shot 2021-05-07 at 9 14 07 AM

"datasources": sorted(datasources, key=lambda d: d["label"]),
"datasources": sorted(
datasources,
key=lambda d: d["label"].lower() if isinstance(d["label"], str) else "",
Copy link
Member Author

Choose a reason for hiding this comment

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

Doing defensive check on str in case some old charts in old environments may have a None or something

@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #14528 (6eaed09) into master (c14665c) will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14528      +/-   ##
==========================================
- Coverage   77.32%   77.23%   -0.09%     
==========================================
  Files         958      958              
  Lines       48299    48299              
  Branches     5658     5658              
==========================================
- Hits        37346    37305      -41     
- Misses      10751    10792      +41     
  Partials      202      202              
Flag Coverage Δ
hive 80.80% <ø> (ø)
mysql 81.06% <ø> (ø)
postgres 81.10% <ø> (ø)
presto ?
python 81.47% <ø> (-0.16%) ⬇️
sqlite 80.70% <ø> (ø)

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

Impacted Files Coverage Δ
superset/views/chart/views.py 88.63% <ø> (ø)
superset/db_engine_specs/presto.py 84.42% <0.00%> (-5.90%) ⬇️
superset/connectors/sqla/models.py 88.61% <0.00%> (-1.46%) ⬇️
superset/models/core.py 88.85% <0.00%> (-0.28%) ⬇️

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 c14665c...6eaed09. Read the comment docs.

@junlincc
Copy link
Member

junlincc commented May 8, 2021

Thanks for the fix! the broken borderline really hurts UI/UX.it's probably needed to show long title.
We added horizontal scroll in some select dropdown for long title in some other areas in the product, can we apply scroll to this one as well?

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!

Copy link
Member

@willbarrett willbarrett left a comment

Choose a reason for hiding this comment

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

LGTM - it would be great to add a test for this behavior

@mistercrunch mistercrunch merged commit 4d3fb56 into apache:master May 24, 2021
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request May 25, 2021
* master: (163 commits)
  fix(native-filters): Manage default value of filters by superset (apache#14785)
  fix: Additional ResultSet tests (apache#14741)
  chore: added BasicParametersMixin to Redshift (apache#14752)
  fix: make dataset list sort case insensitive (apache#14528)
  fix: use encodeURIComponent when getting table metadata (apache#14790)
  fix: ensure engine is outside parameters (apache#14787)
  database modal should close on connect with tab layout (apache#14771)
  feat(native-filters): add search all filter options (apache#14710)
  fix: extra query in Dashboard when native filter enabled (apache#14770)
  chore: Improves the native filters UI/UX - iteration 2 (apache#14753)
  fix(native filters): Fix explore state (apache#14779)
  fix(explore): DndColumnSelect not handling controls with "multi: false" (apache#14737)
  feat: Create BigQuery Parameters for DatabaseModal (apache#14721)
  feat: enable user impersonation in GSheets (apache#14767)
  fix: add DB should not say it's Postgres (apache#14766)
  Revert "fix(dashboard): multiple query trigger when native filter enabled (apache#14734)" (apache#14762)
  feat: save database with new dynamic form (apache#14583)
  fix: save non-parameter DBs (apache#14759)
  chore: Removes ColorSchemeControl.less (apache#14199)
  fix(explore): Icons width (apache#14717)
  ...
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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 preset-io size/XS 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants