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

Updated home page and blog detail page ui #46

Closed
wants to merge 53 commits into from
Closed

Conversation

snowiewdev
Copy link

@snowiewdev snowiewdev commented Sep 20, 2024

Updates:

  • Updated home page ui
    • updated hero section with masonry and brick block
    • added topic section with media block
    • added article-grid block and updated banner block for featured blog and latest articles section
  • Updated blog detail page ui
    • updated article hero banner and article-meta ui
    • added sidebar to blog content

Article Test URLs:

Homepage Test URLs:

Figma of updated design:

The homepage content on staging is provided by Kristine so it should be good to go live. But wondering if

  1. there's a standard list of blogs/pages to go through for QA process before merging in PR? (as the sidebar implementation may affect the ui of other blocks in blog content that we may not be aware of)
  2. do we need content from other regions/language, e.g. Italian & Japanese, to update homepage for other regions as well?

Let me know if any code adjustments is needed as I've applied code changes only within this repo (no Milo update).
Thank you.

@@ -0,0 +1,126 @@
/* use styles based on live milo libs */
@import "https://main--milo--adobecom.hlx.live/libs/blocks/section-metadata/section-metadata.css";
@import "https://main--milo--adobecom.hlx.live/libs/blocks/media/media.css";
Copy link
Contributor

@rgclayton rgclayton Sep 25, 2024

Choose a reason for hiding this comment

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

This is problematic, using .live URLS.

The better approach would be to use libs utils and load them via JS. We don't want .live resources loading for production content.

I would almost opt for most of this CSS living in https://github.com/adobecom/blog/blob/main/styles/styles.css if this grid should work on all pages. Keeping only direct grid related css here. Media, banner, section-metadata, etc living in /styles/styles.css

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the flag. Followed Momiko's advice on using loadStyle instead of @import.
Let me know if that needs to be updated further, thank you

.article-grid .media .text h2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the vendor prefixes needed?

Copy link
Author

Choose a reason for hiding this comment

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

https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp
The -webkit property is needed for the line clamp function to work, let me know if this needs to be updated further

Copy link

@mokimo mokimo left a comment

Choose a reason for hiding this comment

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

Not blocking this and don't have all the answers, but I wonder a bit seeing at the amount of code added to scripts.js and utils.js which to some degree seem to be an existing issue.

Usually blocks should be contained and not bleed into the general project - if we look at how bacom does it https://github.com/adobecom/bacom/blob/main/scripts/scripts.js their scripts.js is ~70 lines if you discard the locale declarations.

Also it seems that you need to re-use quite a few methods like decorating placeholders yourself, which makes me wonder - why isn't milo handling this?

Placeholders should be decorated from milo, rather than you having to manually call the method.

I don't have enough context/project knowledge to approve or request changes, but some food for thought

@@ -0,0 +1,126 @@
/* use styles based on live milo libs */
@import "https://main--milo--adobecom.hlx.live/libs/blocks/section-metadata/section-metadata.css";
Copy link

Choose a reason for hiding this comment

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

You should be able to use the loadstyle method https://github.com/search?q=repo%3Aadobecom%2Fblog%20loadstyle&type=code or as @rgclayton suggested, have this live in a more general file.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you so much! Used loadStyle instead of @import, thankss

blocks/article-grid/article-grid.css Outdated Show resolved Hide resolved
scripts/scripts.js Outdated Show resolved Hide resolved
@@ -27,7 +25,7 @@ export default async function init(block) {
const bannerImage = document.createElement('div');
const bannerText = document.createElement('div');
bannerImage.classList.add('banner-image');
bannerText.classList.add('banner-text');
bannerText.classList.add('banner-text', 'dark');

Choose a reason for hiding this comment

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

Is the .dark option something that should be author-able or is this a new default? With out too much context on existing vs new, I just wonder if this will have any regression impact.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should bake this in. As Ryan P mentioned it should either use the default or be authorable. We do not want to break existing pages using the banner.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the feedback, added in variant for light, dark, no-overlay for more customization options
Staging link for banner block here: https://redesign-article--blog--adobecom.hlx.page/en/drafts/snowie-testing/blocks/banner

styles/articles.css Outdated Show resolved Hide resolved
Copy link

@ryanmparrish ryanmparrish left a comment

Choose a reason for hiding this comment

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

Overall this looks good visually on the after pages but as others have mentioned there is a lil more consideration I think as to when/where we load these additions.
I think this would be better as 2 PR's (article pages, and blog HP) just a thought, but not totally necessary as your probably trying to release this as a unit. Id have to do some testing and look at the latest implements, but we might be able to leverage metadata 'templates' etc to add these files and then pages could adopt them w/ more control. (I also know that also can mean library templates which is different grouped content, so i'd want to vet a gut check before totally suggesting this route ;) )
I plan on joining the upcoming meeting to help iron some of this stuff out and get a better handle on /blog setup as I'm a little out of the loop on this specific repo so I don't want to suggest too much w/ out giving it a lil due diligence myself. Thanks

@snowiewdev
Copy link
Author

Will close this PR and separate it into 2 PRs for update in home & article detail page

@snowiewdev
Copy link
Author

Closing this PR as created the following 2 PRs for the redesign updates:

Will mark those as ready for review once the Jira Tickets are created, thank you

@snowiewdev snowiewdev closed this Oct 15, 2024
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.

5 participants