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

Cleaner DealInfo screen #33

Merged
merged 29 commits into from
Jan 9, 2025
Merged

Conversation

josh-leyshon
Copy link
Owner

@josh-leyshon josh-leyshon commented Jan 9, 2025

  • Replaced old DealInfo screen with new Card based design.

  • Removed old VoteButtons, since for the foreseeable future we won't support logging in anyway.

  • Added new TextPart object and system. Deal title and descriptions are now "parted" as part of parsing. Parts are for highlighting parts of text based on what they are, like a price in a title or a link in a description. Rendering TextParts is still simple, just render them in <Text>s next to each other.

  • Added new base Card component for wrapping any react node.

  • Refactored DealCard to actually just export the info within the card. Now up to callers to wrap the info in a Card. This lets us reuse the info components in DealInfo screen with a different card wrapper.

  • Change base Button component to only accept base colours.

  • Button also can now resize to fit content with new fitContent prop.

  • Add base Link component, built on Text.

  • Extracted openLink() function DealInfo screen to base/links/.

Screenshots

Screenshots taken in Firefox mobile emulator, so fonts aren't as nice as on mobile.

Before After
image image

…uilt Pressable component works

Signed-off-by: Josh Leyshon <[email protected]>
…nent. Use it fro DealCard

Signed-off-by: Josh Leyshon <[email protected]>
…s need to wrap it in a Card if they want

Signed-off-by: Josh Leyshon <[email protected]>
Signed-off-by: Josh Leyshon <[email protected]>
…ts out Links, the other parts still have html tags in them

Signed-off-by: Josh Leyshon <[email protected]>
… this lets us now keep tables and other special formatting

Signed-off-by: Josh Leyshon <[email protected]>
…g the amount of description TextParts to render

Signed-off-by: Josh Leyshon <[email protected]>
… flex-basis doesn't work as expected there, but can use grow and shrink instead.

Signed-off-by: Josh Leyshon <[email protected]>
@josh-leyshon josh-leyshon marked this pull request as ready for review January 9, 2025 10:35
@josh-leyshon josh-leyshon merged commit e9a7363 into master Jan 9, 2025
3 checks passed
@josh-leyshon josh-leyshon deleted the joosh-cleaner-deal-info-screen branch January 9, 2025 10:35
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.

1 participant