Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
92 changes: 53 additions & 39 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.2.1.1)
activesupport (8.0.2)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
Expand All @@ -12,68 +13,81 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
benchmark (0.4.0)
bigdecimal (3.1.9)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
drb (2.2.1)
i18n (1.14.6)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.1)
minitest (5.25.1)
json (2.10.2)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
logger (1.6.6)
minitest (5.25.5)
parallel (1.26.3)
parser (3.3.5.0)
parser (3.3.7.1)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
racc (1.8.1)
rack (3.1.10)
rack (3.1.12)
rainbow (3.1.1)
regexp_parser (2.9.2)
rubocop (1.67.0)
regexp_parser (2.10.0)
rubocop (1.74.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
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.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.39.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-discourse (3.8.2)
rubocop-capybara (2.22.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-discourse (3.12.1)
activesupport (>= 6.1)
rubocop (>= 1.59.0)
rubocop-capybara (>= 2.0.0)
rubocop-factory_bot (>= 2.0.0)
rubocop-rails (>= 2.25.0)
lint_roller (>= 1.1.0)
rubocop (>= 1.73.2)
rubocop-capybara (>= 2.22.0)
rubocop-factory_bot (>= 2.27.0)
rubocop-rails (>= 2.30.3)
rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.30.0)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-rails (2.26.2)
rubocop-rspec_rails (>= 2.31.0)
rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.30.3)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.1.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rspec (3.5.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec_rails (2.31.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (~> 3.5)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
securerandom (0.4.1)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)

PLATFORMS
arm64-darwin-23
Expand All @@ -84,4 +98,4 @@ DEPENDENCIES
syntax_tree

BUNDLED WITH
2.5.21
2.6.6
6 changes: 4 additions & 2 deletions desktop/desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

.rs-component {
margin-bottom: 1.5em;

h3 {
border-bottom: 1px solid var(--primary-low);
padding-bottom: 0.5em;
Expand Down Expand Up @@ -54,6 +55,7 @@
// Recent replies
.recent-replies--reply {
display: flex;

&:not(:last-child) {
padding-bottom: 1em;
border-bottom: 1px solid var(--primary-low);
Expand All @@ -65,6 +67,7 @@
&:first-child {
padding-top: 0.05em;
}

&:nth-child(2) {
margin: 0 0.5em;
flex-shrink: 1;
Expand All @@ -83,6 +86,7 @@
.top-topics__topic {
flex-wrap: wrap;
justify-content: space-between;

@extend .recent-replies--reply;
}

Expand Down Expand Up @@ -122,7 +126,6 @@
}

// Subcategory list

.subcategory-list--item {
> .subcategory {
display: flex;
Expand All @@ -135,7 +138,6 @@
}

// category list

.category-list__category {
&:not(:last-child) {
margin-bottom: 0.5em;
Expand Down
85 changes: 38 additions & 47 deletions javascripts/connectors/before-list-area/tc-right-sidebar.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,46 @@
import Component from "@ember/component";
import { service } from "@ember/service";
import discourseComputed from "discourse/lib/decorators";

export default {
setupComponent() {
this.reopen({
router: service(),
export default class TcRightSidebar extends Component {
@service router;
@service site;

@discourseComputed(
"router.currentRouteName",
"router.currentRoute.attributes.category",
"router.currentRoute.attributes.category.slug",
"router.currentRoute.attributes.tag.id"
)
showSidebar(currentRouteName, category, categorySlug, tagId) {
if (this.site.mobileView) {
return false;
}
@discourseComputed(
"router.currentRouteName",
"router.currentRoute.attributes.category",
"router.currentRoute.attributes.category.slug",
"router.currentRoute.attributes.tag.id"
)
showSidebar(currentRouteName, category, categorySlug, tagId) {
if (this.site.mobileView) {
return false;
}

if (settings.show_in_routes !== "") {
const selectedRoutes = settings.show_in_routes.split("|");
let subcategory = null;
let parentCategory = null;
if (settings.show_in_routes !== "") {
const selectedRoutes = settings.show_in_routes.split("|");
let subcategory = null;
let parentCategory = null;

// check if current page is subcategory
// -- is category
// -- does not have children itself
// -- has a parent category
if (
!!this.category &&
!this.category.has_children &&
!!this.category.parent_category_id
) {
subcategory = categorySlug;
parentCategory = category.ancestors[0].slug;
}
// check if current page is subcategory
if (
this.category &&
!this.category.has_children &&
this.category.parent_category_id
) {
subcategory = categorySlug;
parentCategory = category.ancestors[0].slug;
}

if (
selectedRoutes.includes(currentRouteName) ||
selectedRoutes.includes(`c/${categorySlug}`) ||
selectedRoutes.includes(`c/${parentCategory}/${subcategory}`) ||
selectedRoutes.includes(`tag/${tagId}`)
) {
return true;
} else {
return false;
}
}
return (
selectedRoutes.includes(currentRouteName) ||
selectedRoutes.includes(`c/${categorySlug}`) ||
selectedRoutes.includes(`c/${parentCategory}/${subcategory}`) ||
selectedRoutes.includes(`tag/${tagId}`)
);
}

// if theme setting is empty, show everywhere except /categories
return currentRouteName === "discovery.categories" ? false : true;
},
});
},
};
// if theme setting is empty, show everywhere except /categories
return currentRouteName !== "discovery.categories";
}
}
1 change: 1 addition & 0 deletions javascripts/discourse/components/popular-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { service } from "@ember/service";
export default class PopularTags extends Component {
@service site;
@service router;

@tracked topTags = null;

willDestroy() {
Expand Down
1 change: 1 addition & 0 deletions javascripts/discourse/components/subcategory-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { service } from "@ember/service";

export default class SubcategoryList extends Component {
@service router;

@tracked parentCategory = null;

willDestroy() {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"private": true,
"devDependencies": {
"@discourse/lint-configs": "2.4.0",
"ember-template-lint": "6.1.0",
"eslint": "9.19.0",
"prettier": "2.8.8"
"@discourse/lint-configs": "2.11.1",
"ember-template-lint": "7.0.1",
"eslint": "9.22.0",
"prettier": "3.5.3",
"stylelint": "16.16.0"
},
"engines": {
"node": ">= 22",
Expand Down
Loading
Loading