7023 Commits

Author SHA1 Message Date
Jordan Vidrine
8cfb6d62d4
DEV: stylint fix (#32391)
A fix for previous PR stylint eror
2025-04-22 10:44:39 +08:00
Jordan Vidrine
93fc50c915
UX: Experiment with animation (#32341) 2025-04-21 21:00:21 -05:00
Jordan Vidrine
d29d6e562d
UX: small-fixes (#32387) 2025-04-21 17:59:02 -05:00
chapoi
25b4e7c61b
FIX: remove z-index from user-status in header (#32382)
After some new changes in the header, the user-status' z-index caused
issues
![CleanShot 2025-04-21 at 13 41
39@2x](https://github.com/user-attachments/assets/a417dd20-842d-47d1-92cd-9b1ae37b1ab6)

AFAICT there is no need for that z-index to begin with.
2025-04-21 16:31:48 +02:00
Martin Brennan
492256e91e
UX: Welcome bannner and search tweaks for mobile (#32362)
* Hides the welcome banner search in mobile, it's not necessary
  since there is the header search
* Fix an issue where the positioning of the search input for
  the header on mobile was affecting welcome banner search
* Make the welcome font a bit smaller and with less padding so
  it takes up less room on mobile

---------

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2025-04-18 12:26:03 +10:00
Kris
bdca369288
UX: don't decrease composer monospace font on mobile (#32358)
I think this is causing iOS to zoom in on the composer in some
scenarios, and we don't want that:


![image](https://github.com/user-attachments/assets/b4b22d25-c3f8-4da5-91d0-1b1940150a89)
2025-04-17 17:44:52 -04:00
Kris
2dac94d99f
FIX: remove mixed declarations from header.scs (#32357)
Follow-up to a0eeb83, this fixes the mixed declarations error
2025-04-17 15:43:40 -04:00
Kris
a0eeb831d3
REFACTOR: merge mobile/desktop header styles into /common (#32320)
This eliminates the `/mobile` and `/desktop` `header.scss` files and
moves the relevant CSS under `common/header.scss` using `.mobile-view`
and breakpoints.

I was also able to eliminate some redundant and unused styles in the
process and move a couple more general styles to `discourse.scss`
2025-04-17 14:57:28 -04:00
Jordan Vidrine
12c5392b38
UX: Header search tweaks (#32354) 2025-04-17 11:32:19 -05:00
Yuriy Kurant
ff334fde8e
UX: header search mobile support - follow up (#32306)
### Changes made

#### Styling
1. added `4px` spacing between search input and cancel button
2. increased cancel button size (with padding) to match input height
3. decreased search panel padding by 1/2 from 16px to 8px
4. animation show/hide changed (from vertical to horizontal) and made it
quicker (300ms->200ms)
5. set html unscrollable when search panel is open

#### Dev
1. changed `data-test-` value to be consistent with other element's
attrs values
2. clear search action tag changed from `<a>` to `<DButton>`
2025-04-17 20:01:47 +08:00
Penar Musaraj
fec1ba0d73
DEV: Fix scss deprecation warning (#32325) 2025-04-16 11:34:30 -04:00
Juan David Martínez Cubillos
c7d400eda2
FEATURE: Implement Form Template Preview (#32111)
![imagen](https://github.com/user-attachments/assets/db5cf334-6e92-40b6-b93a-5cfa12882e8f)
2025-04-15 23:52:02 -05:00
Jordan Vidrine
9145acce80
UX: Remove z-index (#32319) 2025-04-15 16:27:17 -05:00
Jordan Vidrine
47a6a24372
UX: Adjust user-field labels (#32317) 2025-04-15 12:24:14 -05:00
Joffrey JAFFEUX
59ec86933a
DEV: DMultiSelect (#32240)
The `DMultiSelect` component provides a customizable multi-select
dropdown with support for both mouse and keyboard interactions.

![Screenshot 2025-04-10 at 15 40
26](https://github.com/user-attachments/assets/277619db-6e56-4beb-8eda-f76360cd2ad8)

### Parameters

#### `@loadFn` (required)
An async function that returns the data to populate the dropdown
options.

```javascript
const loadFn = async () => {
  return [
    { id: 1, name: "Option 1" },
    { id: 2, name: "Option 2" },
  ];
};
```

#### `@compareFn`

A function used to determine equality between items. This is
particularly useful when working with complex objects. By default, `id`
will be used.

```javascript
const compareFn = (a, b) => {
  return a.name === b.name;
};
```

#### `@selection`
An array of pre-selected items that will be displayed as selected when
the component renders.

```javascript
const selection = [
  { id: 1, name: "Option 1" },
  { id: 2, name: "Option 2" },
];
```

#### `@label`
Text label displayed in the trigger element when no items are selected.

```javascript
@label="Select options"
```

### Named Blocks

#### :selection
Block for customizing how selected items appear in the trigger.

```javascript
<:selection as |result|>{{result.name}}</:selection>
```

#### :result
Block for customizing how items appear in the dropdown list.

```javascript
<:result as |result|>{{result.name}}</:result>
```

#### :result
Block for customizing how errors appear in the component.

```javascript
<:error as |error|>{{error}}</:error>
```

### Example Usage

```javascript
<DMultiSelect
  @loadFn={{this.loadOptions}}
  @selection={{this.selectedItems}}
  @compareFn={{this.compareItems}}
  @label="Select options">
  <:selection as |result|>{{result.name}}</:selection>
  <:result as |result|>{{result.name}}</:result>
  <:error as |error|>{{error}}</:error>
</DMultiSelect>
```

Co-Authored-By: Jordan Vidrine
<30537603+jordanvidrine@users.noreply.github.com>

---------

Co-authored-by: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com>
2025-04-15 14:56:57 +02:00
Ted Johansson
fc6aaa3e49
DEV: Wizard step tweaks (#32304)
This makes two tweaks to the setup wizard:

1. Move the branding (site logo) step to after styling (look & feel).
2. Remove the corporate (your organization) step.
2025-04-15 13:53:01 +08:00
Jordan Vidrine
79c642a446
UX: Quick mobile fix for quote styles (#32297) 2025-04-14 17:28:03 -05:00
Jordan Vidrine
1da41e62cc
UX: Use mixin for quote border radius (#32294) 2025-04-14 16:33:21 -05:00
Jordan Vidrine
fd6eacd93c
UX: Border radius prose-mirror select node (#32292) 2025-04-14 15:10:23 -05:00
Jordan Vidrine
dcef061651
UX: Remove z-index (#32289) 2025-04-14 12:53:46 -05:00
Renato Atilio
fe20b52180
UX: keep the whisper editor font/color style consistent between editors (#32287)
Adds the whisper styling to the Markdown editor as well, keeping it
consistent with the preview and the rich editor.
2025-04-14 14:27:05 -03:00
Renato Atilio
29ca0ae0b1
FEATURE: add footnote (plugin) rich editor extension (#31719)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `footnote` node, parser, `^[inline]` input rule, toolbar button
item, and serializer.

Also adds a NodeView with an internal ProseMirror editor to edit the
footnote content.
2025-04-14 14:25:36 -03:00
Jordan Vidrine
f03a6f3557
UX: Onebox & quote border radius (#32242) 2025-04-14 10:55:51 -05:00
David Taylor
f0057c7353
DEV: Drop legacy topic-list and raw-handlebars compilation system (#32081) 2025-04-14 10:42:40 +01:00
Krzysztof Kotlarek
ee035582e2
FIX: Rename branding to logo and fonts (#32264)
Change branding page into logo and fonts.

In addition, icon for email setting and email appearance were changed.
2025-04-14 10:49:47 +08:00
Yuriy Kurant
8b5da219d8
UX: header search mobile support (#31711)
## Requirements

Initially defined in
https://meta.discourse.org/t/software-engineer-frontend-ember-js-yuriy-kurant/353612/14?u=yaran.

1. On mobile devices and tablets, users can open the search input field
by tapping the search icon
2. When opened, the search input takes over the entire header area:
    - Users can tap the sliders icon to navigate to the advanced search page
(/search)
    - Users can tap Cancel to close search input
3. After submitting a search, results area will take over the entire
screen:
    - Users can tap the X icon to clear the search term from the input field
    - Users can tap Cancel to close search results area and return to their
previous page (i.e. search area overlays content)

## Implementation

1. When opened, the search input takes over the entire header area:
    - changed panel width from `90vw` to `100vw`
    - on initial render (when search input is empty), search panel hovers over the header section only (doesn't cover main content below)
    - quick tip and recent searches lists are not displayed on mobile view
2. Tap on the sliders icon navigates to the advanced search page
(`/search`)
3. Tap on the **Cancel** button:
    - closes search menu
    - if the search term is present, it is cleared
4. Tap on the left-hand side **Search** icon triggers a topics search

## Dev notes

1. Added `// TODO` questioning `search` service `noResults` default value of `false`
2. Added animation on toggling header search panel (created `delayed-destroy` custom modifier)
3. Extracted in-context search filters into a standalone component `search-menu/active-filters`:
    - mobile: active filters below search input
    - desktop: active filters inside search input
3. Removed unnecessary top padding when search results are empty
4. Added `data-test-` attrs for Ember tests. Benefits:
    - semantically `data-test-` attrs indicate that these parts of the layout are covered with tests
    - decouples selector dependency on `id/class` names for testing purposes - eliminates risk of broken tests due to `id/class` name changes
2025-04-14 10:27:48 +08:00
Penar Musaraj
6fc5ce9688
UX: Improve associated accounts in user preferences (#32247)
Before

![CleanShot 2025-04-09 at 16 57
09@2x](https://github.com/user-attachments/assets/73609f67-355b-4e43-b4d8-eb163ce2b3cc)


After

![CleanShot 2025-04-09 at 16 56
10@2x](https://github.com/user-attachments/assets/90b05af0-649d-43ce-87c2-2a36dd8a2caa)
2025-04-10 12:01:07 -04:00
Kris
fb162ad64d
UX: make admin code editor height more flexible (#32241)
Reported here:
https://meta.discourse.org/t/issue-with-custom-css-save-button-on-smaller-screens/358505


Allows the admin code editor to adjust to the viewport regardless of
error message and nav height in both normal and maximized modes


Before:


![image](https://github.com/user-attachments/assets/657fb938-04d2-4ad8-a0c3-f5b6177d7fa2)


![image](https://github.com/user-attachments/assets/bfbf532d-d193-4387-b8c9-546fb6653ff6)


After:


![image](https://github.com/user-attachments/assets/9c2cb0ad-2eff-4171-8912-918dd5326eae)


![image](https://github.com/user-attachments/assets/fa865a13-0891-4fa6-9af6-ed2422bf676e)
2025-04-09 16:20:48 -04:00
Renato Atilio
949953d025
UX: only-emoji consistency between rich editor and cooked (#32245) 2025-04-09 16:54:05 -03:00
Renato Atilio
5ece8112da
FIX: safari bug on rich editor's list item (#32243)
This fixes a bug on Safari where, for some reason, it was leaking to
affect the rich editor list item rendering. When typing, the current
list item was breaking to a next line.

With this change, it doesn't happen anymore, and the more specific `svg`
target will serve the same purpose as it's currently defined on
`InputTip`.
2025-04-09 15:03:52 -03:00
Renato Atilio
d096ba8cbb
UX: whisper color and font-style on rich editor (#32239)
Respects the same styling from the preview for font-style and color for
the ProseMirror editor when we're composing a whisper.
2025-04-09 12:52:22 -03:00
David Battersby
752eca04a8
FIX: add category badge style to category list (#32109)
Adds support for category style headings (square, emojis and icons) to
the all categories list.
2025-04-09 18:31:47 +04:00
Jordan Vidrine
9301a11896
UX: Wrap participants in pm topic item (#32223) 2025-04-08 18:03:07 -05:00
Osama Sayegh
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
Renato Atilio
e84083ee36
FEATURE: prosemirror-codemark for a fake boundary cursor on rich editor (#32165)
Uses prosemirror-codemark to provide a fake boundary cursor to code marks, to easily
prepend/append text either code-marked or not.
2025-04-08 10:32:15 -03:00
Blake Erickson
206ea17c3f
DEV: Fix mixed-decls Sass deprecation warning (#32202)
When running specs I noticed this mixed-decls Sass deprecation warning:

> Deprecation Warning [mixed-decls]: Sass's behavior for declarations
that appear after nested
> rules will be changing to match the behavior specified by CSS in an
upcoming
> version. To keep the existing behavior, move the declaration above the
nested
> rule. To opt into the new behavior, wrap the declaration in & {}.
>
> More info: https://sass-lang.com/d/mixed-decls

This change address that issue.

Follow up to: 928f9175f05413289c45d3fd6424f62956ea0944
2025-04-07 18:26:55 -06:00
Krzysztof Kotlarek
928f9175f0
FEATURE: fonts section for branding page (#32031)
New configure fonts section was added. Because now we have two sections
completed (logos and fonts), new /branding page was introduced and old
/logo and /font pages was removed.

When text size is changed, modal is displayed to ask if preferences of
existing users should be retrospectively updated.



https://github.com/user-attachments/assets/f6b0c92a-117f-4064-bd76-30fa05acc6d3

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-04-07 10:28:42 +08:00
chapoi
564edc52eb
UX: add flex to mentions mixin + update units (#32145)
Fixing hashtag text glued to the icon, and updated some related properties to using better units.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-04-04 12:20:35 +10:00
Martin Brennan
c4d971ea2c
FIX: Consistent search shortcuts (#32099)
We now have 3 search UX variations:

* Header search
* Welcome banner search
* Icon search

And within each of these there is a `<SearchMenu />`
component with an input that needs to be focused based
on either Ctrl+F or `/` shortcuts. This commit makes
sure that each has a unique ID, and moves the functionality
of determining the "current" input ID and focusing the
input to the search service.

This fixes issues like where pressing Ctrl+F twice on
the header search would not reveal the regular browser
search.
2025-04-04 11:54:46 +10:00
Jordan Vidrine
abeb8de7b5
UX: Button fixes (#32152) 2025-04-03 16:13:34 -05:00
Jarek Radosz
9140285569
DEV: Remove rotate-center css animation (#32151)
The code that introduced/used it is gone.
2025-04-03 19:12:55 +02:00
Ted Johansson
6a6c0bc179
UX: Proper width of unsaved site setting banner (#32137)
Elements with position: fixed are taken out of the rendering context, so we can't easily make the banner the width of the main container using CSS. We tried a CSS hack, but that doesn't scale to larger screens, and probably breaks in some themes.

This is a simple JavaScript implementation that matches the width of the main container.
2025-04-03 17:35:01 +08:00
Martin Brennan
a62c2b9a17
DEV: Revert hashtag change and skip admin search test (#32144)
- **Revert "UX: add flex to mention for consistent alignment and spacing
(#32105)"**
- **DEV: Skip test**
2025-04-03 19:20:10 +10:00
chapoi
191ab68509
UX: add flex to mention for consistent alignment and spacing (#32105)
Fixing hashtag text glued to the icon
![CleanShot 2025-04-01 at 14 14
39](https://github.com/user-attachments/assets/237a0d54-dc08-438d-b935-94d3e670fd09)

And updated some related properties to using better units

| Before | After |
|--------|--------|
| ![CleanShot 2025-04-01 at 14 25
32@2x](https://github.com/user-attachments/assets/818d763d-900d-4a68-9115-381173b0c0a3)
| ![CleanShot 2025-04-01 at 14 15
37@2x](https://github.com/user-attachments/assets/abbe9167-6fa1-41ff-999d-e12a779f6a0e)
|
2025-04-03 09:45:41 +02:00
Ella E.
7e7062f213
UX: Align tag separator properly when viewing search in full-page mode (#32133)
Better alignment with the  `,` separator

### Before
<img width="205" alt="image"
src="https://github.com/user-attachments/assets/5d834e72-8e55-4d4b-923a-e5d088fb0102"
/>

### After
<img width="207" alt="image"
src="https://github.com/user-attachments/assets/7d85a0ff-1804-451e-aea4-3fb9844e5b8e"
/>
2025-04-02 10:04:20 -04:00
Ella E.
25e5d7748a
UX: Adjust spacing between simple tags in the site settings preview (#32125)
### Before

![image](https://github.com/user-attachments/assets/27afb534-cac3-4573-9be7-a5608f1dc498)


### After
<img width="635" alt="image"
src="https://github.com/user-attachments/assets/999aca40-5488-41f0-8887-01584ce425a4"
/>
2025-04-02 07:10:12 -06:00
Ella E.
1d65ebe3bb
UX: Adjust spacing to prevent last setting from being hidden behind save all banner (#32127)
This PR adjusts the bottom spacing in the site settings when scrolled to
the bottom and the “Save all changes” banner is visible, ensuring that
the setting controls and helper text are fully visible within the
viewport.

### Before
<img width="954" alt="image"
src="https://github.com/user-attachments/assets/69d8b1ad-e90e-4d94-9f32-4a8ae17ef725"
/>


### After
<img width="937" alt="image"
src="https://github.com/user-attachments/assets/50365613-8553-4354-a8f3-71d834898583"
/>
2025-04-02 05:31:35 -06:00
Sam
c0cf898c10
FEATURE: when rich-editor is enabled use Jetbrains Mono as code font (#32122)
This change forces consistency around code font in Discourse once the
new
rich-editor is enabled

- This means all code blocks in Discourse will render with this font
- Additionally the markdown mode composer will render with this font

Additionally we make 3 small adjustments:

1. We disable ligatures which conflict with typographer
2. We add support for custom ligature settings
3. We adjust down font size, cause 14px ends up matching visually with a
16px non monospace font, this change is already in place previously on
posts

Example:


![image](https://github.com/user-attachments/assets/eca0b544-f3a4-4172-b2af-b39a3c0208e7)
2025-04-02 16:36:52 +11:00
Bryce Huhtala
e68fef0b4c
UX: Wrap edit category subcategories (#32110)
### Issue
In the **edit category settings**, if the category has a large amount of
subcategories, the layout can spill outside the normal content area.

![image](https://github.com/user-attachments/assets/388d0f47-7054-4f6e-85cb-c648df126ee0)

### Solution
Add `flex-wrap: wrap` to form kit container content within edit
category.

![image](https://github.com/user-attachments/assets/a2b51a64-cd6d-423d-9ac6-3230445ed8cf)
2025-04-01 15:37:28 -04:00
Sérgio Saquetim
083082f328
DEV: Remove the legacy widget post menu code (#31211)
https://meta.discourse.org/t/341014
2025-04-01 16:03:58 +01:00