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

UI4: Card & Row Components #4593

Merged
merged 2 commits into from
Dec 2, 2023
Merged

UI4: Card & Row Components #4593

merged 2 commits into from
Dec 2, 2023

Conversation

Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Nov 22, 2023

  • CardUi4
  • SectionView
  • RowUi4

See branches future'd with this branch for additional visuals.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@Jon-edge Jon-edge mentioned this pull request Nov 22, 2023
6 tasks
Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

Small changes needed.

src/components/ui4/RowUi4.tsx Outdated Show resolved Hide resolved
src/components/ui4/RowUi4.tsx Outdated Show resolved Hide resolved
Comment on lines +113 to +116
// TODO: Adjust margin/padding so everything combines with correct layout no
// matter the combination of UI4 components.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ambitious. I assume this will happen later as more stuff gets built out?

Copy link
Collaborator Author

@Jon-edge Jon-edge Nov 24, 2023

Choose a reason for hiding this comment

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

Yes, I tried to start doing it and then found I had to make more changes upon tackling subsequent tasks and thinking of new rules for margin handling for sub components.

Figured it would be better to just handle it at the end to make sure everything works and avoid all the rebasing, it's already almost there at this point.

@@ -394,5 +397,8 @@ export const edgeDark: Theme = {
guiPluginLogoMoonpay: guiPluginLogoMoonpay,

// UI 4.0:
cardBackgroundUi4: palette.teal,
cardRadiusUi4: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

We usually avoid putting dimensions in the theme, and instead rely on rem to scale things.

If we are committed to having the radius in the theme for some reason, then it's weird to do theme.rem(theme.cardRadius). Maybe just return the radius in dp's, not rem's, since the theme controls the scaling already.

Copy link
Contributor

@swansontec swansontec Nov 24, 2023

Choose a reason for hiding this comment

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

Just checked, and the other theme dimensions are already in raw dp's, such as thinLineWidth or secondaryButtonOutlineWidth.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a rem, I can rename the var

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it should be rem in the first place, but the rename is also an acceptable solution.

@Jon-edge Jon-edge mentioned this pull request Nov 25, 2023
6 tasks
@Jon-edge Jon-edge force-pushed the jon/ui4/components branch 4 times, most recently from 8a2633d to f59d9c8 Compare December 1, 2023 23:01
@Jon-edge Jon-edge enabled auto-merge December 1, 2023 23:01
Largely copied from Tile.
- Converted to a functional component
- Removes the bottom divider to let the caller handle dividers
Largely copied from Card.
- Styled according to UI4 guidelines
- Adds new functionality to automatically add styled dividers when multiple children are given.
@Jon-edge Jon-edge disabled auto-merge December 2, 2023 00:17
@Jon-edge Jon-edge merged commit 969387c into develop Dec 2, 2023
1 of 2 checks passed
@Jon-edge Jon-edge deleted the jon/ui4/components branch December 2, 2023 00:17
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