Skip to content

NXT-8994: Adapted Enact code to respect React Compiler#3379

Merged
daniel-stoian-lgp merged 23 commits intodevelopfrom
feature/NXT-8994
Apr 8, 2026
Merged

NXT-8994: Adapted Enact code to respect React Compiler#3379
daniel-stoian-lgp merged 23 commits intodevelopfrom
feature/NXT-8994

Conversation

@ion-andrusciac-lgp
Copy link
Copy Markdown
Contributor

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

Adapted Enact code to respect React Compiler

Resolution

eslint-plugin-react-hooks 7.x has React Compiler embedded. The code needs to be adapted to respect Eslint rules

  • Adapted how the refs were changed during render, and also cannot read .current during render. This is not allowed outside handlers or effects REFERENCE
  • Modifying a variable defined outside a component or hook is not allowed
  • Modifying component props or hook arguments is not allowed
  • State update inside useEffect is not recommended

Additional Considerations

Some of the errors were silenced as they were considered false positives

Links

NXT-8994

Comments

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 97.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.97%. Comparing base (3cb11e0) to head (e05f64f).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
packages/spotlight/Spottable/useSpottable.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3379      +/-   ##
===========================================
+ Coverage    83.95%   83.97%   +0.02%     
===========================================
  Files          154      154              
  Lines         7415     7426      +11     
  Branches      1950     1952       +2     
===========================================
+ Hits          6225     6236      +11     
  Misses         937      937              
  Partials       253      253              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread packages/core/useClass/useClass.js Outdated
Comment thread packages/ui/Skinnable/useSkins.js Outdated
Comment thread packages/ui/Toggleable/Toggleable.js Outdated
Comment thread packages/ui/useScroll/Scrollbar.js Outdated
Comment thread packages/ui/Toggleable/Toggleable.js Outdated
Comment thread packages/ui/Toggleable/Toggleable.js Outdated
Comment thread packages/ui/Toggleable/Toggleable.js Outdated
Copy link
Copy Markdown
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

Copy link
Copy Markdown

@dan-ichim-lgp dan-ichim-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, just double check useControlledState change.

@daniel-stoian-lgp daniel-stoian-lgp merged commit 105fd9f into develop Apr 8, 2026
10 checks passed
@daniel-stoian-lgp daniel-stoian-lgp deleted the feature/NXT-8994 branch April 8, 2026 06:58
dan-ichim-lgp pushed a commit that referenced this pull request Apr 15, 2026
fixed compiler error

minor fixes

added unit tests and changelog

updated jsdoc

fixed changelog

updated documentation file

NXT-10623: Replace Travis CI with GitHub Actions (#3397)

* NXT-10623: Replace Travis CI with GitHub Actions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* NXT-10623: Add explicit permissions to GitHub Actions workflows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* NXT-10623: Use lts/* and node versions in CI matrix

Replace hardcoded Node.js 20 with a matrix strategy using lts/* and node,
matching the original Travis CI configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

NXT-10868: Added support for linear scaling type (#3400)

* Added linear scaled Screen Type

* Activated `linearScaling` for testing

* Small fix

* Changed default value for `linear scaling type`;
Added constraints for linear scale factor

* Fixed `getLinearSize()` and added unit test for `linearScaling.type = 'currentScreen'`

* Added `CHANGELOG`

* small fix

* Fixed eslint warnings

* Added sampler for ResolutionDecorator

* Removed `eslint-disable`

* Fixed `unit-test`

Trigger notification

testing codecov

revert codecov

Trigger notification

NXT-11907: Add push trigger to CI workflow for codecov base coverage (#3405)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

NXT-8994: Adapted `Enact` code to respect `React Compiler` (#3379)

* Fixed lint errors

* Fixed lint errors

* Reverted `Scrollbar`

* Fixed lint errors

* Fixed `Toggleable`

* Review fixes

* Review fixes

* Review fixes; Added `usePrevious` hook

* fixed compiler error

* reverted useSkins

* reverted useSkins

* trigger for travis

* added unit tests

* added unit tests

* updated codecov

* updated codecov

* revert codecov

* trigger for ci check

---------

Co-authored-by: daniel-stoian-lgp <daniel.stoian@lgepartner.com>

NXT-11479: Fixed `ResolutionDecorator` for wide resolutions  (#3404)

* Fixed condition for `shouldScaleFontSize`

* Modified `getClosestResolutionType` logic and `getRiRatio`

* Reverted `getClosestResolutionType` changes

* Updated `unit` function

* Fixed lint warnings

* Added `unit test`

* Added `CHANGELOG`

* Added `unit tests` for `ResolutionDecorator`

* Fixed lint warnings

* Trigger Build

---------

Co-authored-by: daniel-stoian-lgp <daniel.stoian@lgepartner.com>

Apply suggestions from code review

Co-authored-by: Jiye Kim <128779942+vJIYEv@users.noreply.github.com>

NXT-10863: Marquee - Investigate performance improvements (#3398)

* fix flick

* update coverage

* fix coverage

* fix travis

* invalidate before

* update changes

* add tests

* add changelog

* revert less

* fix rtl

* flick issue

* fix flick 2

---------

Co-authored-by: alexandru-morariu-lgp <84004128+alexandrumorariu@users.noreply.github.com>

NXT-4206: Updated storybook to version 10 (#3370)

* Updated storybook to version 10

* Updated storybook to version 10

* Updated storybook to version 10

* updated shrinkwrap

* update shrinkwrap

* Review fixes

* updated storybook utils

* updated changelog

---------

Co-authored-by: alexandru-morariu-lgp <84004128+alexandrumorariu@users.noreply.github.com>
Co-authored-by: taeyoung.hong <taeyoung.hong@lge.com>

NXT-10864 [Enact] Spottable - Investigate performance improvements (#3402)

* NXT-10864: Improve Spottable and resolution behavior

Made-with: Cursor

* replace state with ref

* improvement keyup/keydown

* avoid dom checks

* remove unused

* add tests

eslint fix

code review fix
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