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(dnd&column): make to fix the blank state issue when only one column select #19651

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

prosdev0107
Copy link
Contributor

@prosdev0107 prosdev0107 commented Apr 11, 2022

SUMMARY

Single Temporal Column Should Appear in a dropdown instead of Blank State

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
image

AFTER:
image

TESTING INSTRUCTIONS

How to reproduce bugs

  1. Create a chart using a dataset that has only one temporal column (you can edit the dataset and uncheck "is temporal" on all columns but one if that helps with quicker testing)
  2. Click on the time column in the Customize panel

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

@codecov
Copy link

codecov bot commented Apr 11, 2022

Codecov Report

Merging #19651 (39d7a03) into master (d693f4e) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #19651      +/-   ##
==========================================
- Coverage   66.30%   66.30%   -0.01%     
==========================================
  Files        1681     1681              
  Lines       64408    64406       -2     
  Branches     6593     6593              
==========================================
- Hits        42704    42702       -2     
  Misses      20020    20020              
  Partials     1684     1684              
Flag Coverage Δ
javascript 51.13% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ontrols/DndColumnSelectControl/DndColumnSelect.tsx 36.06% <100.00%> (-2.03%) ⬇️

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 d693f4e...39d7a03. Read the comment docs.

Comment on lines -132 to -136
col =>
!optionSelector.values
.filter(isColumnMeta)
.map((val: ColumnMeta) => val.column_name)
.includes(col.column_name),
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you confirm that we don't have other side effects by removing this filter?

If we really don't need this filter, can you add the reason into PR description so others can get an idea?

Copy link
Member

Choose a reason for hiding this comment

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

It was supposed to filter out the current value from options when editing metric/column/filter. I suppose we don't really need it so lgtm 👍

@kgabryje
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@kgabryje Ephemeral environment spinning up at http://54.187.169.217:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@villebro villebro added the v1.5 label Apr 12, 2022
Comment on lines +130 to 131
() => Object.values(options),
[optionSelector.values, options],
Copy link
Member

Choose a reason for hiding this comment

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

Isn't optionSelector redundant in the dependency array after this?

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.

Approving. If we can apply @villebro's suggestion before 1.5 cut then let's do it, otherwise we can merge and open a followup PR

@kgabryje kgabryje merged commit c320c29 into apache:master Apr 15, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

villebro pushed a commit that referenced this pull request Apr 15, 2022
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 15, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.15

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 and removed 🚢 2.0.1 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-Patch size/XS 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants