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

Apply global theme styles to default blog posts #2727

Merged
merged 7 commits into from
Jun 27, 2023

Conversation

lougoncharenko
Copy link
Contributor

@lougoncharenko lougoncharenko commented Jun 22, 2023

PR Summary:

Default blog cards are responsive to presets and can be altered by number of blog posts to show, number of columns, color scheme, section paddings and show featured image.

Blog posts theme settings can be applied to default blog posts.

The placeholder image's height and width on default blog posts match other blog posts.

Why are these changes introduced?

Fixes #2688

What approach did you take?

I used the article card and card class names to make the default blog cards responsive to the blog card theme settings and removed the blog placeholder specific classes that weren't responsive to the theme settings.

Other considerations

Visual impact on existing themes

This new change will not impact existing merchant stores but will improve the user experience when adding a featured blog.

Testing steps/scenarios

  • Test default blog posts in mobile, tablet and desktop version
  • Remove featured image in both standard and card blog posts
  • Change number of blog posts to show in the presets
  • Change number of columns on desktop in the presets

Blog card theme settings

  • Test both styles: standard and card
  • Test the text alignment: left, center and right
  • Apply the color scheme
  • Test border styles: thickness, opacity and corner radius.
  • Test Shadow: opacity, horizontal and vertical offset and blur

Demo links

Checklist

.vscode/settings.json Outdated Show resolved Hide resolved
Copy link
Contributor

@ludoboludo ludoboludo left a comment

Choose a reason for hiding this comment

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

Works as expected 👍
Left a few comments for potential tweaks

sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Show resolved Hide resolved
sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Outdated Show resolved Hide resolved
sections/featured-blog.liquid Show resolved Hide resolved
Copy link
Contributor

@kmeleta kmeleta left a comment

Choose a reason for hiding this comment

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

Looks good! The duplicate card markup of course isn't ideal, but doesn't look as bad as I thought. At least we get to remove the old placeholder styles. Let's just address the comments Ludo has up and I'll look to approve after. Also thank you for the helpful PR description/testing steps 👌

Copy link
Contributor

@Oliviammarcello Oliviammarcello left a comment

Choose a reason for hiding this comment

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

I'm happy to review it again if there are any larger code changes that need to be done, otherwise it LGTM. 🎉

Copy link
Contributor

@ludoboludo ludoboludo left a comment

Choose a reason for hiding this comment

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

Looking good, just had one comment about the ratio value but otherwise looks good to go.

So feel free to adjust or ship as is if that was the intended height 👍

style=" {% if settings.blog_card_style == 'standard' %} --ratio-percent: 100%;{% elsif settings.blog_card_style == 'card' %} --ratio-percent: 0%;{% endif %}"
>
<div class="card__inner{% if settings.blog_card_style == 'standard' %} color-{{ settings.blog_card_color_scheme }} gradient{% endif %} ratio"
style="--ratio-percent: 80%;"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any specific reason why we use 80% here instead of 100% ?

Here I set one image to use 100% to compare what it looks like next to the 80%:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when I spoke with @Oliviammarcello, she preferred the 80 :)

@lougoncharenko lougoncharenko merged commit 6f886d0 into main Jun 27, 2023
5 checks passed
@lougoncharenko lougoncharenko deleted the apply-global-theme-styles-to-default-blog-posts branch June 27, 2023 16:23
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
* applied global theme settings

* global theme settings applied, image sized to match other blog posts, preset settings work

* fixed spacing for stylesheet

* removing change to settings

* applied changes suggested in code review

* applied suggested changes from code review

---------

Co-authored-by: Ludo <ludo.segura@shopify.com>
This pull request was closed.
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.

Blog cards styles are not applying to placeholder images
4 participants