Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .discourse-compatibility
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
< 3.5.0.beta5-dev: f4ef4a41587d75d062b4fc7841d8f78e7726ea59
< 3.5.0.beta1-dev: 5fda8d63def631692e8780c6b8bc2457eae55a29
< 3.4.0.beta1-dev: 471a797e05f9b55df90ef71145420ec001f9f48d
< 3.3.0.beta1-dev: 7614fc31171ea4fbe4d26442cd0c50fccc41ac2b
Expand Down
44 changes: 23 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,44 @@ GEM
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
ast (2.4.3)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.2)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
drb (2.2.1)
connection_pool (2.5.3)
drb (2.2.3)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.10.2)
language_server-protocol (3.17.0.4)
json (2.12.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
logger (1.6.6)
logger (1.7.0)
minitest (5.25.5)
parallel (1.26.3)
parser (3.3.7.1)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
prism (1.4.0)
racc (1.8.1)
rack (3.1.12)
rack (3.1.15)
rainbow (3.1.1)
regexp_parser (2.10.0)
rubocop (1.74.0)
rubocop (1.76.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-ast (>= 1.45.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.39.0)
parser (>= 3.3.1.0)
rubocop-ast (1.45.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-capybara (2.22.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
Expand All @@ -65,13 +67,13 @@ GEM
rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.30.3)
rubocop-rails (2.32.0)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rspec (3.5.0)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-rspec (3.6.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec_rails (2.31.0)
Expand All @@ -98,4 +100,4 @@ DEPENDENCIES
syntax_tree

BUNDLED WITH
2.6.6
2.6.9
2 changes: 1 addition & 1 deletion desktop/desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
display: none;
}

@media screen and (min-width: 767px) {
@media screen and (width >= 767px) {
// Show the sidebar at 767px
.tc-right-sidebar {
display: block;
Expand Down
5 changes: 0 additions & 5 deletions javascripts/connectors/before-list-area/tc-right-sidebar.hbs

This file was deleted.

34 changes: 34 additions & 0 deletions javascripts/discourse/components/category-list.gjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Component from "@glimmer/component";
import categoryLink from "discourse/helpers/category-link";
import Category from "discourse/models/category";
import { i18n } from "discourse-i18n";

export default class CategoryList extends Component {
constructor() {
super(...arguments);
this.blockTitle =
this.args.title || i18n(themePrefix("category_list.heading"));

this.categoryList = this.args.id.split(",");
if (!this.categoryList) {
return;
}
this.categoryList.forEach(function (id, i, arr) {
arr[i] = Category.findById(id);
});
}

<template>
<h3 class="category-list__heading">
{{this.blockTitle}}
</h3>

<div class="category-list__container">
{{#each this.categoryList as |category|}}
<div class="category-list__category">
{{categoryLink category}}
</div>
{{/each}}
</div>
</template>
}
11 changes: 0 additions & 11 deletions javascripts/discourse/components/category-list.hbs

This file was deleted.

19 changes: 0 additions & 19 deletions javascripts/discourse/components/category-list.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { service } from "@ember/service";
import categoryLink from "discourse/helpers/category-link";
import htmlSafe from "discourse/helpers/html-safe";
import replaceEmoji from "discourse/helpers/replace-emoji";
import getURL from "discourse/lib/get-url";
import Category from "discourse/models/category";

Expand All @@ -12,8 +15,8 @@ export default class CategoryTopics extends Component {

constructor() {
super(...arguments);
const count = this.args?.params?.count || 10;
const categoryId = this.args?.params?.id;
const count = this.args.count || 10;
const categoryId = this.args.id;

if (!categoryId) {
return;
Expand All @@ -40,4 +43,19 @@ export default class CategoryTopics extends Component {
super.willDestroy(...arguments);
this.topics = null;
}

<template>
{{categoryLink this.category}}

<div class="category-topics--content">
{{#each this.topics as |topic|}}
<a href={{topic.url}} class="category-topics--topic">
{{htmlSafe (replaceEmoji topic.fancy_title)}}
<span class="category-topics--posts-count">
({{topic.posts_count}})
</span>
</a>
{{/each}}
</div>
</template>
}
12 changes: 0 additions & 12 deletions javascripts/discourse/components/category-topics.hbs

This file was deleted.

5 changes: 5 additions & 0 deletions javascripts/discourse/components/custom-html-rsb.gjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import htmlSafe from "discourse/helpers/html-safe";

const CustomHtmlRsb = <template>{{htmlSafe @content}}</template>;

export default CustomHtmlRsb;
1 change: 0 additions & 1 deletion javascripts/discourse/components/custom-html-rsb.hbs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { service } from "@ember/service";
import { i18n } from "discourse-i18n";

export default class PopularTags extends Component {
@service site;
Expand All @@ -15,9 +16,9 @@ export default class PopularTags extends Component {

get shouldShowBlock() {
const currentRoute = this.router.currentRoute;
const count = this.args?.params?.count || 10;
const excludedTags = this.args?.params?.excludedTags || [];
const scopeToCategory = this.args?.params?.scopeToCategory || false;
const count = this.args.count || 10;
const excludedTags = this.args.excludedTags || [];
const scopeToCategory = this.args.scopeToCategory || false;
const tags =
(scopeToCategory ? this.site.category_top_tags : this.site.top_tags) ||
[];
Expand Down Expand Up @@ -47,12 +48,33 @@ export default class PopularTags extends Component {
}

shouldDisplay(categoryId) {
const displayInSpecificCategories =
this.args?.params?.displayInSpecificCategories?.split(",").map(Number);
const displayInSpecificCategories = this.args.displayInSpecificCategories
?.split(",")
.map(Number);

return (
displayInSpecificCategories === undefined ||
displayInSpecificCategories.includes(categoryId)
);
}

<template>
{{#if this.shouldShowBlock}}
<h3 class="popular-tags-heading">
{{i18n (themePrefix "popular_tags.heading")}}
</h3>

<div class="popular-tags__container">
{{#each this.topTags as |t|}}
<a href="/tag/{{t}}" class="popular-tags__tag">
{{t}}
</a>
{{/each}}
</div>

<a class="popular-tags__view-all" href={{this.viewAllUrl}}>
{{i18n (themePrefix "popular_tags.view_all")}}
</a>
{{/if}}
</template>
}
17 changes: 0 additions & 17 deletions javascripts/discourse/components/popular-tags.hbs

This file was deleted.

Loading