-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feature] Text component #591
Conversation
…ent-of-veterans-affairs/va-mobile-library into feature/548-narin-text-component
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.
Dropping a preemptive request changes to fix the 5 linting issues in the PR that are causing linting checks to fail.
* Convenience function that accepts a spacing size abbreviation and returns the corresponding | ||
* spacing token | ||
*/ | ||
export function getSpacingToken(size: SpacerSize): number { |
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.
Don't feel strongly that anything be changed, but raising the question of if this should be in utils
somewhere instead of the component.
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.
Created a new utils/tokens.ts
file and added to the utils index export. Moved this function there.
} | ||
|
||
const style: TextStyle = { | ||
...typography[typographyKey as keyof typeof typography], |
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.
Could this be simplified typing typographyKey at instantiation?
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.
Moving it to the instantiation causes some TS complaints with the template literals. I was able to remove it for the sizeMap key though.
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.
Mostly good to go, requesting changes primarily to clean up the doc around navigation
which no longer exists in the component.
Also had some other comments/suggestions, but none that explicitly need changing.
Edit: Also watching the rest of the PR videos, not sure if the iOS one was just in progress, but if it's reading the "body" blocks as "heading" it doesn't seem like it should be and should be updated--code-wise, it looks like it should be fine though.
…ography key. Update text for stories
Description of Change
Implementation of a new Text component that displays text based on our typography tokens
Testing Packages
Screenshots/Video
Web
Screen.Recording.2024-11-12.at.10.00.50.AM.mov
iOS
ScreenRecording_11-12-2024.10-17-18_1.MP4
Android
screen-20241112-103102.mp4
iOS Voiceover
ScreenRecording_11-12-2024.10-32-02_1.MP4
Android Talkback
screen-20241112-103427.mp4
In-app test
Testing
PR Checklist
Code reviewer validation:
changelog
label applied if it's to be included in the changelogPublish
If changes warrant a new version per the versioning guidelines and the PR is approved and ready to merge:
main
into branchmain