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

chore: Select component refactoring - TimeSeriesColumnControl - Iteration 5 #16442

Merged
merged 9 commits into from
Sep 27, 2021
Merged

chore: Select component refactoring - TimeSeriesColumnControl - Iteration 5 #16442

merged 9 commits into from
Sep 27, 2021

Conversation

geido
Copy link
Member

@geido geido commented Aug 25, 2021

SUMMARY

It replaces the react-select Select component with the Antdesign one in the TimeSeriesColumnControl component.

BEFORE

time_columns_before.mp4

AFTER

time_column_after.mp4

TESTING INSTRUCTIONS

  1. Open a Time-series Table Chart in Explore
  2. Add time columns and observe the dropdown behavior

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

@geido geido added the risk:refactor High risk as it involves large refactoring work label Aug 25, 2021
@geido
Copy link
Member Author

geido commented Aug 25, 2021

@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #16442 (0931d35) into master (86290cc) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16442      +/-   ##
==========================================
- Coverage   76.76%   76.72%   -0.05%     
==========================================
  Files        1007     1005       -2     
  Lines       54125    54069      -56     
  Branches     7374     7449      +75     
==========================================
- Hits        41550    41483      -67     
- Misses      12335    12342       +7     
- Partials      240      244       +4     
Flag Coverage Δ
javascript 71.20% <100.00%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
...ponents/controls/TimeSeriesColumnControl/index.jsx 92.00% <100.00%> (+0.21%) ⬆️
...rontend/src/components/ListView/Filters/Select.tsx 76.92% <0.00%> (-20.64%) ⬇️
superset-frontend/src/views/CRUD/utils.tsx 55.81% <0.00%> (-13.04%) ⬇️
...et-frontend/src/components/Select/NativeSelect.tsx 70.00% <0.00%> (-10.00%) ⬇️
superset-frontend/src/reports/actions/reports.js 33.33% <0.00%> (-7.85%) ⬇️
...et-frontend/src/components/TableSelector/index.tsx 77.55% <0.00%> (-6.71%) ⬇️
superset-frontend/src/components/Select/utils.ts 92.30% <0.00%> (-3.85%) ⬇️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 74.35% <0.00%> (-3.63%) ⬇️
...ontend/src/views/CRUD/data/dataset/DatasetList.tsx 65.92% <0.00%> (-3.49%) ⬇️
...hboard/components/nativeFilters/FilterBar/utils.ts 71.87% <0.00%> (-3.13%) ⬇️
... and 78 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 86290cc...0931d35. Read the comment docs.

@geido
Copy link
Member Author

geido commented Aug 25, 2021

/testenv up

@github-actions
Copy link
Contributor

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

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Code LGTM. Left some non-blocking suggestions. It would be nice to have QA approval.

geido and others added 3 commits August 27, 2021 17:52
…lumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
…lumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
…lumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@geido geido added the hold:testing! On hold for testing label Sep 10, 2021
…e/select-component-refactoring-timeseriescolumncontrol-iteration-5
…rol-iteration-5' of github.com:geido/incubator-superset into chore/select-component-refactoring-timeseriescolumncontrol-iteration-5
@geido geido removed the hold:testing! On hold for testing label Sep 15, 2021
@michael-s-molina
Copy link
Member

michael-s-molina commented Sep 15, 2021

To fix TypeError: handleOnSearch.cancel is not a function in your tests you have two options:

  • Don't mock debounce and just account for the async behavior.
  • Include the cancel function is your mock.
jest.mock('lodash/debounce', () => (fn: Function & { cancel: Function }) => {
  // eslint-disable-next-line no-param-reassign
  fn.cancel = jest.fn();
  return fn;
});

@geido geido merged commit 667b88c into apache:master Sep 27, 2021
@geido geido deleted the chore/select-component-refactoring-timeseriescolumncontrol-iteration-5 branch September 27, 2021 15:19
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…tion 5 (apache#16442)

* Refactor Select

* Update superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Fix tests

* Mock debounce

* Add debounce

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
…tion 5 (apache#16442)

* Refactor Select

* Update superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Fix tests

* Mock debounce

* Add debounce

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 risk:refactor High risk as it involves large refactoring work size/M test_priority:NA 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants