Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Add the header section - #4

Merged
srgzlb merged 5 commits into
mainfrom
feature/sc-1876-set-up-basic-environment-for-small-theme
Oct 10, 2025
Merged

srgzlb merged 5 commits into
mainfrom
feature/sc-1876-set-up-basic-environment-for-small-theme

Conversation

@srgzlb

@srgzlb srgzlb commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

This PR introduces the header section.

Updated .stylelintrc.json to enforce a stricter CSS class naming pattern, helping maintain consistent and readable class names across the codebase.

Removed the unused code/files to keep the repository clean and focused on production code.

Arc 2025-10-07 10 50 32 Arc 2025-10-07 10 51 13

@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown

🔍 Code Quality Report

  • SCSS Linting: ✅ Passed
  • JavaScript Linting: ❌ Failed
  • Build Process: ✅ Passed

⚠️ Please fix linting errors before merging.
Run npm run lint:fix to auto-fix common issues.

@srgzlb srgzlb added review Please look at my code shop-team Shop and commerce labels Oct 7, 2025
@dabrorius
dabrorius self-requested a review October 7, 2025 08:02

@dabrorius dabrorius left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm not sure about the class naming approach. I think it is leaning too much into flexibility direction, I'd rather keep it as simple as possible and extract variables only for setting we plan to be configurable.

Comment thread src/sections/header.liquid Outdated
Comment thread src/sections/header.liquid Outdated
{%- if menu != blank -%}
{%- if app -%}
{%- capture element_app_mobile -%}
<div class="{{- class -}}__app">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why is class here a variable? Can we just do <div class="header__app"> instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just wanted to keep the code in one style 😁
I didn't manage to finish the apps yet. Just copied from the Chameleon theme. Will handle it later

Comment thread src/snippets/menu.liquid Outdated
</i>
{%- endcapture -%}

<div id="{{- section_class -}}-{{- class -}}" class="{{- section_class -}}__{{ class }} {{ class }}">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we plan to use this menu anywhere outside of the header?
I'm not sure that this approach is worth it, it makes code very hard to read. Can't we just have normal hard-coded classes everywhere?
If I wanted to change the styling of this DIV i have no idea where to start as the CSS classes could be anything.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Considering the development experience of our existing themes, which share similar menu structures in at least three places, we can reuse this snippet in the footer and sidebar on the collection page. That's why there are menu_levels and use_opener keys, which allow the menu to be used anywhere.
I believe, it will also help us to make our work easier in monorepository

@dabrorius dabrorius Oct 9, 2025 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we use the similar approach as for example Shopify Dawn theme header or mega menu? They have clearly defined classes.

The menu will always be a menu, right? So we can have something like this:

<div class="menu">

Then if we need to conditionally change styles when this menu is in footer, we can do something like:

<div class="menu{% if position=="footer" %} menu--footer{% endif %}

That way it would be easier to see what class combinations are supported and make sense.

Is this approach with flexible classes like class="{{- section_class -}}__{{ class }} {{ class }}" considered best practice in Liquid?

@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown

🔍 Code Quality Report

  • SCSS Linting: ✅ Passed
  • JavaScript Linting: ✅ Passed
  • Build Process: ✅ Passed

🎉 All checks passed! Ready for review.

@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown

🔍 Code Quality Report

  • SCSS Linting: ✅ Passed
  • JavaScript Linting: ✅ Passed
  • Build Process: ✅ Passed

🎉 All checks passed! Ready for review.

- Updated minification process for JavaScript files to include additional compression options.
- Changed SVG build process to utilize a new optimization script instead of copying files directly.
- Improved SVG icons for better structure and readability.
- Added a new utility script to optimize SVG files, reducing file size and improving performance.
@github-actions

github-actions Bot commented Oct 8, 2025

Copy link
Copy Markdown

🔍 Code Quality Report

  • SCSS Linting: ✅ Passed
  • JavaScript Linting: ✅ Passed
  • Build Process: ✅ Passed

🎉 All checks passed! Ready for review.

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

  • SCSS Linting: ✅ Passed
  • JavaScript Linting: ✅ Passed
  • Build Process: ✅ Passed

🎉 All checks passed! Ready for review.

@srgzlb srgzlb removed review Please look at my code shop-team Shop and commerce labels Oct 10, 2025
@srgzlb
srgzlb merged commit cd74703 into main Oct 10, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants