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-9115: Scroller: Fixed to focus properly when the spottable node is bigger than the viewport by scrolling with voice control #1748

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mmyelyn
Copy link
Contributor

@mmyelyn mmyelyn commented Nov 14, 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

When scrolling down with voice control in certain apps, focus is not restored.
Currently, when scrolling with voice control, focus is moved only when the bounds of the viewport include all bounds of the node.

Therefore, it is necessary to handle the case where the node's bounds are not all included in the viewport's bounds.
(when there is a large node that goes out of bounds, the upper part is visible but the lower part is cut off, etc.)

Resolution

Added focus logic for cases where the top of the node is long and the bottom of the node is long using node Bounds and viewports Bounds. Since I need to receive and check new nodes, I implemented it using a recursive function.

Additional Considerations

Links

WRR-9115

Comments

Enact-DCO-1.0-Signed-off-by: Hyelyn Kim ([email protected])

…han the viewport by scrolling with voice control

Enact-DCO-1.0-Signed-off-by: Hyelyn Kim ([email protected])
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.84%. Comparing base (e3f7eaa) to head (47a6245).

Files with missing lines Patch % Lines
useScroll/useEvent.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1748   +/-   ##
========================================
  Coverage    80.84%   80.84%           
========================================
  Files          148      148           
  Lines         6687     6687           
  Branches      1990     1990           
========================================
  Hits          5406     5406           
  Misses         972      972           
  Partials       309      309           

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

Copy link
Contributor

@MikyungKim MikyungKim left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants