From a6708f1201b639e07ae3be5d8fe7efecc84547c3 Mon Sep 17 00:00:00 2001 From: vallode <18506096+vallode@users.noreply.github.com> Date: Sun, 5 Jun 2022 12:03:18 +0200 Subject: [PATCH 1/6] Improve channel info bar --- src/renderer/views/Channel/Channel.css | 47 ++++++++++----- src/renderer/views/Channel/Channel.vue | 79 +++++++++++++------------- 2 files changed, 74 insertions(+), 52 deletions(-) diff --git a/src/renderer/views/Channel/Channel.css b/src/renderer/views/Channel/Channel.css index 1c7109bcfe925..957b563434c1f 100644 --- a/src/renderer/views/Channel/Channel.css +++ b/src/renderer/views/Channel/Channel.css @@ -6,7 +6,7 @@ } .channelDetails { - padding: 0 0 16px; + padding: 0; } .channelBannerContainer { @@ -65,38 +65,50 @@ .channelSearch { width: 200px; + margin-left: auto; align-self: flex-end; + flex: 1 1 0%; } .sortSelect { - align-self: flex-end; + margin-left: auto; } .channelInfoTabs { position: relative; width: 100%; - margin-top: -16px; - margin-bottom: -13px; + height: 85px; + justify-content: unset; + gap: 32px; +} + +.tabs { + display: flex; + flex: 0 1 33%; } .tab { padding: 15px; font-size: 15px; cursor: pointer; + flex: 1 1 0%; align-self: flex-end; + text-align: center; color: var(--tertiary-text-color); + border-bottom: 3px solid transparent; } -.selectedTab { - color: var(--primary-text-color); - border-bottom: 3px solid var(--primary-color); - margin-bottom: -3px; +.tab:hover { font-weight: bold; - box-sizing: border-box; + border-bottom: 3px solid var(--tertiary-text-color); } -.tab:hover { +.selectedTab, +.selectedTab:hover { + color: var(--primary-text-color); + border-bottom: 3px solid var(--primary-color); font-weight: bold; + box-sizing: border-box; } .aboutTab { @@ -117,10 +129,6 @@ margin-top: 10px; } -.elementList { - margin-top: 15px; -} - .elementListLoading { margin-top: 200px; } @@ -154,3 +162,14 @@ .channelLineContainer p { margin: 0; } + +@media only screen and (max-width: 800px) { + .channelInfoTabs { + height: auto; + flex-flow: column-reverse; + } + + .channelSearch { + width: 100%; + } +} diff --git a/src/renderer/views/Channel/Channel.vue b/src/renderer/views/Channel/Channel.vue index 1d6c3195898b3..f02d549031aee 100644 --- a/src/renderer/views/Channel/Channel.vue +++ b/src/renderer/views/Channel/Channel.vue @@ -64,51 +64,36 @@ v-if="!errorMessage" class="channelInfoTabs" > -
- {{ $t("Channel.Videos.Videos").toUpperCase() }} -
-
- {{ $t("Channel.Playlists.Playlists").toUpperCase() }} -
-
- {{ $t("Channel.About.About").toUpperCase() }} +
+
+ {{ $t("Channel.Videos.Videos").toUpperCase() }} +
+
+ {{ $t("Channel.Playlists.Playlists").toUpperCase() }} +
+
+ {{ $t("Channel.About.About").toUpperCase() }} +
+ - -
@@ -146,6 +131,24 @@ /> + + From 7bc6d35661acd04de1aed049a4e556d331bf3b8c Mon Sep 17 00:00:00 2001 From: vallode <18506096+vallode@users.noreply.github.com> Date: Wed, 8 Jun 2022 13:39:23 +0200 Subject: [PATCH 2/6] Reduce width of channel search bar --- src/renderer/views/Channel/Channel.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/views/Channel/Channel.css b/src/renderer/views/Channel/Channel.css index 957b563434c1f..f48f49db5aa85 100644 --- a/src/renderer/views/Channel/Channel.css +++ b/src/renderer/views/Channel/Channel.css @@ -127,6 +127,7 @@ .channelSearch { margin-top: 10px; + max-width: 320px; } .elementListLoading { @@ -171,5 +172,6 @@ .channelSearch { width: 100%; + max-width: none; } } From 0fc552194886d682ff369863e7a95b5bb8cb6eeb Mon Sep 17 00:00:00 2001 From: ChunkyPtogrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Tue, 20 Dec 2022 09:00:06 -0500 Subject: [PATCH 3/6] fix sizing --- src/renderer/views/Channel/Channel.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/views/Channel/Channel.css b/src/renderer/views/Channel/Channel.css index 8b10f5ff81b88..e0f1ca39294d0 100644 --- a/src/renderer/views/Channel/Channel.css +++ b/src/renderer/views/Channel/Channel.css @@ -87,9 +87,10 @@ .channelInfoTabs { position: relative; width: 100%; - height: 85px; + height: auto; justify-content: unset; gap: 32px; + padding: .3em 0; } .tabs { @@ -137,7 +138,7 @@ .channelSearch { margin-top: 10px; - max-width: 320px; + max-width: 250px; } .elementListLoading { From 4e7977159421704e5fb1b59b47c5830711a4e6e6 Mon Sep 17 00:00:00 2001 From: ChunkyPtogrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Tue, 20 Dec 2022 10:30:10 -0500 Subject: [PATCH 4/6] improve channel view accessibility Co-Authored-By: Jason <84899178+jasonhenriquez@users.noreply.github.com> --- .../ft-channel-bubble/ft-channel-bubble.js | 16 +++++++- .../ft-channel-bubble/ft-channel-bubble.vue | 8 +++- src/renderer/views/Channel/Channel.js | 33 ++++++++++++++++- src/renderer/views/Channel/Channel.vue | 37 ++++++++++++++++++- 4 files changed, 89 insertions(+), 5 deletions(-) diff --git a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js index d9752676b97ed..6f9babd20b826 100644 --- a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js +++ b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js @@ -1,5 +1,5 @@ import Vue from 'vue' - +import { sanitizeForHtmlId } from '../../helpers/accessibility' export default Vue.extend({ name: 'FtChannelBubble', props: { @@ -21,8 +21,20 @@ export default Vue.extend({ selected: false } }, + computed: { + sanitizedId: function() { + return 'channelBubble' + sanitizeForHtmlId(this.channelName) + } + }, methods: { - handleClick: function () { + handleClick: function (event) { + if (event instanceof KeyboardEvent) { + if (event.target.getAttribute('role') === 'link' && event.key !== 'Enter') { + return + } + event.preventDefault() + } + if (this.showSelected) { this.selected = !this.selected } diff --git a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue index 7e9cd68d8bc09..eb761583d40bb 100644 --- a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue +++ b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.vue @@ -1,7 +1,10 @@