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

TimeSeriesWidget support for multiple time series. #767

Merged

Conversation

zbigg
Copy link
Contributor

@zbigg zbigg commented Sep 6, 2023

Description

Shortcut:

TimeSeriesWidget support for multiple time series. IN particular

  • support rendering of multiple series
  • support rendering for legend
  • support for new splitByCategory mode
  • support for filtering by category in splitByCategory mode
  • improved skeleton to better match sizing/placement of items with original (also in TableWidget)
  • new visuals in storybook
image

Type of change

  • Feature

Acceptance

Please describe how to validate the feature or fix

  1. go to X
  2. test Y
  3. assert Z

If feature deals with theme / UI or internal elements used also in CARTO 3, please also add a note on how to do acceptance on that part.

Basic checklist

  • Good PR name
  • Shortcut link
  • Changelog entry
  • Just one issue per PR
  • GitHub labels
  • Proper status & reviewers
  • Tests
  • Documentation

@shortcut-integration
Copy link

@zbigg zbigg force-pushed the feature/sc-336297/c4r-support-new-fields-model-for-timeseries branch from 4b8bccd to f899350 Compare September 6, 2023 13:33
@zbigg zbigg marked this pull request as ready for review September 6, 2023 13:33
@zbigg zbigg requested review from vmilan, Josmorsot, mdeividas, eamador and a team September 6, 2023 13:33
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Visit the preview URL for this PR (updated for commit 6df36a3):

https://cartodb-fb-storybook-react-dev--pr767-feature-sc-33629-gu0oee4n.web.app

(expires Mon, 09 Oct 2023 08:46:11 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 517cc4d31d7e09cf277774e034094b67c301cd4c

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #33629: Regenerar excels.

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Pull Request Test Coverage Report for Build 6225351711

  • 120 of 248 (48.39%) changed or added relevant lines in 13 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-2.0%) to 69.52%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/react-ui/src/widgets/FormulaWidgetUI/FormulaSkeleton.js 0 1 0.0%
packages/react-ui/src/widgets/TableWidgetUI/Skeleton/TableSkeleton.js 3 4 75.0%
packages/react-ui/src/widgets/TimeSeriesWidgetUI/hooks/useTimeSeriesInteractivity.js 0 2 0.0%
packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js 3 6 50.0%
packages/react-ui/src/widgets/TimeSeriesWidgetUI/components/TimeSeriesSkeleton.js 8 14 57.14%
packages/react-ui/src/utils/palette.js 0 9 0.0%
packages/react-ui/src/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.js 21 33 63.64%
packages/react-ui/src/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.js 19 31 61.29%
packages/react-widgets/src/models/TimeSeriesModel.js 4 22 18.18%
packages/react-ui/src/widgets/TimeSeriesWidgetUI/components/TimeSeriesControls.js 45 76 59.21%
Files with Coverage Reduction New Missed Lines %
packages/react-ui/src/widgets/TimeSeriesWidgetUI/hooks/useTimeSeriesInteractivity.js 1 21.51%
Totals Coverage Status
Change from base Build 6182739362: -2.0%
Covered Lines: 2312
Relevant Lines: 3067

💛 - Coveralls

@zbigg zbigg force-pushed the feature/sc-336297/c4r-support-new-fields-model-for-timeseries branch 2 times, most recently from 3be3b61 to 07e6e1f Compare September 7, 2023 06:16
Copy link
Contributor

@Josmorsot Josmorsot left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@mdeividas mdeividas left a comment

Choose a reason for hiding this comment

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

in general, it looks good 👍

);
}

function ClockIcon() {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe it's worth considering to move those icons to separate files?

@@ -8,13 +8,14 @@ import { useMemo } from 'react';
* @param {object} props
* @param {string} props.dataSource - ID of the source to get the filters from.
* @param {string} props.id - ID of the widget that applied the filter.
* @param {string} props.column - name of column of this widget.
* @param {string=} props.column - name of column of this widget.
Copy link
Contributor

Choose a reason for hiding this comment

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

do. you need this =? what does it mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zbigg zbigg force-pushed the feature/sc-336297/c4r-support-new-fields-model-for-timeseries branch 3 times, most recently from dc6ab25 to 1e14024 Compare September 11, 2023 10:13
lerna.json Outdated Show resolved Hide resolved
@zbigg zbigg force-pushed the feature/sc-336297/c4r-support-new-fields-model-for-timeseries branch 2 times, most recently from f6dd1b3 to 7660de0 Compare September 12, 2023 12:43
Copy link
Contributor

@vmilan vmilan left a comment

Choose a reason for hiding this comment

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

LGTM, just consider the comment about color utils files

flexShrink: 0,
marginLeft: 0,
paddingLeft: theme.spacing(1),
[`@container (max-width: ${BREAKPOINTS.XS}px)`]: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this fails in JSDOM with Error: Could not parse CSS stylesheet

@zbigg zbigg force-pushed the feature/sc-336297/c4r-support-new-fields-model-for-timeseries branch 5 times, most recently from abc4908 to deae818 Compare September 18, 2023 17:04
@zbigg zbigg force-pushed the feature/sc-336297/c4r-support-new-fields-model-for-timeseries branch from 479cc6c to 6df36a3 Compare October 2, 2023 08:37
@zbigg zbigg merged commit 567bcee into master Oct 2, 2023
@zbigg zbigg deleted the feature/sc-336297/c4r-support-new-fields-model-for-timeseries branch October 2, 2023 08:47
@zbigg zbigg mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants