-
Notifications
You must be signed in to change notification settings - Fork 611
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
Move clear link outside of Faceted Search navigation button #1755
Move clear link outside of Faceted Search navigation button #1755
Conversation
- Componentize navigation - Remove some extraneous whitespace - Remove unneeded “../“ - Remove unneeded Replace helper - Move “Remove” link outside button
Autotagging @bigcommerce/storefront-team @davidchin |
@bigcommerce/artemis-dt |
@@ -46,7 +27,7 @@ <h5 class="accordion-title"> | |||
</ul> | |||
|
|||
{{#if show_more_toggle}} | |||
<a href="#facetedSearch-navList--{{#replace '&' (hyphenate facet) }}{{else}}{{hyphenate facet}}{{/replace}}" role="button" class="toggleLink"> | |||
<a href="#facetedSearch-navList--{{dashcase facet}}" role="button" class="toggleLink"> |
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.
@lord2800 will this break things for facets which have &
?
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.
@junedkazi , Nope! IMO, dashcase is the correct helper to use here as it strips special characters and converts everything into a nice, usable form.
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.
Yeah, I wish I'd found that when we were initially looking into that problem. 😢
@mattcoy-arcticleaf this is good to go. We need to hold off on merge because we are in the process of doing a release. As soon as that is rolled out we will merge this one. |
@junedkazi no worries. Do you want me to make a changelog entry? |
What?
The current HTML markup for the link to clear faceted search element's items is invalid as it is located inside a button. This update moves the clear link outside the navigation button, so it no longer violates W3C markup standards (see below for a screenshot of the error message). This update also adds padding so the title of the filter does not overlap with the clear button.
Additionally, this update componentizes the faceted search navigation. Previously, the faceted search navigation code was repeated in the exact same code across 3 different templates.
Lastly, this update cleans up some extraneous whitespace (for consistency with the rest of the codebase) and otherwise questionable code.
The only visible change to the theme is, as stated above, the padding adjustment to prevent the overlap of the faceted search filter title and the clear button.
Tickets / Documentation
N/A
Screenshots (if appropriate)