diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue index 2014b8ad85..915a0b4c51 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue @@ -64,6 +64,7 @@ :channelId="item.id" :detailsRouteName="detailsRouteName" style="flex-grow: 1; width: 100%" + @show-channel-details="handleShowChannelDetails" /> @@ -142,6 +143,22 @@ + +
+
+ @@ -156,6 +173,7 @@ import sortBy from 'lodash/sortBy'; import union from 'lodash/union'; import { RouteNames } from '../../constants'; + import ChannelDetailsSidePanel from './ChannelDetailsSidePanel'; import CatalogFilters from './CatalogFilters'; import ChannelItem from './ChannelItem'; import LoadingText from 'shared/views/LoadingText'; @@ -178,6 +196,7 @@ Checkbox, ToolBar, OfflineText, + ChannelDetailsSidePanel, }, mixins: [channelExportMixin, constantsTranslationMixin], data() { @@ -185,12 +204,8 @@ loading: true, loadError: false, selecting: false, - - /** - * jayoshih: router guard makes it difficult to track - * differences between previous query params and new - * query params, so just track it manually - */ + showSidePanel: false, + selectedChannelId: null, previousQuery: this.$route.query, /** @@ -301,6 +316,14 @@ this.setSelection(false); return this.downloadChannelsPDF(params); }, + handleShowChannelDetails(channelId) { + this.showSidePanel = true; + this.selectedChannelId = channelId; + }, + handleCloseSidePanel() { + this.showSidePanel = false; + this.selectedChannelId = null; + }, }, $trs: { resultsText: '{count, plural,\n =1 {# result found}\n other {# results found}}', @@ -326,4 +349,41 @@ margin: 0 auto; } + .backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 9; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + background-attachment: fixed; + } + + .backdrop-enter { + opacity: 0; + } + + .backdrop-enter-to { + opacity: 1; + } + + .backdrop-enter-active { + transition: opacity 0.2s ease-in-out; + } + + .backdrop-leave { + opacity: 1; + } + + .backdrop-leave-to { + opacity: 0; + } + + .backdrop-leave-active { + transition: opacity 0.2s ease-in-out; + } + diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelDetailsSidePanel.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelDetailsSidePanel.vue new file mode 100644 index 0000000000..c54292c438 --- /dev/null +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelDetailsSidePanel.vue @@ -0,0 +1,152 @@ + + + + + + + diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue index c4fb7abf95..c83842bf44 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue @@ -7,9 +7,9 @@ :class="{ added }" data-test="channel-card" tabindex="0" - :href="linkToChannelTree ? channelHref : null" - :to="linkToChannelTree ? null : channelDetailsLink" - @click="goToChannelRoute" + :href="isInChannelList && linkToChannelTree ? channelHref : null" + :to="isInChannelList ? (linkToChannelTree ? null : channelDetailsLink) : null" + @click="handleChannelClick" > - + +