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

WRR-12136: Converted sandstone/ThemeDecorator/AccessibilityDecorator to functional component #1774

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

ion-andrusciac-lgp
Copy link
Contributor

@ion-andrusciac-lgp ion-andrusciac-lgp commented Dec 10, 2024

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

Converted AccessibilityDecorator to a functional component

Resolution

Additional Considerations

Links

WRR-12136

Comments

Enact-DCO-1.0-Signed-off-by: Ion Andrusciac ion.andrusciac@lgepartner.com

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.08%. Comparing base (5e803d7) to head (5388122).
Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
ThemeDecorator/AccessibilityDecorator.js 92.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1774      +/-   ##
===========================================
+ Coverage    80.87%   81.08%   +0.21%     
===========================================
  Files          148      148              
  Lines         6676     6768      +92     
  Branches      1989     2037      +48     
===========================================
+ Hits          5399     5488      +89     
- Misses         969      975       +6     
+ Partials       308      305       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@daniel-stoian-lgp daniel-stoian-lgp left a comment

Choose a reason for hiding this comment

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

LGTM

ThemeDecorator/AccessibilityDecorator.js Outdated Show resolved Hide resolved
ThemeDecorator/AccessibilityDecorator.js Outdated Show resolved Hide resolved
Comment on lines +47 to +50
if (prevTextSize.current !== textSize) {
resizeRegistry.current.notify({});
prevTextSize.current = textSize;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need to declare prevTextSize to check if textSize has changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

prevTextSize maintains a reference through re-renders and we're calling the notify function only if textSize is changed and differs from it's previous value; without prevTextSize, we can't track the previous value of the textSize

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