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

feat(tile): add responsive layout features #8681

Closed
wants to merge 24 commits into from

Conversation

eriklharper
Copy link
Contributor

@eriklharper eriklharper commented Feb 1, 2024

Related Issues: #6662 #6690

Summary

This PR adds responsive layout features and some design improvements to the Tile component, including:

  • Tile: min and max inline-size (width) for all 3 scales
  • Tile: alignment property, supporting start and center

Other improvements include refactoring Tile to remove the deprecated ConditionalSlotComponent interface and improving style encapsulation to allow more defined control of theming with css custom properties.

…s in the shadowRoot to force using css variables to override themeable settings. Removing tailwind usage, and adding a couple component tokens to get things started
…dth just to make sure the entire tile conforms to size of whatever is calculated on the host
… when used inside tile group. Adding more tile-group css to control the layout per design spec. Got tiles to match height in row tracks, just need to figure out a way to make them match on wrapped rows
…t of largest tile. adding tile group story file to start
@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Feb 1, 2024
@eriklharper eriklharper added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Feb 1, 2024
@eriklharper eriklharper added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Feb 1, 2024

box-sizing: border-box;
display: inline-block;
max-inline-size: 460px;
Copy link
Contributor

Choose a reason for hiding this comment

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

where are these pixel sizes coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the Figma specs:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

@SkyeSeitz should these be container tokens or based off container tokens?

Choose a reason for hiding this comment

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

@alisonailea great question. The ones highlighted in blue below are the only values with something close in our container tokens. Do you think we should add the rest as container tokens?

image

@apply pointer-events-none
break-words;
color: var(--calcite-color-text-2);
color: var(--calcite-tile-heading-text-color);
font-size: var(--calcite-font-size--1);
font-weight: 500;
line-height: 1.20313rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this line height coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also from the Figma file. These are copied verbatim from the styles panel of the corresponding text elements:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

@SkyeSeitz we haven't set Semantic Tokens in Tile Component yet right? I think this needs to be replaced with a semantic line-height token. Pick the one closest to this value.

@eriklharper eriklharper marked this pull request as ready for review February 1, 2024 23:32
@eriklharper eriklharper requested a review from a team as a code owner February 1, 2024 23:32
@eriklharper
Copy link
Contributor Author

I'm going to split this PR in two and make a separate one just for adding Tile Group on its own.

@eriklharper eriklharper removed the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Feb 2, 2024
@eriklharper eriklharper changed the title feat(tile, tile-group): responsive layout feat(tile): responsive layout Feb 2, 2024
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

I have some minor comments, but once @alisonailea's token comments have been addressed, this should be good to merge!

@jcfranco
Copy link
Member

jcfranco commented Feb 2, 2024

@eriklharper Also, can you update your PR title to be a sentence vs noun phrase? This will better align with the Ionic commit message format guidelines we follow (per our contributing guidelines).

@eriklharper eriklharper changed the title feat(tile): responsive layout feat(tile): add responsive layout features Feb 2, 2024
@eriklharper eriklharper closed this Feb 3, 2024
@eriklharper eriklharper deleted the eriklharper/6662-tile-redesign branch February 3, 2024 00:38
@eriklharper
Copy link
Contributor Author

Changed the branch name, closing this in favor of: #8691

eriklharper added a commit that referenced this pull request Feb 20, 2024
**Related Issues:** #8615 #6691 #6662

## Summary

This PR adds the new `calcite-tile-group` component. It includes these
responsiveness features that address #6691:

- Wrapped Tiles match width of Tiles above
- Wrapped Tiles match height of tallest Tile in the group

The changes in this PR were extracted from and depend on the changes in
#8681.

---------

Co-authored-by: Erik Harper <eriklharper@pm.me>
jcfranco pushed a commit that referenced this pull request Feb 22, 2024
**Related Issues:** #8615 #6691 #6662

## Summary

This PR adds the new `calcite-tile-group` component. It includes these
responsiveness features that address #6691:

- Wrapped Tiles match width of Tiles above
- Wrapped Tiles match height of tallest Tile in the group

The changes in this PR were extracted from and depend on the changes in
#8681.

---------

Co-authored-by: Erik Harper <eriklharper@pm.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants