Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

UI4: Card & Row Components #4593

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

Merged
Jon-edge merged 2 commits into develop from jon/ui4/components
Dec 2, 2023
Merged

UI4: Card & Row Components #4593

Jon-edge merged 2 commits into develop from jon/ui4/components
Dec 2, 2023

Conversation

@Jon-edge
Copy link
Collaborator

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

  • 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)

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.

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

@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.

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

Copy link
Collaborator Author

@Jon-edge Jon-edge Nov 24, 2023
edited
Loading

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.

swansontec reacted with thumbs up emoji

// UI 4.0:
cardBackgroundUi4: palette.teal,
cardRadiusUi4: 1,
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.

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
edited
Loading

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

@swansontec swansontec Dec 1, 2023

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
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 merged commit 969387c into develop Dec 2, 2023
@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

Reviewers

@swansontec swansontec swansontec requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /