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: add null check in updated() method of sp-number-field #4709

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

rubencarvalho
Copy link
Collaborator

@rubencarvalho rubencarvalho commented Aug 29, 2024

Description

Fix rare null reference error in sp-number-field when component is removed from DOM in Safari while being focused.

Related issue(s)

  • SWC-434

Motivation and context

Prevents errors due to race conditions between component removal and event handling in Safari.

How has this been tested?

  • Test case 1

    1. Go here
    2. Do this
  • Test case 2

    1. Go here
    2. Do this
  • Did it pass in Desktop?

  • Did it pass in Mobile?

  • Did it pass in iPad?

Screenshots (if appropriate)

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.

Copy link

Branch preview

Visual regression test results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Copy link

github-actions bot commented Aug 29, 2024

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 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 226.082 kB 214.299 kB 🏆 214.509 kB
Scripts 55.807 kB 49.829 kB 🏆 49.839 kB
Stylesheet 34.299 kB 30.095 kB 🏆 30.249 kB
Document 6.208 kB 5.431 kB 🏆 5.438 kB
Font 126.789 kB 126.595 kB 🏆 126.632 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

@coveralls
Copy link
Collaborator

coveralls commented Aug 29, 2024

Pull Request Test Coverage Report for Build 10717750521

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 98.2%

Totals Coverage Status
Change from base Build 10717486405: -0.002%
Covered Lines: 32515
Relevant Lines: 32946

💛 - Coveralls

@rubencarvalho rubencarvalho marked this pull request as ready for review August 30, 2024 12:16
@rubencarvalho rubencarvalho requested a review from a team as a code owner August 30, 2024 12:16
Copy link
Contributor

@TarunAdobe TarunAdobe left a comment

Choose a reason for hiding this comment

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

Looks great now!!! Thanks

Copy link

github-actions bot commented Sep 3, 2024

Tachometer results

Chrome

number-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 539 kB 66.56ms - 68.51ms - faster ✔
9% - 14%
6.73ms - 11.21ms
branch 516 kB 74.48ms - 78.52ms slower ❌
10% - 17%
6.73ms - 11.21ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 495 kB 74.97ms - 76.40ms - faster ✔
2% - 5%
1.92ms - 4.01ms
branch 471 kB 77.88ms - 79.41ms slower ❌
3% - 5%
1.92ms - 4.01ms
-
Firefox

number-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 539 kB 146.85ms - 153.51ms - faster ✔
6% - 11%
9.31ms - 18.21ms
branch 516 kB 160.99ms - 166.89ms slower ❌
6% - 12%
9.31ms - 18.21ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 495 kB 162.19ms - 168.09ms - faster ✔
1% - 7%
1.80ms - 11.56ms
branch 471 kB 167.93ms - 175.71ms slower ❌
1% - 7%
1.80ms - 11.56ms
-

@rubencarvalho rubencarvalho merged commit 7b1eeab into main Sep 5, 2024
58 of 61 checks passed
@rubencarvalho rubencarvalho deleted the ruben/fix-number-field-updated-safari branch September 5, 2024 09:43
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.

3 participants