Commit Graph
76 Commits
Author SHA1 Message Date
chapoi d83d43025b UX: Horizon > increase z-index for list controls (#34902)
The clickable card layout used in the boxes+featured categories has a
higher z-index, which conflicts with the sticky list-controls in
Horizon. Hence the latter needs this increase.

<img width="804" height="1584" alt="CleanShot 2025-09-22 at 12 00 26@2x"
src="https://github.com/user-attachments/assets/9ae057f0-cbe0-4677-b10b-550741ade7ab"
/>
<img width="804" height="1584" alt="CleanShot 2025-09-22 at 12 00 37@2x"
src="https://github.com/user-attachments/assets/a821cb6a-e6c9-4f20-ab64-29f32829fb80"
/>
2025-09-22 12:56:53 -06:00
Jordan Vidrine 284ff78b17 UX: Remove shadow, implement space variables (#34885) 2025-09-22 11:37:04 -05:00
Martin Brennan d1660148d8 FIX: Horizon topic activity username sometimes blank (#34679)
For these steps:

* In Horizon, create a topic.
* You’ll notice that the topic card has the OP name.
* Make an edit to the OP after the edit grace period.

You would see no username under the topic title. This is because
we were saying that if the topic bump date was after the last post
date, then we should never show any edit details.

However this didn't handle the common case of posting then editing
soon after.

Now in this commit, if the difference is < 1 day, we still show
the same username.

A proper fix would be to know the bumped_at_user then we can tell
if the user is the same as the last poster, but that is more complex
to do.
2025-09-22 10:24:14 +10:00
Penar Musaraj 5bb3b79e9b UX: Fix padding for no-ember pages (#34884)
This regressed recently. We need to make sure non-ember pages have a
minimum left/right padding, otherwise content is hugging the device
edges.
2025-09-19 15:48:38 -04:00
David Battersby dca698afa1 FEATURE: new topic button always enabled (#34603)
### What is this change?

When visiting a restricted category or tag where the current user does
not have permission to create a topic, we should still allow the user to
write a new topic under a different category or tag. This is especially
important when using the new topic button from the sidebar.

#### When the user does not have permission, the composer category
defaults to:

1) Subcategory (if SiteSetting.default_subcategory_on_read_only_category
is true and subcategory exists)
2) Default category chooser value of Category... prompting the user to
select a category from the dropdown

This PR is a follow up to #33495 which was reverted previously due to a
couple of issues which are now corrected:

- we no longer set a default category based on
`default_composer_category` (previously was step 2 above)
- category banner text when a user cannot create a topic is now showing
up correctly
- added a title attribute with more info for the disabled category in
the category dropdown in composer
- for staff only tags, when creating a topic from the tag page as a non
staff member we now automatically remove the restricted tag from the
tags field in composer (as the user cannot use this tag)
2025-09-16 17:01:49 +04:00
Kris 911ee09ea1 UX: remove margin from navigation-controls children in favor of gap (#34771)
Concerns this section of the nav:


![Untitled
4](https://github.com/user-attachments/assets/95317bfa-7ae2-443d-8184-50810a5b571b)

This switches the margin between buttons to `gap` which is more
predictable and avoids situations where an extension might need to add
its own margin, like this:

<img width="242" height="59" alt="image"
src="https://github.com/user-attachments/assets/fb8155de-6b3d-43e6-a0e8-af61c5a5555f"
/>

After this change:

<img width="258" height="65" alt="image"
src="https://github.com/user-attachments/assets/ebd77447-d9cb-4333-b6ab-2d2c8156c876"
/>

Ideally shouldn't be merged until
https://github.com/discourse/discourse/pull/34770 is, because the empty
div removed in that PR causes too much space when `gap` is utilized
2025-09-15 14:16:57 -04:00
Ted Johansson 4c1ba3f051 UX: Polish for topic list controls (#34714)
Some small polish.
2025-09-15 09:57:22 +08:00
Discourse Translator Bot 3a8a9f27ce Update translations (#34745) 2025-09-12 16:17:25 +02:00
Kris 3a945f3663 UX: glimmerize CreateTopicButton, make btnType class variable for Horizon (#34733)
The Horizon theme was overriding `btn-default` styles for the new topic
button in the sidebar with custom CSS to achieve `btn-primary` styles.
Ideally we should be able to swap out the class and rely on that!

<img width="299" height="258" alt="image"
src="https://github.com/user-attachments/assets/3485fb0b-4714-49ce-9ac4-7e1ac6fb358b"
/>

So here I

 1. Convert CreateTopicButton to Glimmer component 
2. Add `@btnTypeClass` param - Allows parent components to specify the
button type
  (`btn-primary`, `btn-default`, etc.)
  3. Separate concerns:
    * `@btnClass` handles general class name needs (and existing use) 
    * `@btnTypeClass` handles core visual style
2025-09-04 17:16:33 -04:00
chapoi 1d68bf93d9 UX: replace horizon spacing vars with new core ones (#34701)
Title says it all
2025-09-03 14:02:18 +02:00
chapoi 9881cf4f73 UX: Horizon > badge fixes (#34700)
Minor tweaks needed since Horizon works with a higher base-font:

<img width="722" height="1498" alt="CleanShot 2025-09-03 at 10 31 16@2x"
src="https://github.com/user-attachments/assets/d3b868c3-8b0e-41f4-bdbf-78e061f74d2b"
/>

⬇️ 

<img width="722" height="1498" alt="CleanShot 2025-09-03 at 10 30 16@2x"
src="https://github.com/user-attachments/assets/fd853dd8-9450-4e2c-8de2-e9b1a55e2d6c"
/>
2025-09-03 14:01:56 +02:00
chapoi 3907d881c7 UX: Horizon > bring back unread number (#34662)
<img width="1380" height="504" alt="image"
src="https://github.com/user-attachments/assets/f59ea96e-5372-4e46-b2ea-d6481572c910"
/>
2025-09-02 15:26:54 +02:00
chapoi a0146b2917 UX: Horizon compatibility fixes (#34577)
Small CSS fixes for compatibility with popular components.
2025-08-28 12:33:18 +02:00
Yuriy Kurantandchapoi 381312c2b0 UX: welcome banner background image text color modes (#34519)
Welcome banner styling tweaks related to background image settings.

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2025-08-28 01:12:29 +08:00
Jarek RadoszandDavid Taylor 06f841da08 DEV: Update Ember to 6.6.0 (#34460)
This upgrade does not include any breaking changes for Discourse
themes/plugins. Two of the three deprecations in Ember 6 (array
prototype extensions, component-template resolution) have already been
polyfilled in Discourse. The third (action helper/modifier) is
polyfilled in this commit.

Performance testing shows a 2-3% improvement in Discourse rendering
time, thanks to upstream performance fixes in the glimmer-vm since the
regressions in the Ember 5.x series.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-08-27 16:48:40 +01:00
chapoi 966aae152e UX: Horizon > unhide create topic btn (#34546)
After consideration of the feedback we've received, we decided to offer
the `Create topic` again on the mobile topic list page for ease of use.
The sidebar button remains present too.

| Before | After |
|--------|--------|
| <img width="720" height="1500" alt="CleanShot 2025-08-26 at 18 41
24@2x"
src="https://github.com/user-attachments/assets/f2717198-80e5-4dbc-9182-5bb5872385f2"
/> | <img width="720" height="1500" alt="CleanShot 2025-08-26 at 18 40
58@2x"
src="https://github.com/user-attachments/assets/d0126a88-7472-46ef-af8d-6ed1a29bb04a"
/> |
2025-08-26 18:55:30 +02:00
Derek Rushforth 36bdf6c5cf UX: Primary button styles on Discourse ID social button (#34465) 2025-08-25 06:29:21 -07:00
Martin Brennan 369cc65865 FEATURE: Better composer controls for "Save & close (X)" and "Discard" (#33510)
This commit modifies the composer buttons along the bottom,
removing the old "Close" button in favour of a distinct "Discard"
and a persistent "X" button.

For **Discard**:

* When there is any user-input content in the composer, clicking this
button will bring up the draft confirmation modal. Users can then
confirm the discard, decide to save their draft, or return to the
editor.

* When there is no user-input content in the composer, clicking this
button will close the composer.
* In this case, we should not prompt users with the draft confirmation
modal.

For the **"X"** button in the top-right of the composer on desktop and
mobile:

* When there is any user-input content in the composer, this should save
the content as a draft and close the composer. We don’t need to bring up
the draft confirmation in this case.
* When there is no user-input content in the composer, this should close
the composer without saving.
Remove the Close button from the composer on desktop.
2025-08-25 23:15:56 +10:00
Discourse Translator Bot 9c429cd00e Update translations (#34510) 2025-08-25 11:43:23 +02:00
Discourse Translator Bot 7d3bfe978e Update translations (#34436) 2025-08-21 11:02:39 +02:00
Martin Brennan 27157d7725 FIX: Handle auxclick event on topic list (#34408)
This commit adds a new `auxclick` event handler to the topic list item,
which calls the same `click` handler.

The `auxclick` event is triggered by auxiliary mouse buttons, such as
the middle mouse button. This fixes an issue where using the middle
mouse button
on a topic card in Horizon anywhere but the topic title would not open
the topic
in a new tab.

Normal topic list click functionality remains unchanged.

c.f.
https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event
2025-08-20 09:53:33 +10:00
David Taylor f84e391ea6 DEV: Update browser feature-detection and remove Safari 15 workaround (#34419)
- Increases Safari version in `targets.js` to Safari 16.4. This removes
the Safari-15-specific babel transforms for `static` blocks, and the
class-field scope bug

- Moves modern feature detections from a warning banner to our main
'unsupported browser' system

- Adds more informative logging to that 'unsupported browser' system

- Updates Readme with new minimum Safari version

- Removes Horizon-specific browser compat message, since it now matches
core

https://meta.discourse.org/t/358131
2025-08-19 18:16:24 +01:00
Discourse Translator BotandGerhard Schlager ab0b0573a1 Update translations (#34413)
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-08-19 16:23:59 +02:00
Discourse Translator Bot 74066bffa2 Update translations (#34116) 2025-08-19 12:14:51 +02:00
Jarek Radosz dfe66db62b DEV: Clean up themes' about.json files (#34219)
Remove obsolete fields and reformat.
2025-08-18 12:35:02 +02:00
David Battersby 0c4ea03244 Revert "FEATURE: enable topic creation button for read only categorie… (#34334)
Revert changes in #34211 temporarily until we have updated the separate
sidebar new topic btn theme component.
2025-08-14 21:03:49 +04:00
David Battersby dd0a5c30c6 UX: sidebar btn light dark support horizon (#34319)
Fixes some small inconsistencies between light and dark modes and small
tidyups:

1) hover effect in dark mode is different for button and dropdown
(matches correctly on light mode)
2) split button divider line disappears when hovering button but not
dropdown arrow (we do remove border opacity for regular buttons for
split buttons we should probably keep it)
3) divider line color could be better on dark mode
2025-08-14 18:50:46 +04:00
David Battersby 44bf488acd FEATURE: enable topic creation button for read only categories (#34211)
Most of this feature was already approved in #33495 but it was reverted
temporarily due to users accidentally posting in the wrong category (due
to the default composer category site setting).

This PR removes the default category from composer when the user doesn't
have permission to post in the category (preventing accidental posts in
the wrong category), and also inserts the read-only category into the
category chooser with a read only badge, this way providing some
information to the user when they find it in the dropdown.

The read only category in the drop down can't be selected via clicking
or keyboard selection.

<img width="1336" height="854" alt="Screenshot 2025-08-12 at 6 33 34 PM"
src="https://github.com/user-attachments/assets/a1640f5d-2c73-4c37-8f6a-e284982a8c12"
/>
2025-08-14 11:19:54 +04:00
Kris 9df1128374 UX: fix Horizon disabled new topic button (#34293)
Fixes a minor styling regression with the disabled new topic button in
the sidebar

Before:
<img width="426" height="212" alt="image"
src="https://github.com/user-attachments/assets/df89a6e5-1390-4fc7-9a67-b991b9645da8"
/>

After:
<img width="454" height="438" alt="image"
src="https://github.com/user-attachments/assets/e741e139-75f6-4bcd-9823-33f2e80af1b4"
/>
2025-08-13 14:56:35 -04:00
Jarek Radosz 89b108c4b2 DEV: Remove unused services from plugins/themes (#34231) 2025-08-12 22:47:31 +02:00
Jordan Vidrine 3ab8e66c00 FIX: Update small screen styles (#34232) 2025-08-11 18:02:01 -05:00
Kris b0f9c6a15f UX: fix theme toggle component positioning in Horizon (#34226)
I believe updating the way the component is connected in
https://github.com/discourse/discourse-sidebar-theme-toggle/commit/9f2217410c97b87c9f82d2114a6da60a1b195505
caused ordering to become inconsistent here... so I've got to do it
manually

This PR puts the theme selector first, and removes the redundant icon
(in Horizon the paintbrush icon is used to swap the color palette)

Before:
<img width="530" height="90" alt="image"
src="https://github.com/user-attachments/assets/506483fb-ea65-4200-9aed-48d6f78c531a"
/>


After:
<img width="538" height="130" alt="image"
src="https://github.com/user-attachments/assets/8afdfeb3-54c6-4541-873c-9a9e9cf5c25a"
/>
2025-08-11 16:57:07 -04:00
Jordan Vidrine ad5b61f482 UX: Fix padding/spacing issues at smaller widths (#34180) 2025-08-08 14:07:36 -05:00
Yuriy KurantandMartin Brennan b0b7e836f2 UX: add welcome banner page visibility setting (#34119)
Enhances customizability of the core welcome banner by adding an
Interface setting: *page visibility* to the core welcome banner.

This allows us to replace [advanced search
banner](https://meta.discourse.org/t/advanced-search-banner/122939).

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-08-08 14:19:00 +08:00
Krzysztof Kotlarek 97f8c213ec FEATURE: theme default option in user interface (#34126)
Before the "theme default" option appeared conditionally, which caused
confusion. For example, it was shown when the theme was using a color
scheme that was not user-selectable. If the scheme was selectable, then
a specific scheme like "Merigold" was preselected. If the theme changed
default schemes, that change was not reflected on the user interface.

Therefore, it would be better to always have the "Theme default" option,
which would have `-1` id. It means that the user's color scheme will
always follow theme defaults.

<img width="400" height="221" alt="Screenshot 2025-08-06 at 10 07 40 am"
src="https://github.com/user-attachments/assets/e3d3588d-1d4a-4e95-9c10-925e48c4a58b"
/>
2025-08-08 08:29:58 +08:00
Krzysztof Kotlarek 8aa45fbbfa Revert "FEATURE: theme default option in user interface" (#34125)
Reverts discourse/discourse#34110
2025-08-07 10:45:15 +08:00
Krzysztof Kotlarek 4a604f0a7c FEATURE: theme default option in user interface (#34110)
Before the "theme default" option appeared conditionally, which caused
confusion. For example, it was shown when the theme was using a color
scheme that was not user-selectable. If the scheme was selectable, then
a specific scheme like "Merigold" was preselected. If the theme changed
default schemes, that change was not reflected on the user interface.

Therefore, it would be better to always have the "Theme default" option,
which would have `-1` id. It means that the user's color scheme will
always follow theme defaults.

<img width="400" height="221" alt="Screenshot 2025-08-06 at 10 07 40 am"
src="https://github.com/user-attachments/assets/e3d3588d-1d4a-4e95-9c10-925e48c4a58b"
/>
2025-08-07 09:05:06 +08:00
Jordan Vidrine d197e4e824 DEV: Apply styles to all category boxes (#34106) 2025-08-05 15:08:15 -05:00
Kris f044719517 UX: Horizon theme, fix d-toc class on smaller screens (#34105)
Follow-up to
https://github.com/discourse/discourse/commit/7404e3f526fee93471a39a7f62cbb87bc76214ab,
The new `grid-template-columns: auto 8em;` style is too specific and was
overriding this on mobile, moving the query fixes it

Before: 
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/7ea096f5-d9f7-4cce-b254-54e365060a33"
/>


After: 
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/519e8689-abb3-4fe9-b196-4da85507766b"
/>
2025-08-05 14:30:27 -04:00
Jordan Vidrine 9bd4ac4ba8 UX: Sidebar changes & css cleanup (#34097) 2025-08-05 09:38:08 -05:00
chapoi 7404e3f526 UX: Horizon > apply small styling fixes for discotoc plugin (#33826)
Reset the `.container .post` grid to default, so the discotoc area isn't
too cramped. [only applies when the discotoc plugin is active]
Also applies some fixes (mini reposition + removal/reduction of
border-radius) to the timeline toggle button.

<img width="1128" height="780" alt="CleanShot 2025-07-24 at 16 56 38@2x"
src="https://github.com/user-attachments/assets/b3d8d37f-44e0-4ba1-b21a-68788a573d6f"
/>

⬇️ 

<img width="1128" height="780" alt="CleanShot 2025-07-24 at 16 55 15@2x"
src="https://github.com/user-attachments/assets/143aa58d-d578-4d77-a861-de45f3cd5fcc"
/>
2025-08-05 14:10:25 +02:00
chapoi 1d1276fcfd UX: Horizon > messages page – change box-shadow to inset (#33976)
The topic-cards on the messages page are laid out differently than on
the main topiclist page and lack spacing. This causes the box-shadow on
selected-highlight to be cutoff:

<img width="690" height="374" alt="image"
src="https://github.com/user-attachments/assets/4318acf8-1ec0-4f8f-8a00-15d8fb5c9d23"
/>

This commit uses an inset box-shadow to avoid that, on this page
specifically:
<img width="2178" height="1146" alt="CleanShot 2025-07-30 at 13 33
27@2x"
src="https://github.com/user-attachments/assets/7af241fe-9d85-48e1-b2aa-2b465a4ba991"
/>
2025-07-30 15:29:22 +02:00
chapoi 53753a1034 UX: Horizon > chat message popup zindex followup (#33977)
followup fix for #33932 
fix wrong css selector
2025-07-30 14:12:43 +02:00
David Battersby 3739c82233 Revert: FEATURE: create new topic while viewing restricted category or tag (#33937) 2025-07-29 20:08:45 +04:00
chapoi fa742b8e24 UX: Horizon > chat-drawer z-index adjustments for popup content (#33932)
Because Horizon has a different drawer-composer interaction as default
(#33677) this means that certain floating elements such as the
`fk-d-menu[data-identifier="usercard"]` and the
`chat-message-actions-container` need an adjusted z-index to remain
visible.

Scoped to chat-drawer for safety.
2025-07-29 15:21:33 +02:00
Jordan Vidrine 49a1667155 UX: Content border color (#33908) 2025-07-28 16:17:06 -05:00
Discourse Translator Bot fa87576fcf Update translations (#33892) 2025-07-28 18:38:22 +02:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Discourse CIJarek Radosz
e7d3c344d1 Build(deps-dev): Bump the lint group across 1 directory with 4 updates (#33881)
Bumps the lint group with 4 updates in the / directory:
[@discourse/lint-configs](https://github.com/discourse/lint-configs),
[ember-template-lint](https://github.com/ember-template-lint/ember-template-lint),
[eslint](https://github.com/eslint/eslint) and
[stylelint](https://github.com/stylelint/stylelint).


Updates `@discourse/lint-configs` from 2.22.0 to 2.28.0
- [Commits](https://github.com/discourse/lint-configs/commits)

Updates `ember-template-lint` from 7.7.0 to 7.9.1
- [Release
notes](https://github.com/ember-template-lint/ember-template-lint/releases)
-
[Changelog](https://github.com/ember-template-lint/ember-template-lint/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/ember-template-lint/ember-template-lint/commits)

Updates `eslint` from 9.27.0 to 9.32.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.27.0...v9.32.0)

Updates `stylelint` from 16.19.1 to 16.22.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
-
[Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/stylelint/stylelint/compare/16.19.1...16.22.0)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2025-07-28 18:02:41 +02:00
David Battersby b9a2986192 DEV: fix linting for unused helper (#33888)
Removes unused helper for sidebar new topic button component
2025-07-28 10:15:27 +04:00
David Battersby e8bf705104 FEATURE: create new topic while viewing restricted category or tag (#33495)
When visiting a restricted category or tag where the current user does
not have permission to create a topic, we should still allow the user to
write a new topic under a different category or tag. This is especially
important when using the **new topic** button from the sidebar.

When clicking the **new topic** button when the user does not have
permission, the composer category defaults to:

1) Subcategory (if
`SiteSetting.default_subcategory_on_read_only_category` is `true` and
subcategory exists)
2) Default site category (if `SiteSetting.default_composer_category` has
a category id value)
3) Default category chooser value of `Category...` prompting the user to
select a category from the dropdown
2025-07-28 09:09:10 +04:00