From 73e93911ace9f991cbec1c813756b0e8d0de4dcf Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Wed, 6 Apr 2022 18:43:25 +0300 Subject: [PATCH] chore: Remove TimeTable.less (#19463) * Remove TimeTable less * Remove className * Update superset-frontend/src/visualizations/TimeTable/TimeTable.jsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> --- .../explore/visualizations/time_table.js | 6 +++--- .../visualizations/TimeTable/TimeTable.jsx | 8 +++++-- .../visualizations/TimeTable/TimeTable.less | 21 ------------------- 3 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 superset-frontend/src/visualizations/TimeTable/TimeTable.less diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js index ea1353bec..7da900278 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js +++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js @@ -47,7 +47,7 @@ describe('Visualization > Time TableViz', () => { waitAlias: '@getJson', querySubstring: NUM_METRIC.label, }); - cy.get('.time-table').within(() => { + cy.get('[data-test="time-table"]').within(() => { cy.get('span').contains('Sum(num)'); cy.get('span').contains('COUNT(*)'); }); @@ -75,7 +75,7 @@ describe('Visualization > Time TableViz', () => { waitAlias: '@getJson', querySubstring: NUM_METRIC.label, }); - cy.get('.time-table').within(() => { + cy.get('[data-test="time-table"]').within(() => { cy.get('td').contains('boy'); cy.get('td').contains('girl'); }); @@ -112,7 +112,7 @@ describe('Visualization > Time TableViz', () => { waitAlias: '@getJson', querySubstring: NUM_METRIC.label, }); - cy.get('.time-table').within(() => { + cy.get('[data-test="time-table"]').within(() => { cy.get('th').contains('Current'); cy.get('th').contains('Last Year'); cy.get('th').contains('YoY'); diff --git a/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx b/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx index d12022f74..f9638575b 100644 --- a/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx +++ b/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx @@ -31,7 +31,6 @@ import sortNumericValues from 'src/utils/sortNumericValues'; import FormattedNumber from './FormattedNumber'; import SparklineCell from './SparklineCell'; -import './TimeTable.less'; const ACCESSIBLE_COLOR_BOUNDS = ['#ca0020', '#0571b0']; @@ -101,6 +100,7 @@ const defaultProps = { const TimeTableStyles = styled.div` height: ${props => props.height}px; + overflow: auto; th { z-index: 1; // to cover sparkline @@ -325,7 +325,11 @@ const TimeTable = ({ : []; return ( - +