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

Collection filtering UX polish #356

Merged
merged 65 commits into from
Aug 17, 2021
Merged

Conversation

KaichenWang
Copy link
Contributor

Why are these changes introduced?

Fixes #100

What approach did you take?

  • Visually decouple product count from product grid
  • Spacing and layout adjustments for filters in CSS

Other considerations

n/a

Demo links

Checklist

KaichenWang and others added 30 commits July 22, 2021 16:36
…ction-filtering-ux

# Conflicts:
#	sections/main-collection-product-grid.liquid
…ction-filtering-ux

# Conflicts:
#	locales/cs.schema.json
#	locales/da.schema.json
#	locales/de.schema.json
#	locales/en.default.schema.json
#	locales/es.schema.json
#	locales/fi.schema.json
#	locales/fr.schema.json
#	locales/it.schema.json
#	locales/ja.schema.json
#	locales/ko.schema.json
#	locales/nb.schema.json
#	locales/nl.schema.json
#	locales/pl.schema.json
#	locales/pt-BR.schema.json
#	locales/pt-PT.schema.json
#	locales/sv.schema.json
#	locales/th.schema.json
#	locales/tr.schema.json
#	locales/vi.schema.json
#	locales/zh-CN.schema.json
#	locales/zh-TW.schema.json
…ction-filtering-ux

# Conflicts:
#	sections/main-collection-product-grid.liquid
@@ -182,7 +182,7 @@
{% endif %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Best to view this diff with Hide whitespace changes enabled

@KaichenWang
Copy link
Contributor Author

@Oliviammarcello Thanks for the review. Updates have been made and are ready for another review.

Not sure if this is happening because of the filters, but the spacing below the collection banner image has disappeared. It can be seen in the screenshot above. If this isn't related to filters, I can make a new issue for it.

Padding has been restored

@Oliviammarcello
Copy link
Contributor

One last note about the spacing and then this is good to ship!

  • On mobile can we reduce the space between the collection title and filters from 5rem to 3rem. Screenshot
  • On desktop can we remove 3rem from the space. Screenshot

Note: this doesn't apply to the collection page when an image is added and the grey box appears. The current screens are perfect. Example.

Thanks so much!

@tauthomas01 tauthomas01 self-assigned this Aug 11, 2021
@ludoboludo ludoboludo self-requested a review August 11, 2021 20:13
Copy link
Contributor

@tauthomas01 tauthomas01 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 on my end. Works in no js as well!

<facet-remove class="mobile-facets__clear-wrapper">
<a href="{{ collection.url }}" class="mobile-facets__clear underlined-link">{{ 'sections.collection_template.clear' | t }}</a>
</facet-remove>
<button type="button" class="no-js-hidden button button--primary" onclick="this.closest('.mobile-facets__wrapper').querySelector('summary').click()">{{ 'sections.collection_template.apply' | t }}</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the first time I see a more "elaborated" inline JS code so I'm wondering if it's okay to leave it in Liquid?

Other instances throughout the theme use a more straightforward approach such as onclick="this.select();" or onclick="window.print();" which I understand because it's not affecting other components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I'm okay to leave this as-is for now, because this isn't actually part of the design polish and does not conflict with our dev principles. I do think this approach should be revisited to ensure:

  • Adequate error handling
  • Maintainability (if the target element markup is updated in the future)

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.

Looks good and works well 👍

Left just a couple comments.


span.active-facets__button-inner {
padding-bottom: 0.4rem;
padding-top: 0.2rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

on iOS it looks not properly centered vertically:

Copy link
Contributor Author

@KaichenWang KaichenWang Aug 16, 2021

Choose a reason for hiding this comment

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

Updated efaffd3

@ludoboludo
Copy link
Contributor

Oh and also I noticed a bit of a flash happening when closing the filter drawer on mobile: video but not sure what's happening.

@KaichenWang
Copy link
Contributor Author

KaichenWang commented Aug 16, 2021

@ludoboludo

Oh and also I noticed a bit of a flash happening when closing the filter drawer on mobile: video but not sure what's happening.

Updated 319b77a

@KaichenWang
Copy link
Contributor Author

KaichenWang commented Aug 16, 2021

@Oliviammarcello

One last note about the spacing and then this is good to ship!

  • On mobile can we reduce the space between the collection title and filters from 5rem to 3rem. Screenshot

On mobile, I've adjusted the top margin to 3rem (instead of 5rem)

  • On desktop can we remove 3rem from the space. Screenshot

On desktop, the 3rem top margin must be preserved to ensure there is adequate spacing between the filters and other sections that the merchant may add above

Note: this doesn't apply to the collection page when an image is added and the grey box appears. The current screens are perfect. Example.

The filters isn't aware if the collection banner above it includes an image or not. Therefore the top margin above filters is now also 3rem in this case

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.

LGTM.

The one thing I notice on iOS is this focus style getting applied on the summary but not sure if it should be fixed here or in a follow up:

iosFocusFilter.MP4

@KaichenWang
Copy link
Contributor Author

KaichenWang commented Aug 17, 2021

@ludoboludo

The one thing I notice on iOS is this focus style getting applied on the summary but not sure if it should be fixed here or in a follow up

Good catch, I think it would be better to apply focus-inset styling on those <summary> elements. I can add that in a separate PR.

Added fix here: defab2e

@KaichenWang KaichenWang merged commit a5a4840 into main Aug 17, 2021
@KaichenWang KaichenWang deleted the fix-collection-filtering-polish branch August 17, 2021 14:21
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
* Add setting to enable filtering drawer on larger devices. Adjust button styling

* Update styling. Tighten spacing

* Update from Shopify for theme dawn/fix-collection-filtering-ux

* Update from Shopify for theme dawn/fix-collection-filtering-ux

* Update from Shopify for theme dawn/fix-collection-filtering-ux

* Update from Shopify for theme dawn/fix-collection-filtering-ux

* Update styles and spacing for filters

* Adjust font sizes for filters

* Adjust alignment and spacing

* Update from Shopify for theme dawn/fix-collection-filtering-ux

* Update from Shopify for theme dawn/fix-collection-filtering-ux

* Update link style for clear

* Update from Shopify for theme dawn/fix-collection-filtering-ux

* Address design feedback

* Update locales

* Update locales/cs.schema.json

* Update locales/da.schema.json

* Update locales/de.schema.json

* Update locales/es.schema.json

* Update locales/fi.schema.json

* Update locales/fr.schema.json

* Update locales/it.schema.json

* Update locales/ja.schema.json

* Update locales/ko.schema.json

* Update locales/nb.schema.json

* Update locales/nl.schema.json

* Update locales/pl.schema.json

* Update locales/pt-BR.schema.json

* Update locales/pt-PT.schema.json

* Update locales/sv.schema.json

* Update locales/th.schema.json

* Update locales/tr.schema.json

* Update locales/vi.schema.json

* Update locales/zh-CN.schema.json

* Update locales/zh-TW.schema.json

* Add design polish to UX elements

* Add design polish to UX elements

* Add design polish to UX elements

* Add design polish to UX elements

* Add design polish to UX elements

* Adjust position of loading spinner on collections page

* Add design polish to UX elements

* Revert dbe6059

* Revert 93eb5c9

* Fix json spacing

* Change price filter input inputmode

* Fix mobile filters for no-js

* Address design feedback

* Address design feedback

* Update from Shopify for theme dawn/fix-collection-filtering-polish

* Remove alignment CSS

* Revert "Update from Shopify for theme dawn/fix-collection-filtering-polish"

This reverts commit f59d06d.

* Adjust padding of active filter

* Fix filter drawer closing animation

* Adjust section margins for collection banner and grid

Co-authored-by: shopify-online-store[bot] <79544226+shopify-online-store[bot]@users.noreply.github.com>
Co-authored-by: translation-platform[bot] <35075727+translation-platform@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Filtering] Fast Follow Fixes + UI Polish
5 participants