Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add mega menu content layout and styles #1338
Add mega menu content layout and styles #1338
Changes from all commits
c8eb925
c6072ef
9e48c1d
9bc5135
1df2554
00c3611
c2e683f
b1fdb18
7259216
81450ce
6dc76a7
7980df6
d3b72d4
e357411
cd322bf
7581e8f
544968b
2f854a4
283e242
2b14cee
cff04b6
630713d
fb5671f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw a previous comment related to this - and saw that you were going to explore other more flexible grid options.
One option here could be to provide a setting - similar to what we have for the collection grid now. Where merchants could pick how many columns they would like from 1-6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. I will consolidate some of the suggestions around columns and loop in UX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martinamarien - Great option. As a quick thought process, some sellers will have multiple mega menus with different column counts/content, so your suggested setting would have to be per mega menu to be truly impactful. @KaichenWang said it best, the original goal of the mega menu PRs is "to enable a relatively simple way for merchants to add mega menus to their storefronts." It might be better to have the column widths auto-fit based on each mega menu's content and liquid level rules in the long run.
Side note - I see how much weight something like a mega menu has based on the comments, suggestions, and solutions people have made in both this PR and the original PR. Looking forward to @KaichenWang great work on this soon. Thanks for all of your attention to detail and patience in hearing everyone out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also noticed this on iPad/iOS: video
Where I need to scroll twice in order to get to the last item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely due to iOS Safari's interpretation of
100vh
, which I'm using in my menumax-height
calculation.To demonstrate, I added a fixed 100vh element with red borders to the page. Here's how it's rendered in desktop Safari (and most other browsers):
And here's how the same element is rendered in iOS Safari (iPad) - notice how the bottom border is cut off:
Therefore, in the worst-case scenario the menu contents may not fully fit on iPad requiring the user to scroll the page itself to reach the bottom of the menu. I'll look into adding an offset to the bottom to mitigate this; basically what you suggested here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh very interesting 👍 Thanks for comparison screenshots and explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 2f854a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only piece of javascript not wrapped in a class or custom element inside of
{% javascript %}
. For consistency, should we? Also, this will run, even if we have no menu or don't have any mega dropdowns present.