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: calculated height displayed in the inspector for Button and Tile #403

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

erautenberg
Copy link
Contributor

Description

Per, LUI-1192 the height of the Button in the inspector is zero. On further inspection of Tile, which also utilizes get h(), I figured out that the inspector is not updated unless the this._h value is updated and the _updateDimensions method is triggered.

For Button:
I had to balance not wanting to manually set "h" and flipping the "hSetByUser" flag and potentially circumventing style/theme updates from changing the Button's dynamic height.

For Tile:
We needed to retain the original size of the Tile without the Metadata via "innerH" and "_h." The final solution was to tap into _getRenderHeight and return the value we want, not automatically assume this._h is correct.

References

Testing

  1. Inspect the Button and Tile components in storybook and confirm that the value of height reflects the actual component height.
  2. Try manually setting the height of the Button per fix(Button): ensure height will be honored if set in or outside styles #399:
  1. In the Button story, trying setting the height via "h" on the component, or nested inside of "style" (both as "h" and "height").
  2. Confirm that the "expanding height" stories in Row and Column now work as expected.

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.

@erautenberg erautenberg force-pushed the fix/Button-Tile-height branch from 253a728 to 2a71630 Compare November 9, 2023 18:57
@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

Copy link
Contributor

@ImCoolNowRight ImCoolNowRight left a comment

Choose a reason for hiding this comment

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

As far as I can tell, this is looking good!

@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

@erautenberg erautenberg merged commit a84c1f7 into develop Nov 14, 2023
5 checks passed
@erautenberg erautenberg deleted the fix/Button-Tile-height branch November 14, 2023 19:37
svc-lightning-ui-components pushed a commit that referenced this pull request Nov 14, 2023
# [@lightningjs/ui-components-v2.16.1](https://github.com/rdkcentral/Lightning-UI-Components/compare/@lightningjs/ui-components-v2.16.0...@lightningjs/ui-components-v2.16.1) (2023-11-14)

### Bug Fixes

* calculated height displayed in the inspector for Button and Tile ([#403](#403)) ([a84c1f7](a84c1f7))
@svc-lightning-ui-components
Copy link
Collaborator

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

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