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

Fixed active facets tap target and drawer scrolling #98

Merged
merged 4 commits into from
Jul 7, 2021

Conversation

tyleralsbury
Copy link
Contributor

@tyleralsbury tyleralsbury commented Jul 5, 2021

Why are these changes introduced?

First part of faceted filtering fast follow fixes. #100

What approach did you take?

Tap targets

Changed up the markup a bit for the pills so that they now have a wrapper <a> with a <span> inside that have the pill styles. The <a> has padding to ensure that it will always be at least 44px (actually 45px given the current line heights, etc...) to follow accessible tap target principles

Equivalent targets: If there is more than one target on a screen that performs the same action, only one of the targets need to meet the target size of 44 by 44 CSS pixels.

Source - w3.org

Scrolling issue

When a drawer is open, the content behind should not be scrollable. The menu-drawer custom element was already adding a class for this, but the class wasn't doing anything. I added overflow-y: hidden to prevent vertical scrolling when the class is on the body.

Other considerations

The menu-drawer custom element is also used for the main menu and the overflow breakpoints are different for the two. I've needed to add a mobile version and a tablet version of the overflow hidden class.

Testing

Store

Checklist

@tyleralsbury tyleralsbury marked this pull request as ready for review July 5, 2021 15:56
@sofiamatulis sofiamatulis self-assigned this Jul 5, 2021
Copy link
Contributor

@sofiamatulis sofiamatulis left a comment

Choose a reason for hiding this comment

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

Did a first pass and added some comments 👍

<span class="active-facets__button-inner button button--tertiary">
{%- if filter.min_value.value -%}{{ filter.min_value.value | money }}{%- else -%}{{ 0 | money }}{%- endif -%}-{%- if filter.max_value.value -%}{{ filter.max_value.value | money }}{%- else -%}{{ filter.range_max | money }}{%- endif -%}
{% render 'icon-close-small' %}
</span>
</a>
{%- endif -%}
Copy link
Contributor

Choose a reason for hiding this comment

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

On Safari, the background is still scrollable: https://screenshot.click/05-51-wiacu-ueec2.mp4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's weird. Version? It seems to be working as far as I can tell.

Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't been able to reproduce it 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🎩 Magic!
🧚

Copy link
Contributor

Choose a reason for hiding this comment

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

Can't replicate anymore on my iPad either. 👍

@Oliviammarcello
Copy link
Contributor

Oliviammarcello commented Jul 5, 2021

Looks good @tyleralsbury.

Just have a few notes related to the active facets tap targets; drawer scrolling looks great. FYI All other UI notes have just been added to a polish review here.

  • The active facets are outside of the margins on tablet and mobile. Screenshot
  • The 'X's to remove pills are slightly too high on mobile (desktop is perfect). Screenshot

@ludoboludo ludoboludo self-requested a review July 5, 2021 18:26
@ludoboludo ludoboludo self-assigned this Jul 5, 2021
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.

Other than what Olivia and Sofia mentioned, I don't see any issue.

@tyleralsbury
Copy link
Contributor Author

Should be ok for a second round.

  • We kept the font size at 1rem (checked with Olivia)
  • I can't reproduce the Safari scrolling issue... gonna dig a bit and see.

Copy link
Contributor

@sofiamatulis sofiamatulis left a comment

Choose a reason for hiding this comment

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

Retested and it looks good :)

Haven't been able to reproduce the safari issue

@tyleralsbury tyleralsbury merged commit 197475c into main Jul 7, 2021
@tyleralsbury tyleralsbury deleted the filtering-fixes branch July 7, 2021 18:06
@tyleralsbury
Copy link
Contributor Author

Merged - thanks for the review, y'all!

stufreen pushed a commit that referenced this pull request Mar 15, 2023
* Remove default section in index and product templates for experiment 1

* Add 4th digit to theme version number

* Remove release notes

* Remove footer blocks

* Revert "Remove release notes"

This reverts commit ec430c31ef5a4738059dd00036b29992aa4691b6.

* Revert "Add 4th digit to theme version number"

This reverts commit a301e58a6e1d8ce0a090d0bba460f02b58c29e8f.

* Fix whitespace
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
* Filtering - Fixed a11y issue with tap targets on active filters

* Added drawer functionality to handle overflow changes at different breakpoints
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.

4 participants