You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/03 17:23:20 UTC

[GitHub] [superset] prosdev0107 opened a new pull request, #19938: fix(chart & table): make to allow highlight in case of numeric column

prosdev0107 opened a new pull request, #19938:
URL: https://github.com/apache/superset/pull/19938

   ### 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:
   
   https://user-images.githubusercontent.com/47900232/166506005-24660f75-a861-4d02-8156-08e26d6f6017.mov
   
   
   AFTER:
   
   https://user-images.githubusercontent.com/47900232/166505991-07cae9e0-926d-4e5a-9e8b-0e010de221b1.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
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] diegomedina248 commented on a diff in pull request #19938: fix(chart & table): make to allow highlight in case of numeric column

Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on code in PR #19938:
URL: https://github.com/apache/superset/pull/19938#discussion_r864069615


##########
superset-frontend/plugins/plugin-chart-table/src/Styles.tsx:
##########
@@ -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;

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



##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -317,7 +317,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
   const getColumnConfigs = useCallback(
     (column: DataColumnMeta, i: number): ColumnWithLooseAccessor<D> => {
       const { key, label, isNumeric, dataType, isMetric, config = {} } = column;
-      const isFilter = !isNumeric && emitFilter;
+      const isFilter = emitFilter;

Review Comment:
   is this variable needed now? (meaning, can we use `emitFilter` directly?)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #19938: fix(chart & table): make to allow highlight in case of numeric column

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #19938:
URL: https://github.com/apache/superset/pull/19938#issuecomment-1116391002

   # [Codecov](https://codecov.io/gh/apache/superset/pull/19938?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19938](https://codecov.io/gh/apache/superset/pull/19938?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dcfe0ab) into [master](https://codecov.io/gh/apache/superset/commit/e1f53f2a2c877a7f95402a1af5608c7a8e2ae27c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e1f53f2) will **not change** coverage.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head dcfe0ab differs from pull request most recent head d295385. Consider uploading reports for the commit d295385 to get more accurate results
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #19938   +/-   ##
   =======================================
     Coverage   66.53%   66.53%           
   =======================================
     Files        1714     1714           
     Lines       65044    65044           
     Branches     6723     6722    -1     
   =======================================
     Hits        43278    43278           
     Misses      20055    20055           
     Partials     1711     1711           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.26% <100.00%> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...frontend/plugins/plugin-chart-table/src/Styles.tsx](https://codecov.io/gh/apache/superset/pull/19938/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1N0eWxlcy50c3g=) | `100.00% <ø> (ø)` | |
   | [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/19938/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `38.57% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19938?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19938?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e1f53f2...d295385](https://codecov.io/gh/apache/superset/pull/19938?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas merged pull request #19938: fix(chart & table): make to allow highlight in case of numeric column

Posted by GitBox <gi...@apache.org>.
rusackas merged PR #19938:
URL: https://github.com/apache/superset/pull/19938


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] prosdev0107 commented on a diff in pull request #19938: fix(chart & table): make to allow highlight in case of numeric column

Posted by GitBox <gi...@apache.org>.
prosdev0107 commented on code in PR #19938:
URL: https://github.com/apache/superset/pull/19938#discussion_r864130396


##########
superset-frontend/plugins/plugin-chart-table/src/Styles.tsx:
##########
@@ -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;

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas commented on a diff in pull request #19938: fix(chart & table): make to allow highlight in case of numeric column

Posted by GitBox <gi...@apache.org>.
rusackas commented on code in PR #19938:
URL: https://github.com/apache/superset/pull/19938#discussion_r864260615


##########
superset-frontend/plugins/plugin-chart-table/src/Styles.tsx:
##########
@@ -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;

Review Comment:
   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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] prosdev0107 commented on a diff in pull request #19938: fix(chart & table): make to allow highlight in case of numeric column

Posted by GitBox <gi...@apache.org>.
prosdev0107 commented on code in PR #19938:
URL: https://github.com/apache/superset/pull/19938#discussion_r864130632


##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -317,7 +317,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
   const getColumnConfigs = useCallback(
     (column: DataColumnMeta, i: number): ColumnWithLooseAccessor<D> => {
       const { key, label, isNumeric, dataType, isMetric, config = {} } = column;
-      const isFilter = !isNumeric && emitFilter;
+      const isFilter = emitFilter;

Review Comment:
   yes, sure.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org