-
Notifications
You must be signed in to change notification settings - Fork 735
Hint Refactor #3486
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
Hint Refactor #3486
Conversation
Co-authored-by: Nitzan Yizhar <[email protected]>
… improve type definitions
…ments for improved clarity and consistency
…finitions and enhance clarity in layout handling
… and enhance clarity in hint positioning logic
…optimize target alignment calculations
…et layout handling
… hint key generation for better clarity
…removing commented-out code and unnecessary padding logic
@ethanshar The hint with right targetPosition and custom content is broken: |
…ctionStrip for improved uniqueness
The issue is in the HintScreen, It didn't update the key when using the custom content feature |
@Inbal-Tish @nitzanyiz |
@ethanshar , I was wondering if we can keep all the visibility of the hint inside the
inside this hook |
@nitzanyiz |
<View marginT-100 row center> | ||
{targetPosition !== 'flex-start' && <Text marginH-s3>Text pushing button</Text>} | ||
<Hint | ||
message={'Hint'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use 'message' so we can text the long massage here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole idea of this use case was to test short message, that's why it's hard coded
I can change it, I just need the short variation of message to be extra short
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at it again, I prefer to keep it as it is
message={'Hint'} | ||
visible={showSecondHint} | ||
onBackgroundPress={this.toggleSecondHint} | ||
useSideTip={false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useSideTip must be false or we can play with this from the switches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing true will result in a wrong UI that looks bad, it's not a bug, it's just not meant for that so I rather pass false
Description
Refactor Hint component to make it more readable and maintainable
How to review
I started with breaking this refactor into several different PRs, but TBH I think it's best to just review it as new code from scratch so I submitted only the last PR
Changelog
Refactor and fix Hint component edge case position issues
Additional info