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

Add Clear button to RangeWidget #485

Merged
merged 6 commits into from
Oct 14, 2022
Merged

Add Clear button to RangeWidget #485

merged 6 commits into from
Oct 14, 2022

Conversation

Josmorsot
Copy link
Contributor

@Josmorsot Josmorsot commented Oct 7, 2022

Description

Add clear button to reset RangeWidget filters.

Screen.Recording.2022-10-07.at.10.52.03.mov

Type of change

  • Feature

@Josmorsot Josmorsot changed the base branch from master to bug/sc-253299/carto-3-widgets-all-reset-if-using-the-same October 7, 2022 09:27
@Josmorsot Josmorsot requested a review from a team October 7, 2022 09:29
@Josmorsot Josmorsot marked this pull request as ready for review October 7, 2022 09:30
@Josmorsot Josmorsot changed the title Ivan/range widget clear Add Clear button to RangeWidget Oct 7, 2022
const resetSlider = () => {
const newValues = [min, max];
setInputsValues(newValues);
setSliderValues([...newValues]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need here destructuring?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not but it's used in other pieces of the component. I assumed that @padawannn found some problem and needed to use destructuring here:

setSliderValues([...newValues]);

Copy link
Contributor

@VictorVelarde VictorVelarde left a comment

Choose a reason for hiding this comment

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

LGTM, but let's wait for the other PR to land before

@Josmorsot Josmorsot force-pushed the ivan/range-widget-clear branch from 6165e35 to 8d55289 Compare October 7, 2022 10:57
@Josmorsot Josmorsot changed the base branch from bug/sc-253299/carto-3-widgets-all-reset-if-using-the-same to master October 7, 2022 10:57
@Josmorsot Josmorsot requested a review from bbecquet October 14, 2022 09:14
@coveralls
Copy link
Collaborator

coveralls commented Oct 14, 2022

Pull Request Test Coverage Report for Build 3249564739

  • 6 of 8 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 71.637%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/react-ui/src/widgets/RangeWidgetUI.js 6 8 75.0%
Totals Coverage Status
Change from base Build 3243356217: 0.1%
Covered Lines: 1698
Relevant Lines: 2213

💛 - Coveralls

CHANGELOG.md Outdated
@@ -4,6 +4,8 @@

- Update Storybook to v6.5.12 [#487](https://github.com/CartoDB/carto-react/pull/487)

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove extra line here, please

Copy link
Contributor

@VictorVelarde VictorVelarde left a comment

Choose a reason for hiding this comment

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

LGTM

@Josmorsot Josmorsot merged commit a9d2b28 into master Oct 14, 2022
@Josmorsot Josmorsot deleted the ivan/range-widget-clear branch October 14, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants