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(NavigationManager): adjust isFullyOnScreen and isComponentOnScreen #417

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

erautenberg
Copy link
Contributor

Description

The onScreenEffect in our ColumnContainer and Gallery components was not properly alpha-ing off the rows as they scrolled above and off screen. These adjustments make sure that if a component's parent is animating (specifically inside of a FocusManager), that we use the target transition value to determine if the component is fully on the screen or not, otherwise the isComponentOnScreen will return true, even as a row is sliding partially off screen.

References

Testing

Will need to build and import into IS LUI to confirm it is working as expected in ColumnContainer and Gallery, otherwise you can make a custom story of Rows nested in Columns and add the following as the Column's onScreenEffect

      onScreenEffect: function () {
        if (this.items && this.items.length) {
          this.items.forEach((item, idx) => {
            const alpha =
              item.isFullyOnScreen() || idx >= this.selectedIndex ? 1 : 0;

            if (this.shouldSmooth) {
              item.smooth = { alpha };
            } else {
              item.alpha = alpha;
            }
          });
        }
      }

Automation

Checklist

  • all commented code has been removed
  • any new console issues have been resolved
  • code linter and formatter has been run
  • test coverage meets repo requirements
  • PR name matches the expected semantic-commit syntax

@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

1 similar comment
@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

@arwehrman
Copy link
Contributor

On the Basic story the Button/Tile when focused is slightly hidden at the top. Not related to the changes you made, I think so we could just put a bug ticket in for it.
I created a build of the OS and copied over to IS, tested ColumnContainer, everything works as expected

Copy link
Contributor

@arwehrman arwehrman left a comment

Choose a reason for hiding this comment

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

Just need to add the \ mentioned in the comments of Base.mdx

…n methods to include transitions of parent FocusManagers
@ImCoolNowRight ImCoolNowRight force-pushed the fix/FocusManagers-onScreen branch from 4544e55 to 498d73a Compare November 21, 2023 15:31
@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

1 similar comment
@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Passed.

@ImCoolNowRight ImCoolNowRight merged commit 32601bd into develop Nov 21, 2023
5 checks passed
@ImCoolNowRight ImCoolNowRight deleted the fix/FocusManagers-onScreen branch November 21, 2023 19:49
svc-lightning-ui-components pushed a commit that referenced this pull request Nov 22, 2023
# [@lightningjs/ui-components-v2.17.0](https://github.com/rdkcentral/Lightning-UI-Components/compare/@lightningjs/ui-components-v2.16.1...@lightningjs/ui-components-v2.17.0) (2023-11-22)

### Bug Fixes

* **Button:** support re patching prefix after undefined ([#407](#407)) ([e773c32](e773c32))
* **NavigationManager:** adjust isFullyOnScreen and isComponentOnScreen ([#417](#417)) ([32601bd](32601bd))
* remove applySmooth in button ([#409](#409)) ([d2c29dd](d2c29dd))
* **TabBar:** propogate key press events and emit tabChanged signal ([#406](#406)) ([9f06b81](9f06b81))
* **TitleRow:** alias rowMarginTop to titleMarginBottom ([#404](#404)) ([c2c3eb4](c2c3eb4))
* update Checkbox, Radio, and Toggle style mappings ([#408](#408)) ([1e93576](1e93576))

### Features

* **Button:** only repatch prefix/suffix row if props change ([#410](#410)) ([9297903](9297903))
@svc-lightning-ui-components
Copy link
Collaborator

🎉 This PR is included in version @lightningjs/ui-components-v2.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants