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

🌸Components: Remove blank space from Cards without content #1709

Merged
merged 5 commits into from
Aug 2, 2023

Conversation

rosschapman
Copy link
Contributor

@rosschapman rosschapman commented Jul 27, 2023

Testing

  • I've QA'd every usage of CardComponent I could find and didn't notice any UI issues.

Screenshots

Here's a before/after of the Marketplace::ManagementComponent on the Manage Marketplace landing screen. If there is no content, the content section will not display:

image image

@zspencer zspencer changed the title Updates CardComponent layout 🧹🌸: ImproveCardComponent layout Jul 27, 2023
@zspencer zspencer changed the title 🧹🌸: ImproveCardComponent layout 🧹🌸Components: ImproveCard layout Jul 27, 2023
@zspencer zspencer added 🧹 refactor Includes non-behavioral changes 🌸 Polish Improves the UX! labels Jul 27, 2023
Comment on lines +9 to +11
<div class="flex flex-col space-y-3">
<%= render onboarding_component %>
<%= render CardComponent.new do |card| %>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Author note: This flips layout handling of the CardComponent from the component itself to the container. Generally follows the (my) principle of Components should be unaware of their layout context.

@rosschapman rosschapman marked this pull request as ready for review July 27, 2023 21:20
Copy link
Member

@zspencer zspencer left a comment

Choose a reason for hiding this comment

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

Ship it!

@zspencer zspencer changed the title 🧹🌸Components: ImproveCard layout 🧹🌸Components: Prevent empty space when rendering Card without content Jul 27, 2023
@zspencer zspencer removed the 🧹 refactor Includes non-behavioral changes label Jul 27, 2023
@zspencer zspencer changed the title 🧹🌸Components: Prevent empty space when rendering Card without content 🌸Components: Remove blank space from Cards without content Jul 27, 2023
@rosschapman rosschapman merged commit cc72c81 into main Aug 2, 2023
@rosschapman rosschapman deleted the issue-1622-sub-1605-card branch August 2, 2023 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌸 Polish Improves the UX!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants