Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Update filter UI to match mockups (#694)

Dhruv Bhanushalid0d0275247c8
diff --git a/src/components/License/VLicense.vue b/src/components/License/VLicense.vue
index 54d894543..6cc76c78b 100644
--- a/src/components/License/VLicense.vue
+++ b/src/components/License/VLicense.vue
@@ -125,11 +125,6 @@ export default {
</script>
<style scoped>
-.icon {
- height: 1.1667em;
- width: 1.1667em;
-}
-
.bg-filled {
background-image: radial-gradient(circle, #ffffff 60%, transparent 60%);
}
diff --git a/src/components/VCheckbox.vue b/src/components/VCheckbox.vue
index 6c3ec1a24..7ef170800 100644
--- a/src/components/VCheckbox.vue
+++ b/src/components/VCheckbox.vue
@@ -124,7 +124,7 @@ export default VCheckbox
</script>
<style scoped>
.checkbox-label {
- @apply relative flex text-base leading-5;
+ @apply relative flex text-sm leading-5;
}
.checkbox {
@apply appearance-none w-5 h-5 border-dark-charcoal border rounded-sm me-3 flex-shrink-0 relative;
diff --git a/src/components/VFilters/VFilterChecklist.vue b/src/components/VFilters/VFilterChecklist.vue
index 70a580ede..abbda2620 100644
--- a/src/components/VFilters/VFilterChecklist.vue
+++ b/src/components/VFilters/VFilterChecklist.vue
@@ -1,12 +1,12 @@
<template>
<fieldset class="mb-8" @click.stop="hideLicenseExplanationVisibility">
- <legend v-if="title" class="text-2xl font-semibold mb-2">
+ <legend v-if="title" class="text-sm font-semibold">
{{ title }}
</legend>
<div
v-for="(item, index) in options"
:key="index"
- class="flex justify-between items-center mt-3"
+ class="flex justify-between items-center mt-4"
>
<VCheckbox
:id="item.code"
@@ -24,7 +24,7 @@
v-if="filterType === 'licenses'"
:ref="`${item.code}licenseIcon`"
:aria-label="$t('browse-page.aria.license-explanation')"
- class="appearance-none"
+ class="text-dark-charcoal-70 appearance-none"
type="button"
@click.stop="toggleLicenseExplanationVisibility(item.code)"
>
diff --git a/src/components/VFilters/VSearchGridFilter.vue b/src/components/VFilters/VSearchGridFilter.vue
index 5e94d4a3a..94e48a7d1 100644
--- a/src/components/VFilters/VSearchGridFilter.vue
+++ b/src/components/VFilters/VSearchGridFilter.vue
@@ -10,7 +10,7 @@
@onClearFilters="clearFilters"
>
<div class="flex items-center justify-between mt-2 mb-6">
- <h4 class="text-2xl py-2">
+ <h4 class="text-sr font-semibold py-2 uppercase">
{{ $t('filter-list.filter-by') }}
</h4>
<button
diff --git a/src/locales/en.json b/src/locales/en.json
index 4262614ae..931cfed61 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -336,7 +336,7 @@
"title": "Filters",
"filter-by": "Filter By",
"licenses": {
- "title": "License or Public Domain",
+ "title": "Licenses",
"cc0": "CC0",
"pdm": "Public Domain Mark",
"by": "BY",
@@ -358,38 +358,38 @@
"title": "Source"
},
"audio-categories": {
- "title": "Audio Category",
+ "title": "Audio category",
"music": "Music",
"sound": "Sound effects",
"podcast": "Podcast"
},
"image-categories": {
- "title": "Image Type",
+ "title": "Image type",
"photograph": "Photographs",
"illustration": "Illustrations",
"digitized-artwork": "Digitized Artworks"
},
"audio-extensions": {
- "title": "File Type",
+ "title": "File type",
"mp3": "MP3s",
"ogg": "OGGs",
"flac": "FLACs"
},
"image-extensions": {
- "title": "File Type",
+ "title": "File type",
"jpg": "JPEGs",
"png": "PNGs",
"gif": "GIFs",
"svg": "SVGs"
},
"aspect-ratios": {
- "title": "Aspect Ratio",
+ "title": "Aspect ratio",
"tall": "Tall",
"wide": "Wide",
"square": "Square"
},
"sizes": {
- "title": "Image Size",
+ "title": "Image size",
"small": "Small",
"medium": "Medium",
"large": "Large"
@@ -421,7 +421,7 @@
}
},
"filter-list": {
- "filter-by": "Filter results by",
+ "filter-by": "Filter by",
"hide": "Hide filters",
"clear": "Clear filters",
"show": "Show results",
diff --git a/src/locales/po-files/openverse.pot b/src/locales/po-files/openverse.pot
index 911dc2c69..4c271e171 100644
--- a/src/locales/po-files/openverse.pot
+++ b/src/locales/po-files/openverse.pot
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Openverse \n"
"Report-Msgid-Bugs-To: https://github.com/wordpress/openverse/issues \n"
-"POT-Creation-Date: 2022-01-21T15:40:19+00:00\n"
+"POT-Creation-Date: 2022-01-24T13:49:13+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -39,11 +39,16 @@ msgctxt "search-type.label"
msgid "Type of content to search"
msgstr ""
-#: src/components/VContentSwitcher/VMobileMenuModal.vue:24
+#: src/components/VContentSwitcher/VContentTypes.vue:6
msgctxt "search-type.heading"
msgid "Content types"
msgstr ""
+#: src/components/VContentSwitcher/VContentItem.vue:13
+msgctxt "search-type.status-beta"
+msgid "Beta"
+msgstr ""
+
#: src/components/VModal/VMobileModalContent.vue:30
msgctxt "modal.close"
msgid "Close"
@@ -904,7 +909,7 @@ msgstr ""
#: src/components/VFilters/VSearchGridFilter.vue:14
msgctxt "filter-list.filter-by"
-msgid "Filter results by"
+msgid "Filter by"
msgstr ""
msgctxt "filter-list.hide"
@@ -995,7 +1000,7 @@ msgid "Enable Mature Content"
msgstr ""
msgctxt "filters.sizes.title"
-msgid "Image Size"
+msgid "Image size"
msgstr ""
msgctxt "filters.sizes.small"
@@ -1011,7 +1016,7 @@ msgid "Large"
msgstr ""
msgctxt "filters.aspect-ratios.title"
-msgid "Aspect Ratio"
+msgid "Aspect ratio"
msgstr ""
msgctxt "filters.aspect-ratios.tall"
@@ -1027,7 +1032,7 @@ msgid "Square"
msgstr ""
msgctxt "filters.image-extensions.title"
-msgid "File Type"
+msgid "File type"
msgstr ""
msgctxt "filters.image-extensions.jpg"
@@ -1047,7 +1052,7 @@ msgid "SVGs"
msgstr ""
msgctxt "filters.audio-extensions.title"
-msgid "File Type"
+msgid "File type"
msgstr ""
msgctxt "filters.audio-extensions.mp3"
@@ -1063,7 +1068,7 @@ msgid "FLACs"
msgstr ""
msgctxt "filters.image-categories.title"
-msgid "Image Type"
+msgid "Image type"
msgstr ""
msgctxt "filters.image-categories.photograph"
@@ -1079,7 +1084,7 @@ msgid "Digitized Artworks"
msgstr ""
msgctxt "filters.audio-categories.title"
-msgid "Audio Category"
+msgid "Audio category"
msgstr ""
msgctxt "filters.audio-categories.music"
@@ -1115,7 +1120,7 @@ msgid "Modify or adapt"
msgstr ""
msgctxt "filters.licenses.title"
-msgid "License or Public Domain"
+msgid "Licenses"
msgstr ""
msgctxt "filters.licenses.cc0"
diff --git a/src/store/search.js b/src/store/search.js
index b1208fabc..4541ca6f2 100644
--- a/src/store/search.js
+++ b/src/store/search.js
@@ -36,8 +36,8 @@ import {
// The order of the keys here is the same as in the side filter display
export const mediaFilterKeys = {
image: [
- 'licenses',
'licenseTypes',
+ 'licenses',
'imageCategories',
'imageExtensions',
'aspectRatios',
@@ -47,8 +47,8 @@ export const mediaFilterKeys = {
'mature',
],
audio: [
- 'licenses',
'licenseTypes',
+ 'licenses',
'audioCategories',
'audioExtensions',
'durations',
@@ -57,7 +57,7 @@ export const mediaFilterKeys = {
'mature',
],
video: [],
- all: ['licenses', 'licenseTypes', 'searchBy', 'mature'],
+ all: ['licenseTypes', 'licenses', 'searchBy', 'mature'],
}
export const mediaSpecificFilters = {