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

fix(number-field, slider): ensure cached value is cleared when toggling between different steps #4846

Merged
merged 18 commits into from
Nov 8, 2024

Conversation

blunteshwar
Copy link
Collaborator

@blunteshwar blunteshwar commented Oct 22, 2024

Description

When more than 2 sliders are present one of the slider starts rounding off values.

Related issue(s)

How has this been tested?

A story with multiple sliders has been added to test this out!

  • Test case 1

    1. Go here
    2. Toggle between sliders and see that the value 0.75 does noty rounds off to 1
  • Did it pass in Desktop?

  • Did it pass in Mobile?

  • Did it pass in iPad?

Screenshots (if appropriate)

Screen.Recording.2024-11-04.at.8.17.09.PM.mov

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@blunteshwar blunteshwar requested a review from a team as a code owner October 22, 2024 08:37
@coveralls
Copy link
Collaborator

coveralls commented Oct 22, 2024

Pull Request Test Coverage Report for Build 11744270695

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.191%

Totals Coverage Status
Change from base Build 11744036053: 0.0%
Covered Lines: 32317
Relevant Lines: 32735

💛 - Coveralls

Copy link

github-actions bot commented Oct 22, 2024

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.98 0.99 0.99
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 250.448 kB 236.36 kB 🏆 236.563 kB
Scripts 60.392 kB 54.113 kB 54.002 kB 🏆
Stylesheet 54.025 kB 47.833 kB 🏆 48.073 kB
Document 6.19 kB 5.468 kB 5.464 kB 🏆
Font 126.941 kB 126.596 kB 🏆 126.676 kB

Request Count

Category Latest Main Branch
Total 52 52 52
Scripts 41 41 41
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

Copy link

github-actions bot commented Oct 29, 2024

Tachometer results

Chrome

number-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 795 kB 74.25ms - 75.34ms - faster ✔
8% - 11%
6.70ms - 8.91ms
branch 770 kB 81.64ms - 83.56ms slower ❌
9% - 12%
6.70ms - 8.91ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 742 kB 77.25ms - 79.83ms - faster ✔
2% - 6%
1.34ms - 5.02ms
branch 717 kB 80.42ms - 83.03ms slower ❌
2% - 6%
1.34ms - 5.02ms
-
Firefox

number-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 795 kB 157.56ms - 163.84ms - faster ✔
6% - 11%
10.37ms - 19.51ms
branch 770 kB 172.32ms - 178.96ms slower ❌
6% - 12%
10.37ms - 19.51ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 742 kB 162.03ms - 170.21ms - unsure 🔍
-6% - +0%
-11.00ms - +0.76ms
branch 717 kB 167.02ms - 175.46ms unsure 🔍
-1% - +7%
-0.76ms - +11.00ms
-

Copy link
Collaborator

@rubencarvalho rubencarvalho left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this!
Could we add a test that clicks the multiple buttons and checks the right value (not rounded) is in the input?
Also, we will need to update the golden images cache because we have a new story 😄

@rubencarvalho rubencarvalho changed the title chore(slider): added test story fix(number-field, slider): ensure cached value is cleared when toggling between different steps Nov 7, 2024
@rubencarvalho rubencarvalho merged commit 1c84c96 into main Nov 8, 2024
43 of 45 checks passed
@rubencarvalho rubencarvalho deleted the multiple-sliders branch November 8, 2024 16:15
nikkimk pushed a commit that referenced this pull request Nov 19, 2024
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