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

feat(explore): adhoc column formatting for Table chart #13758

Merged
merged 6 commits into from
Apr 2, 2021

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Mar 23, 2021

SUMMARY

Add ad-hoc per-column formatting to table chart so users can change things like column width and d3 format after querying.

Most logics are built in superset-ui, with this PR: apache-superset/superset-ui#1019

The only change in superset-frontend is to pass chart state to controls.

Closes #10729 .

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

See apache-superset/superset-ui#1019 for more screenshots.

TEST PLAN

Manual testing

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

...config,
...controls[name],
name,
};
if (config.mapStateToProps?.length === 3) {
Copy link
Member

Choose a reason for hiding this comment

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

what does this mean? maybe a comment to show why it's necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the comments

@ktmud ktmud force-pushed the table-column-formatting branch 2 times, most recently from 145bea3 to 3c93b75 Compare March 30, 2021 00:37
@ktmud ktmud marked this pull request as ready for review March 30, 2021 00:37
Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

lgtm, and thanks for bumping the package versions to pull in my fix too!

@ktmud ktmud marked this pull request as draft March 30, 2021 21:56
@ktmud
Copy link
Member Author

ktmud commented Mar 30, 2021

It seems emotion's css={{ ... }} prop is not picked up when used inside a node_modules library. Will investigate and find a fix.

@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #13758 (6b11461) into master (4789074) will increase coverage by 0.00%.
The diff coverage is 83.33%.

❗ Current head 6b11461 differs from pull request most recent head 73166b5. Consider uploading reports for the commit 73166b5 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13758   +/-   ##
=======================================
  Coverage   78.09%   78.09%           
=======================================
  Files         934      934           
  Lines       47345    47350    +5     
  Branches     5937     5945    +8     
=======================================
+ Hits        36972    36976    +4     
- Misses      10229    10230    +1     
  Partials      144      144           
Flag Coverage Δ
cypress 56.03% <80.00%> (+<0.01%) ⬆️
javascript 66.28% <66.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...tend/src/SqlLab/components/ScheduleQueryButton.tsx 28.12% <ø> (ø)
...perset-frontend/src/explore/components/Control.tsx 91.66% <50.00%> (-3.79%) ⬇️
.../src/explore/components/ControlPanelsContainer.tsx 97.34% <100.00%> (+0.07%) ⬆️

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 4789074...73166b5. Read the comment docs.

@ktmud ktmud force-pushed the table-column-formatting branch 2 times, most recently from 95b2c8d to 421335e Compare April 1, 2021 18:51
@ktmud ktmud marked this pull request as ready for review April 1, 2021 18:52
@ktmud ktmud merged commit 6594077 into apache:master Apr 2, 2021
@ktmud ktmud deleted the table-column-formatting branch April 2, 2021 06:28
@ktmud
Copy link
Member Author

ktmud commented Apr 2, 2021

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2021

@ktmud Ephemeral environment creation is currently limited to committers.

amitmiran137 pushed a commit that referenced this pull request Apr 2, 2021
* master: (26 commits)
  chore: bump to new superset-ui version (#13932)
  fix: do not run containers as root by default in Helm chart (#13917)
  feat(explore): adhoc column formatting for Table chart (#13758)
  fix(sqla-query): order by aggregations in Presto and Hive (#13739)
  feat(alert/report): add ALERTS_ATTACH_REPORTS feature flags + feature (#13894)
  test: Fixes PropertiesModal_spec (#13548)
  fix: Pin Prophet dependency after breaking changes (#13852)
  test: Adds tests to dnd controls (#13650)
  test: Adds tests to the AnnotationLayer component (#13748)
  test: Refactor and enhance tests for the Explore DatasourcePanel Component (#13799)
  Add tests (#13778)
  test: DisplayQueryButton (#13750)
  Fixing condition around left margin for dashboard layout. Fixes #13863 (#13905)
  Revert "fix: select table overlay (#13694)" (#13901)
  test: Adds tests to the OptionControls component (#13729)
  test: DatasourceControl (#13605)
  tests for function handleScroll (#13896)
  test: Adds tests to the CustomFrame component (#13675)
  test: Adds tests to the AdvancedFrame component (#13664)
  test: DataTableControl (#13668)
  ...
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 size/S viz:charts:table Related to the Table chart 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Custom D3 Formatting for Source Columns on table viz type
4 participants