Skip to content

Fix card layout for cards without cover #2831

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
merged 1 commit into from
Feb 13, 2025

Conversation

zenoachtig
Copy link
Contributor

I accidentally broke card layouts without covers, here's a fix
Screenshot 2025-02-13 at 14 30 11
Screenshot 2025-02-13 at 14 30 18

Copy link

changeset-bot bot commented Feb 13, 2025

⚠️ No Changeset found

Latest commit: 2590edd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Copy link

argos-ci bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 9 changed Feb 13, 2025, 1:40 PM

'min-[432px]:grid-cols-none',
'min-[432px]:grid-rows-[auto,1fr]',
],
cover
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cover
cover && coverIsLandscape

Copy link
Contributor Author

@zenoachtig zenoachtig Feb 13, 2025

Choose a reason for hiding this comment

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

No I want none of these classes when there is no cover – combining the statements would still render the portrait classes if there is no cover (that's the current bug)

If there's a better way to write this logic statement I'm open to it, I don't like this double ternary

Copy link
Contributor

Choose a reason for hiding this comment

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

ha I missed the null

Comment on lines +58 to +65
? coverIsLandscape
? 'grid-rows-[auto,1fr]'
: [
'grid-cols-[40%,_1fr]',
'min-[432px]:grid-cols-none',
'min-[432px]:grid-rows-[auto,1fr]',
]
: null,
Copy link
Member

Choose a reason for hiding this comment

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

Nested ternaries are a pain for readability but I guess it's fine here

@zenoachtig zenoachtig merged commit 9f30af1 into main Feb 13, 2025
12 checks passed
@zenoachtig zenoachtig deleted the fix-card-layout-without-cover branch February 13, 2025 14:13
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.

3 participants