Commit Graph
67 Commits
Author SHA1 Message Date
Manuel Tancoigne c411b05d51 UX: Make bookmark icon more readable on mobile (#36096)
On mobile the icon for bookmarked/unbookmarked posts is the same, and
the only way to differentiate the state is the icon color; it may be
hard to tell the difference.

This fixes it by changing the icon when unbookmarked.

This is related to [this post on Discourse
meta](https://meta.discourse.org/t/change-bookmark-icon-for-non-bookmarked-posts-on-mobile-view/388854).

Result on desktop:
<img width="126" height="38" alt="image"
src="https://github.com/user-attachments/assets/f9eb9d70-6378-441d-9072-22815b36290f"
/>
<img width="161" height="38" alt="image"
src="https://github.com/user-attachments/assets/aea963dc-482f-4a40-b432-3dd58e9c6bfc"
/>

Result on mobile:
<img width="45" height="39" alt="image"
src="https://github.com/user-attachments/assets/e5018ed9-b214-45e3-9e21-310b5a7b72be"
/>
<img width="45" height="39" alt="image"
src="https://github.com/user-attachments/assets/b239566a-5971-47c0-9221-6c2496f46cbd"
/>
2025-11-21 19:31:09 -05:00
Renato Atilio 4dd3becec1 FEATURE: support image grid and auto-gridding on rich editor (#35951)
Adds support to the grid markdown-it token in the form of a simple block
node, where regular editing and drag and drop work the same as usual.

It also extracts the auto-grid logic from ComposerUpload to live in the
textarea-specific `textarea-text-manipulation`, with a new logic for the
ProseMirror version.
2025-11-21 14:53:24 -03:00
Kris 878d23a1af UX: add admin config area for welcome banner (#36022)
<img width="2224" height="1674" alt="image"
src="https://github.com/user-attachments/assets/7c1a00f6-d437-4146-8f32-bab90a514054"
/>
2025-11-19 11:46:54 -05:00
Jordan Vidrine 3047afa801 UX: Use custom icon for searching in chat (#35600) 2025-10-24 14:42:37 -05:00
Penar Musaraj 891106d5f4 UX: Add "works with" explanation for Discourse ID logins (#35088)
https://github.com/user-attachments/assets/e8a90b2a-100d-4b8e-87c3-a617a3b9be7c
2025-10-01 09:21:36 -04:00
Alan Guo Xiang Tan 3f5e8926af PERF: Fix performance regression in SvgSprite.settings_icons (#34377)
This commit reverts the changes made to `SvgSprite.settings_icons` in
19af83d39e
which resulted in significantly slower boot times on multisite clusters
since `SvgSprite.settings_icons` is called during application preload.
2025-08-18 11:32:54 +02:00
David Taylor 254c4f5ae2 FIX: Add pen icon to core icons list (#33901)
This icon is used in the rich editor. Normally it works fine because
it's the default icon for the "Editor" badge. But if that icon was
changed, or the badge was disabled, then the icon was unavailable.
2025-07-28 16:04:44 +01:00
Martin Brennan 19af83d39e FEATURE: Themeable site settings (#32233)
This commit introduces the concept of themeable site settings,
which is a new tool for theme authors that lives alongside theme
modifiers and theme settings. Here is a quick summary:

* Theme settings - These are custom settings used to control UI and functionality within your theme or component and provide configuration options. These cannot change core Discourse functionality.
* Theme modifiers - Allows a theme or a component to modify selected server-side functionality of core Discourse as an alternative to building a plugin.
* Themeable site settings (new) - Allows a theme (not components) to override a small subset of core site settings, which generally control parts of the UI and other minor functionality. This allows themes to have a greater control over the full site experience.

Themeable site settings will be shown for all themes, whether the theme
changes
the value or not, and have a similar UI to custom theme settings.

We are also introducing a new page at
`/admin/config/theme-site-settings` that
allows admins to see all possible themeable site settings, and which
themes
are changing the value from the default.

### Configuration

Theme authors can configure initial values themeable site settings using
a section in the `about.json` file like so:

```json
"theme_site_settings": {
  "search_experience": "search_field"
}
```

These values will not change when the theme updates, because we cannot
know if admins have manually changed them.

### Limitations

Themeable site settings are only really intended to control elements of
the UI, and when retrieving their value we require a theme ID, so these
limitations apply:

- Themeable site settings cannot be used in Sidekiq jobs
- Themeable site settings cannot be used in markdown rules
- Themeable site settings will be cached separately to client site
settings using theme ID as a key
- Themeable site settings will override keys on the `siteSettings`
service on the client using the application preloader
- `SiteSetting.client_settings_json` will not include themeable site
settings, instead you can call `SiteSetting.theme_site_settings_json`
with a theme ID

### Initial settings

There are only two site settings that will be themeable to begin with:

* `enable_welcome_banner`
* `search_experience`

And our new Horizon theme will take advantage of both. Over time, more
settings that control elements of the UI will be exposed this way.
2025-07-16 11:00:21 +10:00
afc5d13c63 FEATURE: Text heading/paragraph menu in composer toolbar (#33461)
This PR introduces a heading/paragraph dropdown menu for  the
composer toolbar, that works for both the new rich text editor, and
the old markdown editor.

Features include:

* Dynamically changing the icon based on the heading level
* Checking the current heading level in the dropdown list
* Applying the same heading level to multiple selections

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Renato Atilio <renatoat@gmail.com>
2025-07-11 12:29:58 +10:00
Kris 777b80be6c UX: make all preference icons unique (#33202)
We repeat the user icon here, making the icons kind of pointless.

This changes the account and profile icons to potentially be a little
more useful.

Before:

![image](https://github.com/user-attachments/assets/2fce16fb-5ddf-4cd2-9053-c5a946f9500c)

After:

![image](https://github.com/user-attachments/assets/729962c9-c466-456a-95a6-04a767d95ed3)

Mentioned here:
https://meta.discourse.org/t/ux-improvements-on-header-dropdown-notifications/370110
2025-06-13 15:13:09 -04:00
chapoi d564386066 UX: Add discourse text icon (#32744)
![CleanShot 2025-05-15 at 12 02
49@2x](https://github.com/user-attachments/assets/eacf0376-4491-4fcd-8e7e-c052564f0093)
2025-05-15 15:58:32 +02:00
Krzysztof Kotlarek c8d49a4d0a UX: split admin logo and fonts to separate pages (#32700)
Before we had logo and fonts page merged together. Decided to split
them.
2025-05-14 14:02:34 +08:00
Keegan George 6154fa6b45 FEATURE: Add translations to posts (#32564)
## 🔍 Overview
This update adds the ability for users to manually add translations to
specific posts. It adds a 🌐 icon on the post menu where you can click to
add translations for posts.

It also introduces a new site setting:
`content_localization_debug_allowed_groups` which is convenient when
debugging localized posts. It adds a globe icon in the post meta data
area along with a number of how many languages the post is translated
in. Hovering over the icon will show a tooltip with access to editing
and deleting the translated posts.

## 📸 Screenshots
<img width="1234" alt="Screenshot 2025-05-07 at 13 26 09"
src="https://github.com/user-attachments/assets/9d65374d-ee3e-4e8b-b171-b98db6f90f23"
/>
<img width="300" alt="Screenshot 2025-05-07 at 13 26 41"
src="https://github.com/user-attachments/assets/6ee9c5e6-16ed-4dab-97ec-9401804a4ac8"
/>
2025-05-08 10:40:36 -07:00
Ella E. ffa406b0b1 UX: Add more info to theme cards (#32334)
Demo:
<img width="1431" alt="Screenshot 2025-05-02 at 2 24 41 pm"
src="https://github.com/user-attachments/assets/c8ec824e-25df-4efc-a4be-c774a2a97896"
/>
<img width="1480" alt="Screenshot 2025-05-02 at 2 24 32 pm"
src="https://github.com/user-attachments/assets/a4020283-9b6d-4f5e-a8c2-72b7608a6026"
/>

Mobile:
<img width="424" alt="Screenshot 2025-05-02 at 2 25 29 pm"
src="https://github.com/user-attachments/assets/af68669a-7bb4-46dc-92ab-6ecc7a3f3842"
/>
<img width="421" alt="Screenshot 2025-05-02 at 2 25 36 pm"
src="https://github.com/user-attachments/assets/961d9f5c-8010-4c5f-a319-6e356b088667"
/>
2025-05-05 09:06:05 +08:00
KelvandTed Johansson ba7311d807 DEV: remove fa remapping logic (#32478)
Follow up to https://github.com/discourse/discourse/pull/31866, we are
removing the FA name mappings from the codebase. Timeline is mentioned
in Meta topic
https://meta.discourse.org/t/were-upgrading-our-icons-to-font-awesome-6/325349:

> Start May 2025 - removal of old icon names mapping and error level
logging

We'll be merging this in on the 2nd May.

---------

Co-authored-by: Ted Johansson <ted@discourse.org>
2025-05-02 10:20:21 +08:00
Arkshine 588caa60b9 UX: Add missing discourse-table SVG icon (#32447)
Meta:
https://meta.discourse.org/t/icon-missing-in-admin-panel-after-updating-discourse-today/363295

The `discourse-table` icon usage was introduced in
https://github.com/discourse/discourse/commit/464726d973a267802bbe9c06653f11cfd9d0d93a.
However, the SVG doesn't exist in core, but instead in the [AI
plugin](https://github.com/discourse/discourse-ai/blob/main/svg-icons/icons-sprite.svg?short_path=9d0511c).

The PR adds this SVG icon to the core.
2025-04-24 13:45:24 -04:00
Osama Sayegh d416b64af0 FIX: Move CORE_SVG_SPRITES constant to a method (#32261)
Changing the `CORE_SVG_SPRITES` constant to a method enables us to
detect SVG files that are written to the vendor directory during plugin
initialization (as done by the [FontAwesome pro
plugin](https://github.com/discourse/discourse-fontawesome-pro/blob/79a8d39fb46d0f28543680a45acf988fd7b87194/plugin.rb#L31))
which happens after all the ruby classes/files are read and loaded into
memory.

Internal topic: t/151476.
2025-04-11 06:25:04 +03:00
Osama SayeghandElla ad0966afa9 FEATURE: Introduce new components listing page (#32164)
Follow-up to https://github.com/discourse/discourse/pull/31887

This commit introduces a new design for the components listing page, which
is not linked from anywhere in the UI at the moment, but it can be
accessed by heading to the `/admin/config/customize/components` path
directly. We'll make this new design available from the sidebar and
remove the old page once we've tested and validated the new design
internally.

Internal topic: t/146007.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-04-08 17:58:29 +03:00
Ted Johansson ec0b6affd7 DEV: Add Site admin admin config page (#32196)
This PR adds a dedicated admin config page for Site admin related site settings.
2025-04-08 09:52:42 +08:00
Ted Johansson 5f0b186061 DEV: Add User defaults admin config page (#32195)
This PR adds a dedicated admin config page for User defaults related site settings.
2025-04-08 09:21:54 +08:00
Jarek Radosz 29cbbd6b31 DEV: Fix Lint/ShadowingOuterLocalVariable (#32036)
unblocks a rubocop update
2025-03-27 13:50:24 +01:00
Osama Sayegh f87e5aab0b UX: Tweaks to the theme/component pages when using admin sidebar (#30953)
There are a number of minor changes in this commit :

1. Combine the "Themes" and "Components" links in the admin sidebar into
a single tab labelled "Themes and components"
2. The combined tab links to the `/admin/config/customize/themes` page
(titled as "Themes and components")
3. Add a new "Components" tab to the "Themes and components" page.
There's already an existing "Themes" tab
4. Add a "back to" link at the top of individual theme/component page to
navigate back to the respective tab in the "Themes and components" page
5. Remove the themes/components list/sidebar that currently serves for
navigating between themes/components
6. Remove the header in the theme/component page

Changes 4–6 apply only if the admin sidebar is enabled; they have no
effect otherwise.

Internal topic: t/146006.
2025-03-13 15:34:17 +03:00
Osama Sayegh b02e87b8c4 DEV: Introduce ColorPaletteEditor component (#31328)
As part of the theme/color palette overhaul project, we're redesigning
the UI for the editing color palettes. This commit introduces a new
`ColorPaletteEditor` component that encapsulates all the logic and
interface for editing color palettes in the redesigned admin interface.
This component isn't used anywhere at this moment, but it will be once
we start introducing the rest of the redesigned interface.
2025-02-25 07:58:04 +03:00
Kelv 013bf88019 DEV: convert icon name earlier for plugins in test env (#31196)
This makes the backtrace for a deprecated icon name error clearer in
terms of pointing out which plugin the icon is being registered from.
The error will only be raised in the test environment.

This PR also extracts out to a separate module the hashmaps & logic for
converting FA4 era icons to discourse FA6 compatible icons. This
isolates that logic for reuse in DiscoursePluginRegistry - otherwise
pulling in the whole SvgSprite resulted in errors.
2025-02-13 07:20:23 +08:00
Osama SayeghandElla 284e708e67 FEATURE: Dark/light mode selector (#31086)
This commit makes the
[color-scheme-toggle](https://github.com/discourse/discourse-color-scheme-toggle)
theme component a core feature with improvements and bug fixes. The
theme component will be updated to become a no-op if the core feature is
enabled.

Noteworthy changes:

* the color mode selector has a new "Auto" option that makes the site
render in the same color mode as the user's system preference
* the splash screen respects the color mode selected by the user
* dark/light variants of category logos and background images are now
picked correctly based on the selected color mode
* a new `interface_color_selector` site setting to disable the selector
or choose its location between the sidebar footer or header

Internal topic: t/139465.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-02-07 03:28:34 +03:00
Renato AtilioandDavid Taylor 0e61565b2b FEATURE: introduce a ProseMirror editor (#30815)
This is the first in a series of PRs to introduce a
ProseMirror-based
WYSIWYM editor experience
alongside our current textarea Markdown editor.

Behind a hidden site setting, this PR adds a toggle to the composer
toolbar, allowing users to switch between the two options.

Our implementation builds upon the excellent ProseMirror and its
non-core Markdown
module, using the
module's schema, parsing, and serialization definitions as the base for
further Discourse-specific features.

An extension API is included to enable further customizations.

The necessary extensions to support all Discourse's core and core
plugins features **will be implemented in subsequent PRs**.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-02-04 14:37:18 -03:00
Kelv 65324b6e5d DEV: enable raise_error in test envs for deprecated icons in svg_sprite.rb (#30980)
This PR raises an error on any deprecated icon names being converted by
svg_sprite.rb, which will result in any deprecated icons being processed
by the ruby lib to fail tests.
2025-02-04 21:21:20 +08:00
Arkshine a6b136977c DEV: Add missing clock icon to the svg_sprite list (#31093)
Meta:
https://meta.discourse.org/t/the-icon-clock-is-missing-from-the-default-svg-subset/349823/3

This adds the missing `clock` icon to the default SVG subset.
The icon is used in the GitHub PR onebox and the user's activity pending
posts tab.


![image](https://github.com/user-attachments/assets/24c639ac-fb72-4180-aa3b-75b107ae4e07)


![image](https://github.com/user-attachments/assets/cffd878a-3889-4f59-87d8-8ade1f292a33)
2025-01-31 15:47:30 +01:00
Kelv 435fbb7408 DEV: unsilence deprecation warning for old Font Awesome icons (#30028)
* DEV: unsilence deprecation warnings for old Font Awesome icon names

* update fa-user to user font awesome icon name
* update pencil-alt to pencil font awesome 6 icon name
2024-12-03 10:28:39 +08:00
Keegan George fad0d2ec62 UX: New experimental features should be marked clearly (#29622)
This PR adds a small visual change to the new feature item on the `/admin/whats-new` page. When features are marked with an experimental site setting, they should show an indication on the feature item that it is "Experimental"
2024-11-06 15:26:30 -08:00
Alan Guo Xiang Tan 57f4176b57 DEV: Bump rubocop_discourse (#29608) 2024-11-06 06:27:49 +08:00
Régis Hanol 97ba39e60f FIX: bump the number of svg icons we return to first 500 (#29286)
instead of the first 200 which would "hide" some icons from the list when picking an icon for a badge or a sidebar link.

Internal ref - t/119652
2024-10-18 19:22:13 +02:00
Keegan George 53d41d0727 DEV: Add missing x icon to svg_sprite.rb (#29059) 2024-10-02 16:20:24 -04:00
Kris d6eb0f4d96 FIX: replace shield-blank with shield-halved for font awesome (#28804) 2024-09-09 10:48:09 -04:00
David Taylorandawesomerobot 7d8974d02f UX: Upgrade to fontawesome 6.6.0 (#28778)
This upgrade is designed to be fully backwards-compatible. Any icon names which have changed will be automatically remapped to the new name. For now, this will happen silently. In future, once core & official themes/plugins have been updated, we will start raising deprecation errors to help theme/plugin authors update their code.

Extracted from https://github.com/discourse/discourse/pull/28715

Announcement at https://meta.discourse.org/t/were-upgrading-our-icons-to-font-awesome-6/325349

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2024-09-09 14:40:56 +01:00
Osama Sayegh 5dbf812d32 DEV: Add site age and site activities section to the redesigned about page (#28214)
This commit continues on work laid out by https://github.com/discourse/discourse/commit/6039b513fe298521620cbb9bbec2ac9ffa751a37 to redesign the /about page. In this commit, we add the site age and a section on the right hand side to show site activities/statistics such as topics, posts, sign-ups, likes etc.
2024-08-07 11:11:41 +03:00
Ted Johansson 9e31135eca FEATURE: Allow users to sign in using LinkedIn OpenID Connect (#26281)
LinkedIn has grandfathered its old OAuth2 provider. This can only be used by existing apps. New apps have to use the new OIDC provider.

This PR adds a linkedin_oidc provider to core. This will exist alongside the discourse-linkedin-auth plugin, which will be kept for those still using the deprecated provider.
2024-04-19 18:47:30 +08:00
Jarek Radosz 285acf0b86 DEV: Add missing svg icons to the svg_sprite list (#26674) 2024-04-18 13:01:48 +02:00
Jan Cernik 532639f636 UX: Add threads fab icon (#26349) 2024-03-26 08:30:27 +08:00
Ella E ef2a9da8e7 UX: Add chevron icons for expanding and collapsing all toggles in the admin sidebar (#26246) 2024-03-21 10:25:14 +11:00
Krzysztof Kotlarek de00c9a3d3 EXPERIMENTAL: restructure admin sidebar menu (#26047)
New admin sidebar menu
2024-03-13 10:18:08 +11:00
Joffrey JAFFEUX 00a5f67daf FIX: brings back discourse-sidebar icon (#26050)
This has been removed from https://github.com/discourse/discourse/commit/76953cc3561299d84931f0b77e5d99cd21f63f57 by mistake
2024-03-06 12:16:28 +01:00
Joffrey JAFFEUX 76953cc356 FEATURE: allows to force a thread (#25987)
Forcing a thread will work even in channel which don't have `threading_enabled` or in direct message channels.

For now this feature is only available through the `ChatSDK`:

```ruby
ChatSDK::Message.create(in_reply_to_id: 1, guardian: guardian, raw: "foo bar baz", channel_id: 2, force_thread: true)
```
2024-03-06 12:03:42 +01:00
Ella E f935b2ca6d UX: Add sidebar icon (#26046) 2024-03-06 18:24:37 +10:00
Jordan Vidrine f2ac9e4c12 UX: Refactor Do Not Disturb indicator (#25508) 2024-01-31 16:56:07 -06:00
Martin Brennan 6de00f89c2 FEATURE: Initial admin sidebar navigation (#24789)
This is v0 of admin sidebar navigation, which moves
all of the top-level admin nav from the top of the page
into a sidebar. This is hidden behind a enable_admin_sidebar_navigation
site setting, and is opt-in for now.

This sidebar is dynamically shown whenever the user enters an
admin route in the UI, and is hidden and replaced with either
the:

* Main forum sidebar
* Chat sidebar

Depending on where they navigate to. For now, custom sections
are not supported in the admin sidebar.

This commit removes the experimental admin sidebar generation rake
task but keeps the experimental sidebar UI for now for further
testing; it just uses the real nav as the default now.
2023-12-18 11:48:25 +10:00
Ty Correll 700c636d29 UX: unify ai representing icon (#24029)
This PR addresses the push to unify the icon representing AI throughout Discourse, by using the discourse-sparkles icon.

The icon is being moved to core to make changes with dependencies included in core that were using the "magic" icon instead.

In 2 places "magic" -> "discourse-sparkles,
1. topic summaries
2. (unreleased) chat summaries example
2023-10-19 17:30:27 -05:00
Penar Musaraj f6326d03f0 DEV: Bump max theme sprite size to 1MB (#23556)
There is one repo with very large sprites, and it's causing missing
icons on some instances.
2023-09-13 15:00:26 +10:00
Daniel WaterworthandPenar Musaraj 290306a932 SECURITY: Reduce maximum size of SVG sprite cache to prevent DoS
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2023-09-12 15:31:28 -03:00
chapoi a1899996d0 UX: Add bookmark-delete icon (#23025) 2023-08-09 10:51:09 +02:00