Skip to content

Commit

Permalink
Fixup for legacy html structure
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed Oct 9, 2023
1 parent eb8f5ee commit bb823c7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions common/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,19 @@ body.kanban-active {
}
}

body.tags-page.kanban-active.kanban-legacy-topic-list {
// Hacks for legacy tag-show page which has different HTML
#main-outlet > span:nth-of-type(2) {
flex-shrink: 1;
flex-grow: 1;
min-height: 0;
display: flex;
}
.list-container {
display: none;
}
}

ul.kanban-controls {
padding: 0.5rem;
margin: 0;
Expand Down
9 changes: 9 additions & 0 deletions javascripts/discourse/components/kanban/wrapper.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import bodyClass from "discourse/helpers/body-class";
import i18n from "discourse-common/helpers/i18n";
import concatClass from "discourse/helpers/concat-class";
import KanbanOptionsModal from "./modal/options";
import { getOwner } from "@ember/application";

export default class Kanban extends Component {
<template>
Expand Down Expand Up @@ -51,6 +52,10 @@ export default class Kanban extends Component {
</div>

{{bodyClass "kanban-active"}}

{{#if this.isLegacyTopicList}}
{{bodyClass "kanban-legacy-topic-list"}}
{{/if}}
</div>
{{/if}}
</template>
Expand All @@ -60,6 +65,10 @@ export default class Kanban extends Component {

@tracked dragData;

get isLegacyTopicList() {
return !!getOwner(this).resolveRegistration("controller:discovery/topics") ;
}

@action
setDragData(data) {
this.dragData = data;
Expand Down

0 comments on commit bb823c7

Please sign in to comment.