Skip to content

fix(Textbox): stops flash on inlineContent change #521

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

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

slhay28
Copy link
Contributor

@slhay28 slhay28 commented Jun 25, 2024

Description

It was noticed that the TextBox would flash when loading. This would occur when the TextBox contained content that were of type InlineContent and any property changed. This was due to the number of lines in the flex container potentially being more than the maxLines within the InlineContent. It would then calculate the height based on this wrong number and send it back to the TextBox and flash the wrong number of lines.

References

LUI-1435

Testing

  • Check to make sure everything within both the InlineContent stories and TextBox stories renders as expected.
  • Specifically, make sure that when changing the maxLines control, it works as expected and that there is no flashing of the component.

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

@ctoddy
Copy link
Contributor

ctoddy commented Jun 25, 2024

Screenshot 2024-06-25 at 11 11 36 AM Not sure why but every time I load the component it shows up cut off like the screenshot here. Not sure if that's expected. I'm able to get around it by adjusting the justifyContent prop.

@ctoddy
Copy link
Contributor

ctoddy commented Jun 25, 2024

Screen.Recording.2024-06-25.at.11.14.01.AM.mov

I'm somewhat able to still see the flashing when I switch between wrapped and not wrapped, but I'm not sure how realistic this scenario would be for a user/ seems like this could be outside of the scope of the original problem you fixed.

@slhay28
Copy link
Contributor Author

slhay28 commented Jun 25, 2024

@ctoddy

  • regarding the component showing up cut off- I believe there is another ticket regarding that and it is not a result of this pr
  • regarding the flash, ill look back into that

@slhay28 slhay28 marked this pull request as draft July 3, 2024 13:54
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