Commit Graph

9614 Commits

Author SHA1 Message Date
Krist Wongsuphasawat
f230f3b89f build: configure publish workflow 2021-11-26 11:46:05 +08:00
Krist Wongsuphasawat
a45efd7cb8 build: update workflow 2021-11-26 11:46:05 +08:00
Krist Wongsuphasawat
07091811f0 build: fix ci 2021-11-26 11:46:05 +08:00
Krist Wongsuphasawat
5aa5854d3f build: fix workflow 2021-11-26 11:46:05 +08:00
Krist Wongsuphasawat
830e305d1e build: update workflow 2021-11-26 11:46:05 +08:00
Krist Wongsuphasawat
3f24fb447a build: update workflow 2021-11-26 11:46:05 +08:00
Krist Wongsuphasawat
53f9f84570 build: update workflow 2021-11-26 11:46:05 +08:00
Krist Wongsuphasawat
7b641b9278 build: update workflow 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
51e27a6555 build: update workflow 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
f28aa7d72b build: update workflow 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
ff51929ada build: add more scripts and pilot workflow 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
ca3897c638 chore: move files 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
41d62ba640 docs: update readme 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
b562418eb6 docs: update url in package.json and readme 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
f00c2ffdae docs: update readme 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
8d688d5c10 chore: remove already migrated packages 2021-11-26 11:46:04 +08:00
Krist Wongsuphasawat
dfb0451022 chore: move unmigrated files 2021-11-26 11:46:03 +08:00
Krist Wongsuphasawat
493df5c808 feat: migrate xy-chart to use encodable (#438)
* feat: migrate xy-chart to use encodable (#420)

* feat: use encodable in BoxPlot

* feat: migrate legend

* docs: update storybook

* fix: label overlap

* fix: lint

* fix: remove comments

* fix: path

* feat: migrate scatterplot to use encodable (#421)

* feat: migrate scatter plot

(cherry picked from commit 0d607a60cdab8037ece7f29a74bef1c0a5432c5d)

* fix: legend

* feat: migrate line chart to use encodable (#427)

* feat: migrate line to use encodable

* fix: storybook ts

* fix: remove comment

* refactor: delete deprecated files (#430)

* refactor: delete outdated files

* feat: update index exports and add test

* refactor: delete more files

* fix: import order

* fix: update dependency

* fix: update dependency

* build: fix babel

* fix: remvoe comments

* fix: babel

* refactor: move files (#432)

* refactor: move files

* refactor: move files

* fix: small issues with charts post-migration (#433)

* fix: scatterplot issue

* fix: bump encodable and fix time scale nicing

* fix: issue with label rotation

* refactor: remove deep import

* fix: demo import

* feat: bump and remove unnecessary dependencies (#436)

* feat: bump dependencies

* feat: remove unnecessary dependencies
2021-11-26 11:46:02 +08:00
wyg
2aae804ae5 fix: compatible with window (#426) 2021-11-26 11:46:02 +08:00
Jianchao Yang
7497a61be6 chore: cleanup big number and table chart (#422)
They are moved to superset-ui by apache-superset/superset-ui#333
2021-11-26 11:46:02 +08:00
Krist Wongsuphasawat
0176d1dd04 v0.11.21 2021-11-26 11:46:02 +08:00
Jianchao Yang
80b6e066eb feat(big-number): allow fallback to last available value and fix time range for trend lines (#403)
* feat(big-number): add option to align time range

In Superset, when a timeseries query has no data at the beginning period
or end period of the filtered time range, there will not no data records
at those periods, hence the trendline in Big Number chart would not
render those periods. This often causes confusion and misinterpretaiton
in dashboards, especially for those with multiple trendline charts
aligned with each other. They could all be a very smooth line, but
actually showing very different time ranges.

This PR adds an option "alignTimeRange" to apply the filtered time
range on the xAxis. Date periods for empty data will be rendered, but
there will be no connected lines, dots, or tooltips for them.

It's possible to still show tooltips for those periods, but I decided
not to do that as: 1) it makes things much more complicated; 2) I don't
want to confuse zero or nulls with empty data.

* fix(big-number): disable alignRange by default

* refactor(big-number): migrate to Typescript

* fix(big-number): typescript build

* fix(big-number): change tooltip trigger; fix storybook

* fix(big-number): move @types to dependencies

* fix(big-number): move all files to ts

* build(big-number): add @types/d3-color as dependency

* refactor(big-number): remove renderTooltip as prop

* feat(big-number): add timeRangeUseFallback options and some refactor

* fix(big-number): update formatting functions

* fix(big-number): update copy for no data

* fix(big-number): address PR feedbacks

* feat(big-number): replace timeRangeUseFallback with bigNumberFallback

* fix: upgrade @types/react-bootstrap

* build(big-number): move react-bootstrap to dependencies

* refactor(big-number): more coherent types

* feat(big-number): use alert box for fallback values

* build(big-number): remove react-bootstrap

* build: upgrade nimbus and fix versions

Keep running into building errors locally, so upgrade nimbus and
fix all related packages to the working latest version.

* feat(big-number): adjust fallback warning alignment

* build: use a non-fixed version for @types/shortid

* build: revert package versions in main
2021-11-26 11:46:02 +08:00
Jianchao Yang
cb3206b583 feat(big-number): format datetime according to granularity (#402)
This adds support for "Time Grain" in Superset for Big Number with Trendline chart.
2021-11-26 11:46:02 +08:00
Krist Wongsuphasawat
5532c5ee1d v0.11.20 2021-11-26 11:46:02 +08:00
Jianchao Yang
f45ab69462 fix(legacy-table): adjust sort icon position (#399) 2021-11-26 11:46:02 +08:00
Krist Wongsuphasawat
c41297827b v0.11.19 2021-11-26 11:46:01 +08:00
Jianchao Yang
182d112d86 fix(legacy-table): container height on tall headers (#398)
* fix(legacy-table): container height on tall headers

* fix(legacy-table): possible undefined lint error
2021-11-26 11:46:01 +08:00
Krist Wongsuphasawat
2571d516eb v0.11.18 2021-11-26 11:46:01 +08:00
Jianchao Yang
b51674e172 fix(legacy-table-chart): when data is empty (#397) 2021-11-26 11:46:01 +08:00
Krist Wongsuphasawat
d831f3fcd1 v0.11.17 2021-11-26 11:46:01 +08:00
dependabot-preview[bot]
093df00361 build(deps): bump @vx/scale from 0.0.194 to 0.0.195 (#394)
Bumps [@vx/scale](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hshoff/vx/compare/v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-11-26 11:46:01 +08:00
Jianchao Yang
51f7667e83 fix(legacy-table): avoid React DOM (#392)
* fix(legacy-table): avoid React DOM

`jquery.datatables` will manipulate DOMs, sometimes remove them. In case
of component being reloaded with updated props, React will not be able
to find those removed nodes, causing a `cannot removeChild` error.

Because of the the way to assign row keys, if table shape changes (add
or remove columns), React may also have difficulty match the cached
nodes via keys.

In general it's a bad idea to directly manipulate React rendered DOM
nodes, so we better just let `jquery.datatables` handle everything.

In the future, once we removed `jquery.datatables`, a pure React
component will not have such issues.

* fix(legacy-table): handle the case when percentMetrics is null

* fix(legacy-table): linting errors

* refactor: use nimbus build

* test(legacy-table): add React component tests

* test(legacy-table): more sophisticated cases

* fix: address PR #392 comments

* chore(legacy-table): clean up tests case setups

Not seeing the console.warn errors anymore. So cleaning it up.

Previously it was from `<SuperChart />` component, but since we have
updated the test case to not use <SuperChart>, we are good now.

* fix(legacy-table): misleading comment
2021-11-26 11:46:01 +08:00
dependabot-preview[bot]
1fb0e40c5d build(deps): bump @vx/responsive from 0.0.194 to 0.0.195 (#386)
Bumps [@vx/responsive](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hshoff/vx/compare/v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-11-26 11:46:01 +08:00
Krist Wongsuphasawat
a8b5ffc1cc v0.11.16 2021-11-26 11:46:01 +08:00
Krist Wongsuphasawat
43494f2f41 build: update yarn.lock 2021-11-26 11:46:01 +08:00
Krist Wongsuphasawat
2973c10197 perf: faster legacy table chart (#385)
* feat: faster legacy table chart

This commit tries to optimize the performance of the legacy data table.

1. Converting everything to Typescript.
2. Create a native React component instead of `reactify` (although all
   DOM operaions still happen in the jQuery.DataTables plugin.
3. Remove dependency on d3, optimize how bars are rendered.

Plus some minor changes to fix linting and building.

Also added a script to build only specific plugin for faster
development.

* feat(legacy-table-chart): use React to render DOM

Unfortunately jquery.datatables uses innerHTML to create cell content,
and all rows are created even with pagination.

83657a29e3/media/js/jquery.dataTables.js (L3113-L3117)

This is slow and insecure. We are reverting to DOM data source as in
previous implementation, but instead of using D3 to create the table rows,
we use React. This also renders `dompurify.sanitize` unnecessary since
React will take care of it.

* feat(legacy-table-chart): support html in data cells

Also

1. improve height adjustment
2. add page size control to storybook
3. hide rows from later pages at initial rendering

* fix(legacy-data-table): minor formatting fixes

* chore(legacy-table): add xss dependency

Plus minor variable name and comment update

* fix(legacy-table): linting errors

* refactor(legacy-table): more predictable metric labels

* feat(legacy-table): also display title for percent metric

* fix(legacy-table): typos, var names, etc

* docs: update notes for metric.label

* refactor(legacy-table): upgrade number-format

* fix(legacy-table): upgrade dependency for storybook and yarn
2021-11-26 11:46:00 +08:00
dependabot-preview[bot]
6ae268add2 build(deps): bump csstype from 2.6.8 to 2.6.9 (#374)
Bumps [csstype](https://github.com/frenic/csstype) from 2.6.8 to 2.6.9.
- [Release notes](https://github.com/frenic/csstype/releases)
- [Commits](https://github.com/frenic/csstype/compare/v2.6.8...v2.6.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:46:00 +08:00
dependabot-preview[bot]
fb5cc38243 build(deps-dev): bump lint-staged from 10.0.7 to 10.0.8 (#377)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.7 to 10.0.8.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.7...v10.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:46:00 +08:00
dependabot-preview[bot]
ac313a8c2e build(deps): bump @vx/axis from 0.0.194 to 0.0.195 (#380)
Bumps [@vx/axis](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hshoff/vx/compare/v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:46:00 +08:00
Krist Wongsuphasawat
3297bdce53 v0.11.15 2021-11-26 11:46:00 +08:00
dependabot-preview[bot]
bb671af906 build(deps): bump dompurify from 2.0.7 to 2.0.8 (#382)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/2.0.7...2.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:46:00 +08:00
Krist Wongsuphasawat
751a2c2358 v0.11.14 2021-11-26 11:46:00 +08:00
Krist Wongsuphasawat
00ce00abe2 build: update yarn.lock 2021-11-26 11:46:00 +08:00
Grace Guo
2277583557 fix: add container css for interval type annotation (#372)
* fix: add container css for interval type annotation

* fix undefined case

* make down arrow smaller
2021-11-26 11:46:00 +08:00
dependabot-preview[bot]
4f41e3dfad build(deps-dev): bump fast-glob from 3.1.1 to 3.2.2 (#371)
Bumps [fast-glob](https://github.com/mrmlnc/fast-glob) from 3.1.1 to 3.2.2.
- [Release notes](https://github.com/mrmlnc/fast-glob/releases)
- [Commits](https://github.com/mrmlnc/fast-glob/compare/3.1.1...3.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:45:59 +08:00
dependabot-preview[bot]
bca21dd58e build(deps-dev): bump @airbnb/config-eslint from 2.5.1 to 2.5.2 (#365)
Bumps [@airbnb/config-eslint](https://github.com/airbnb/nimbus) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/airbnb/nimbus/releases)
- [Changelog](https://github.com/airbnb/nimbus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/nimbus/compare/@airbnb/config-eslint@2.5.1...@airbnb/config-eslint@2.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:45:59 +08:00
dependabot-preview[bot]
f8263c4c1d build(deps): bump @airbnb/lunar from 2.63.1 to 2.64.0 (#367)
Bumps [@airbnb/lunar](https://github.com/airbnb/lunar) from 2.63.1 to 2.64.0.
- [Release notes](https://github.com/airbnb/lunar/releases)
- [Commits](https://github.com/airbnb/lunar/compare/@airbnb/lunar@2.63.1...@airbnb/lunar@2.64.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:45:59 +08:00
dependabot-preview[bot]
86084df4a5 build(deps): bump encodable from 0.2.0 to 0.2.6 (#370)
Bumps [encodable](https://github.com/apache-superset/encodable) from 0.2.0 to 0.2.6.
- [Release notes](https://github.com/apache-superset/encodable/releases)
- [Changelog](https://github.com/apache-superset/encodable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apache-superset/encodable/compare/v0.2.0...v0.2.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:45:59 +08:00
dependabot-preview[bot]
6630d26d18 build(deps-dev): bump terser-webpack-plugin from 2.3.4 to 2.3.5 (#364)
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v2.3.4...v2.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:45:59 +08:00
dependabot-preview[bot]
d5059568d2 build(deps): bump @vx/axis from 0.0.193 to 0.0.194 (#363)
Bumps [@vx/axis](https://github.com/hshoff/vx) from 0.0.193 to 0.0.194.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hshoff/vx/compare/v0.0.193...v0.0.194)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-11-26 11:45:59 +08:00