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(chart & table): make to allow highlight in case of numeric column #19938

Merged
merged 3 commits into from
May 4, 2022

Conversation

prosdev0107
Copy link
Contributor

@prosdev0107 prosdev0107 commented May 3, 2022

SUMMARY

Hovering highlight is not working for integer columns on a Table Chart with cross-filtering enabled.

Description
When cross-filtering is enabled, hovering an element on the Table Chart would highlight the cell. However the highlighting is not happening in case the cell is an integer.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:

cross-filter-highlight.mov

AFTER:

screen-cross-filter.mov

TESTING INSTRUCTIONS

How to reproduce the bug

  1. Create a Table Chart.
  2. Make sure the Table has an integer column.
  3. Enable cross-filtering.
  4. Add it to a Dashboard.
  5. Access the Dashboard.
  6. Hover over a row on the integer column.

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 May 3, 2022

Codecov Report

Merging #19938 (9e6f957) into master (e1f53f2) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master   #19938      +/-   ##
==========================================
- Coverage   66.53%   66.52%   -0.02%     
==========================================
  Files        1714     1714              
  Lines       65044    65068      +24     
  Branches     6723     6724       +1     
==========================================
+ Hits        43278    43287       +9     
- Misses      20055    20069      +14     
- Partials     1711     1712       +1     
Flag Coverage Δ
javascript 51.25% <66.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...tend/plugins/plugin-chart-table/src/TableChart.tsx 38.57% <66.66%> (ø)
superset-frontend/src/views/store.ts 80.00% <0.00%> (-10.00%) ⬇️
...ntend/src/explore/components/ExploreChartPanel.jsx 70.49% <0.00%> (-1.18%) ⬇️
superset-frontend/src/embedded/index.tsx 0.00% <0.00%> (ø)
superset-frontend/src/types/bootstrapTypes.ts 100.00% <0.00%> (ø)
...rset-frontend/src/dashboard/util/findPermission.ts 92.30% <0.00%> (ø)
...nd/src/explore/components/DataTablesPane/index.tsx 71.55% <0.00%> (ø)
...es/superset-ui-core/src/chart/models/ChartProps.ts 100.00% <0.00%> (ø)
...perset-ui-core/src/chart/components/SuperChart.tsx 100.00% <0.00%> (ø)
...src/components/FilterableTable/FilterableTable.tsx
... and 4 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 e1f53f2...9e6f957. Read the comment docs.

@@ -71,7 +71,7 @@ export default styled.div`
cursor: pointer;
}
td.dt-is-filter:hover {
background-color: ${theme.colors.secondary.light4};
background-color: ${theme.colors.secondary.light4} !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

if this was working for non-integers, why do we need the important now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is because table cell is using inline style when numeric cell and so I need to use important

Copy link
Member

Choose a reason for hiding this comment

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

Does the inline style need to set a background color at all? If so, can we switch it to use className / Emotion?

... or the other way around, worst case.

@pull-request-size pull-request-size bot added size/M and removed size/XS labels May 4, 2022
@rusackas rusackas merged commit 902ac05 into apache:master May 4, 2022
hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
…apache#19938)

* fix(chart & table): make to allow highlight in case of numeric column

* fix(chart & table): make to use emitFilter directly

* fix(chart & table): make to use styled component instead of inline style
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
…apache#19938)

* fix(chart & table): make to allow highlight in case of numeric column

* fix(chart & table): make to use emitFilter directly

* fix(chart & table): make to use styled component instead of inline style
@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-Patch size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants