Skip to content

Commit

Permalink
Remove duplicate seach tab and button on medium screens
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellamaki committed Dec 13, 2021
1 parent 979d464 commit 578d93d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions kolibri/plugins/learn/assets/src/views/TopicsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
:to="foldersLink"
/>
<HeaderTab
v-if="!windowIsMedium"
:text="coreString('searchLabel')"
:to="searchLink"
/>
Expand Down Expand Up @@ -103,7 +104,7 @@
<div
class="card-grid"
>
<div v-if="(windowIsMedium && searchActive)">
<div v-if="windowIsMedium">
<KButton
icon="filter"
class="filter-overlay-toggle-button"
Expand Down Expand Up @@ -234,7 +235,7 @@

<!-- Embedded Side panel is on larger views, and exists next to content -->
<EmbeddedSidePanel
v-if="!!windowIsLarge || (windowIsMedium && !searchActive)"
v-if="!!windowIsLarge"
v-model="searchTerms"
:topicsListDisplayed="!searchActive"
topicPage="True"
Expand Down Expand Up @@ -443,11 +444,9 @@
foldersLink() {
if (this.topic) {
const query = {};
if (this.windowIsSmall) {
query.sidePanel = String(
this.$route.name === PageNames.TOPICS_TOPIC ? !this.sidePanelIsOpen : true
);
}
query.sidePanel = String(
this.$route.name === PageNames.TOPICS_TOPIC ? !this.sidePanelIsOpen : true
);
return {
name: PageNames.TOPICS_TOPIC,
id: this.topic.id,
Expand Down Expand Up @@ -557,7 +556,7 @@
return false;
},
sidePanelWidth() {
if (this.windowIsSmall || (this.windowIsMedium && this.searchActive)) {
if (this.windowIsSmall || this.windowIsMedium) {
return 0;
} else if (this.windowBreakpoint < 4) {
return 234;
Expand Down

0 comments on commit 578d93d

Please sign in to comment.