Skip to content

A platform for community discussion. Free, open, simple.

UX: various mondernized foundation style adjustments (#40808)

Krise547c6acb1cb
diff --git a/app/assets/stylesheets/common/base/review.scss b/app/assets/stylesheets/common/base/review.scss
index 3cc811f7234..da88dd8b991 100644
--- a/app/assets/stylesheets/common/base/review.scss
+++ b/app/assets/stylesheets/common/base/review.scss
@@ -654,6 +654,9 @@
&__textarea-wrapper {
width: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-2);
}
textarea {
diff --git a/app/assets/stylesheets/common/base/sidebar.scss b/app/assets/stylesheets/common/base/sidebar.scss
index b99dba3906f..5715b9402bf 100644
--- a/app/assets/stylesheets/common/base/sidebar.scss
+++ b/app/assets/stylesheets/common/base/sidebar.scss
@@ -274,6 +274,11 @@
.always-public-tooltip {
padding-right: 0.5rem;
+
+ .fk-d-tooltip__trigger-container {
+ align-items: center;
+ gap: var(--space-1);
+ }
}
.d-modal__footer {
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/_index.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/_index.scss
index 4725c7699c7..7ea56e5a376 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/_index.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/_index.scss
@@ -10,3 +10,5 @@
@import "categories";
@import "calendar";
@import "chat";
+@import "groups";
+@import "personal-messages";
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss
index 77392432db1..c1e44cd1deb 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss
@@ -66,6 +66,10 @@
}
}
+ .sidebar-section-header-dropdown-btn {
+ --d-button-default-border: none;
+ }
+
.c-footer button {
padding-block: 0.75rem !important;
height: unset !important;
@@ -124,4 +128,16 @@
) !important; // overrides very specific btn selector at the top of this file
}
}
+
+ // button on /my/badges
+ .favorite-btn {
+ border-color: var(--primary-low);
+ border-bottom: none;
+ border-right: none;
+
+ &:hover {
+ border-bottom: none;
+ border-right: none;
+ }
+ }
}
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/groups.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/groups.scss
new file mode 100644
index 00000000000..2d1a6017e28
--- /dev/null
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/groups.scss
@@ -0,0 +1,8 @@
+.uc-modernize-foundation-theme {
+ .group-details-container {
+ background: transparent;
+ border: 1px solid var(--content-border-color);
+ border-radius: var(--d-border-radius);
+ padding: var(--space-4);
+ }
+}
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/personal-messages.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/personal-messages.scss
new file mode 100644
index 00000000000..05379920eae
--- /dev/null
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/personal-messages.scss
@@ -0,0 +1,22 @@
+.uc-modernize-foundation-theme {
+ &.archetype-private_message .topic-map {
+ section {
+ border-radius: var(--d-border-radius);
+ padding: var(--space-4) var(--space-4) 0;
+ }
+
+ .participants {
+ margin-bottom: 0;
+ padding-bottom: var(--space-4);
+
+ .user {
+ border: var(--d-button-default-border);
+ background: var(--d-button-default-bg-color);
+
+ .username:last-child {
+ margin-right: var(--space-1);
+ }
+ }
+ }
+ }
+}
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss
index 08d907e610a..9e3472fa9a0 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss
@@ -37,7 +37,8 @@
.select-kit.combo-box.category-drop .caret-icon,
.select-kit.combo-box.tag-drop .tag-drop-header,
.select-kit.combo-box.tag-drop .selected-name,
- .select-kit.combo-box.tag-drop .caret-icon {
+ .select-kit.combo-box.tag-drop .caret-icon,
+ .select-kit.combo-box.solved-status-filter .selected-name {
color: var(--primary);
}
diff --git a/app/assets/stylesheets/common/components/d-icon-grid-picker.scss b/app/assets/stylesheets/common/components/d-icon-grid-picker.scss
index d3597c1af62..cf3dae26513 100644
--- a/app/assets/stylesheets/common/components/d-icon-grid-picker.scss
+++ b/app/assets/stylesheets/common/components/d-icon-grid-picker.scss
@@ -17,8 +17,8 @@
color: var(--icon-color, currentColor);
}
- &.--has-label .d-icon-grid-picker-trigger {
- gap: var(--space-2);
+ .d-icon-grid-picker-trigger {
+ gap: var(--space-1);
}
/* Split-button layout: DMenu trigger + clear button side by side */
diff --git a/frontend/discourse/app/components/reviewable-bundled-action.gjs b/frontend/discourse/app/components/reviewable-bundled-action.gjs
index 3b1eeb1e0c0..85bf70e12d3 100644
--- a/frontend/discourse/app/components/reviewable-bundled-action.gjs
+++ b/frontend/discourse/app/components/reviewable-bundled-action.gjs
@@ -26,20 +26,6 @@ export default class ReviewableBundledAction extends Component {
return `${vertical}-${horizontal}`;
}
- get buttonClass() {
- const buttonIdentifier = dasherize(
- this.first.button_class || this.first.id
- );
-
- if (buttonIdentifier === "reject-post") {
- return "btn-danger";
- } else if (buttonIdentifier === "approve-post") {
- return "btn-success";
- } else {
- return "btn-default";
- }
- }
-
@action
perform(id) {
if (id) {
@@ -61,8 +47,6 @@ export default class ReviewableBundledAction extends Component {
disabled=@reviewableUpdating
placement=this.placement
- customStyle=true
- btnCustomClasses=this.buttonClass
}}
class={{dConcatClass
"reviewable-action-dropdown"
@@ -77,10 +61,10 @@ export default class ReviewableBundledAction extends Component {
@translatedLabel={{this.first.label}}
@disabled={{@reviewableUpdating}}
class={{dConcatClass
+ "btn-default"
"reviewable-action"
(dasherize this.first.id)
this.first.button_class
- this.buttonClass
}}
/>
{{/if}}
diff --git a/frontend/discourse/app/components/sidebar/section-form-link.gjs b/frontend/discourse/app/components/sidebar/section-form-link.gjs
index 56a15f8e2b0..604c98b9736 100644
--- a/frontend/discourse/app/components/sidebar/section-form-link.gjs
+++ b/frontend/discourse/app/components/sidebar/section-form-link.gjs
@@ -105,7 +105,7 @@ export default class SectionFormLink extends Component {
@value={{@link.icon}}
@onChange={{fn (mut @link.icon)}}
@showCaret={{true}}
- @btnClass={{@link.iconCssClass}}
+ @btnClass={{dConcatClass "btn-default" @link.iconCssClass}}
aria-label={{i18n "sidebar.sections.custom.links.icon.label"}}
/>
diff --git a/frontend/discourse/app/components/sidebar/section.gjs b/frontend/discourse/app/components/sidebar/section.gjs
index 00be8d9b98b..3defd1671f3 100644
--- a/frontend/discourse/app/components/sidebar/section.gjs
+++ b/frontend/discourse/app/components/sidebar/section.gjs
@@ -228,6 +228,7 @@ export default class SidebarSection extends Component {
@options={{hash
icon=@headerActionsIcon
placementStrategy="absolute"
+ btnCustomClasses="sidebar-section-header-dropdown-btn"
}}
@content={{@headerActions}}
@onChange={{this.handleMultipleHeaderActions}}
diff --git a/frontend/discourse/app/components/topic-footer-buttons.gjs b/frontend/discourse/app/components/topic-footer-buttons.gjs
index 84dab0490f5..b76d1c50123 100644
--- a/frontend/discourse/app/components/topic-footer-buttons.gjs
+++ b/frontend/discourse/app/components/topic-footer-buttons.gjs
@@ -251,7 +251,6 @@ export default class TopicFooterButtons extends Component {
@disabled={{button.disabled}}
id={{concat "topic-footer-button-" button.id}}
class={{dConcatClass
- "btn-default"
"topic-footer-button"
button.classNames
}}
diff --git a/plugins/discourse-solved/assets/stylesheets/solutions.scss b/plugins/discourse-solved/assets/stylesheets/solutions.scss
index 40b8342550f..b9db101bcab 100644
--- a/plugins/discourse-solved/assets/stylesheets/solutions.scss
+++ b/plugins/discourse-solved/assets/stylesheets/solutions.scss
@@ -58,6 +58,10 @@ $solved-color: var(--success);
.select-kit-header {
color: var(--primary-high);
}
+
+ .angle-icon {
+ color: currentcolor;
+ }
}
}
diff --git a/spec/system/reviewables_spec.rb b/spec/system/reviewables_spec.rb
index d9be83bda0c..501fb0ac977 100644
--- a/spec/system/reviewables_spec.rb
+++ b/spec/system/reviewables_spec.rb
@@ -79,16 +79,6 @@ describe "Reviewables" do
expect(review_page).to have_no_post_body_collapsed
expect(review_page).to have_no_post_body_toggle
end
-
- it "should apply correct button classes to actions" do
- visit("/review")
-
- expect(page).to have_css(".approve-post.btn-success")
- expect(page).to have_css(".reject-post .btn-danger")
-
- expect(page).to have_no_css(".approve-post.btn-default")
- expect(page).to have_no_css(".reject-post .btn-default")
- end
end
describe "when there is a reviewable user" do