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

Add source, creator and tag links to the single result page media info #3338

Merged
merged 33 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5ff3eb9
Make chevron icons RTL-friendly
obulat Nov 11, 2023
eec9416
Add VByLine and VMediaInfo to SRP
obulat Nov 11, 2023
eb757de
Update snapshots
obulat Nov 11, 2023
7c89759
Add items-center to audio full layout
obulat Nov 16, 2023
c905277
Fix tag spacing
obulat Nov 16, 2023
f468b52
Update scroll button spacings
obulat Nov 16, 2023
49fbf7b
Update scroll button spacings
obulat Nov 16, 2023
0b56efb
Update snapshots
obulat Nov 16, 2023
0b0e167
Update fading
obulat Nov 17, 2023
92b5665
Remove line-clamping for h1 and fix CTA placement
obulat Nov 20, 2023
4f8f0f0
Improve scrolling
obulat Nov 21, 2023
792afd0
Update snapshots
obulat Nov 21, 2023
df5ff4f
Make chevron icons RTL-friendly
obulat Nov 11, 2023
00f81f5
Add VByLine and VMediaInfo to SRP
obulat Nov 11, 2023
ea04d83
Update snapshots
obulat Nov 11, 2023
94e4f8a
Add items-center to audio full layout
obulat Nov 16, 2023
31a8c41
Fix tag spacing
obulat Nov 16, 2023
dd35857
Update scroll button spacings
obulat Nov 16, 2023
ec7ac70
Update scroll button spacings
obulat Nov 16, 2023
9c49d46
Update snapshots
obulat Nov 16, 2023
7d23a73
Update fading
obulat Nov 17, 2023
f4c52f9
Remove line-clamping for h1 and fix CTA placement
obulat Nov 20, 2023
890c33f
Improve scrolling
obulat Nov 21, 2023
9a4c298
Update snapshots
obulat Nov 21, 2023
42899f4
Merge branch 'additional_search_views/VByLine' of github.com:WordPres…
obulat Nov 21, 2023
f87a6b1
Remove unused variable
obulat Nov 21, 2023
6d06265
Add more spacing to scroll buttons
obulat Nov 21, 2023
2377d58
More fading
obulat Nov 21, 2023
491d652
Fix scrolling edge-cases
obulat Nov 22, 2023
f82295a
Stop using the ui store for button variant
obulat Nov 22, 2023
8a3f717
Add requested changes
obulat Nov 22, 2023
0688cee
Merge branch 'main' into additional_search_views/VByLine
obulat Nov 26, 2023
7c35d62
Remove scroll snap and update last 2 scrolls
obulat Nov 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/svg/raw/chevron-forward.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 39 additions & 2 deletions frontend/src/components/VAudioTrack/layouts/VFullLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@
</div>
</div>
<div
v-if="additionalSearchViews"
class="mx-auto grid grid-cols-1 grid-rows-[auto,1fr] gap-y-6 p-6 pb-0 sm:grid-cols-[1fr,auto] sm:grid-rows-1 sm:gap-x-6 lg:mb-6 lg:max-w-5xl"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think here we need to add here the items-center class to align all elements in the middle from sm to beyond. Otherwise they're top aligned, here is what I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After discussing this synchronously, we decided to add a top margin of 4px to the CTA (Get media button) to make it well-balance both for single line titles and longer titles.

>
<div
class="row-start-1 flex justify-between gap-x-6 sm:col-start-2 sm:mt-1"
>
<slot name="audio-control" layout="full" size="medium" />
<VGetMediaButton
:media="audio"
media-type="audio"
class="col-start-2 !w-full px-0 sm:!w-auto sm:flex-shrink-0"
/>
</div>
<VMediaInfo :media="audio" class="min-w-0" />
</div>
<div
v-else
class="mx-auto grid grid-cols-1 grid-rows-[auto,auto] gap-6 p-6 pb-0 lg:mb-6 lg:max-w-5xl lg:flex-nowrap"
>
<div class="row-start-1 flex justify-between gap-x-6 sm:col-start-2">
Expand Down Expand Up @@ -56,14 +73,18 @@ import { computed, defineComponent, PropType } from "vue"

import type { AudioDetail } from "~/types/media"
import { timeFmt } from "~/utils/time-fmt"
import { AudioSize, AudioStatus, audioFeatures } from "~/constants/audio"
import { audioFeatures, AudioSize, AudioStatus } from "~/constants/audio"

import { useFeatureFlagStore } from "~/stores/feature-flag"
import { useProviderStore } from "~/stores/provider"

import VLink from "~/components/VLink.vue"
import VGetMediaButton from "~/components/VMediaInfo/VGetMediaButton.vue"
import VMediaInfo from "~/components/VMediaInfo/VMediaInfo.vue"

export default defineComponent({
name: "VFullLayout",
components: { VGetMediaButton, VLink },
components: { VMediaInfo, VGetMediaButton, VLink },
props: {
audio: {
type: Object as PropType<AudioDetail>,
Expand All @@ -83,11 +104,27 @@ export default defineComponent({
setup(props) {
const isSmall = computed(() => props.size === "s")

const featureFlagStore = useFeatureFlagStore()
const additionalSearchViews = computed(() =>
featureFlagStore.isOn("additional_search_views")
)

const providerStore = useProviderStore()
const sourceName = computed(() => {
return providerStore.getProviderName(
props.audio.source ?? props.audio.provider,
"audio"
)
})

return {
timeFmt,

isSmall,
audioFeatures,
sourceName,

additionalSearchViews,
}
},
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/VBackToSearchResultsLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
v-bind="$attrs"
@mousedown="handleClick"
>
<VIcon name="chevron-left" :rtl-flip="true" />
<VIcon name="chevron-back" :rtl-flip="true" />
{{ $t("singleResult.back") }}
</VButton>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/>
<VSearchBarButton
v-show="searchBarIsActive"
icon="chevron-left"
icon="chevron-back"
:label="$t('header.backButton')"
:rtl-flip="true"
variant="filled-gray"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import VSearchBarButton from "~/components/VHeader/VHeaderMobile/VSearchBarButto
type: "select",
default: "close-small",
},
options: ["close-small", "chevron-left", "source"],
options: ["close-small", "chevron-back", "source"],
},
rtlFlip: {
control: {
Expand Down Expand Up @@ -100,7 +100,7 @@ corner.
export const activeButtonsTemplate = (args) => ({
template: `<div class="wrapper rounded-sm bg-white flex justify-between ring ring-pink">
<VSearchBarButton
icon="chevron-left"
icon="chevron-back"
:label="$t('header.back-button')"
variant="filled-gray"
:rtl-flip="true"
Expand Down
Loading
Loading