-
Notifications
You must be signed in to change notification settings - Fork 63
Make Homepage and Searchbar RTL-compatible #427
Conversation
* Remove all styling to make the component RTL-compatible * Change `.hero-search__form` and `.hero-search__control` to Tailwind * Remove redundant CSS * Fix rounded-corners on input and button * Center text inside the legend Co-authored-by: Olga Bulat <obulat@gmail.com>
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.
src/components/SearchGridForm.vue
Outdated
@@ -16,7 +16,8 @@ | |||
{{ $t('filters.title') }} | |||
</button> | |||
<div | |||
class="search-field field has-addons control search-control has-icons-left ms-2" | |||
class="search-field field has-addons control search-control" | |||
:class="isFilterVisible ? '' : 'ms-2'" |
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.
Would be preferable to use the { 'class': boolean }
syntax 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.
LGTM! 🚀
@@ -109,7 +110,7 @@ describe('SearchGridFilter', () => { | |||
}) | |||
expect(checkedFilters.length).toEqual(0) | |||
// Filters are reset with the initial `filterData` | |||
expect(uncheckedFilters.length).toEqual(22) | |||
expect(uncheckedFilters.length).toEqual(25) |
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.
Why is this changing?
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.
Because previously we didn't have the sizes
in mock filters in this test. Without them, the filter handling in search store fails. And after adding the sizes
option, the number of filters goes up 3 (for small
, medium
and large
, IIRC). The filters filtering
(or typing, maybe) needs to be a bit more robust, I guess, because sometimes tests pass non-array objects to some functions that use .filter
over them.
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.
Ah okay, thanks for explaining 🙂 I saw that we added the sizes to the filter but I didn't realize it added three more options instead of just one size 😂 But I get it now!
Fixes
Related to #428 by @obulat
Fixes #424 by @dhruvkb
Description
This PR made the Homepage and Search page RTL-compatible:
The search bar both on the Homepage and on the Search page has corners of the input and button correctly rounded both in LTR and RTL modes.
The "safer browsing" icon is removed, as in the transitional styles mockup, and its padding is adjusted.
The scroll to top button is moved to the opposite corner.
Testing Instructions
You can set the language to Arabic using the
Locale chooser
in the footer of non-embedded page:http://localhost:8443?embedded=false
, and then look at the RTL styles.Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin