4537 Commits

Author SHA1 Message Date
Kris
9d7764bb21
UX: prevent topic map link menu from overflowing when there are many links (#31147)
Before (overflows, can't reach bottom): 

<img
src="https://github.com/user-attachments/assets/fd3cf28a-9735-452e-82ca-8415da9fd66f"
height="500">

After (max-height clipped, can scroll contents): 

<img
src="https://github.com/user-attachments/assets/3b26bf84-a535-4931-9406-6a3354b76534"
height="500">
2025-02-03 18:02:41 -05:00
Jordan Vidrine
585c2b9ed3
UX: Replace href cancel with DButton (#31138) 2025-02-03 16:24:53 -06:00
Jarek Radosz
0ad05e022f
DEV: Fix unwanted stylelint changes, do cleanup (#31140) 2025-02-03 22:05:22 +01:00
Kris
71eb2f6cda
UX: unblock clicking through progress bar wrapper (#31135)
Reported here:
https://meta.discourse.org/t/topic-navigation-toggle-prevents-interactions-on-the-page-in-a-certain-area/350073

The purple wrapper shown here prevents elements underneath it from being
clicked/tapped, this can sometimes interfere with post controls


![image](https://github.com/user-attachments/assets/18cec59d-f150-495c-86c9-572b261f95e3)

The fix is to disable pointer events on the wrapping element, so clicks
pass through. Then clicks are re-enabled on the child element.
2025-02-03 13:18:28 -05:00
Kris
7c50543da5
UX: fix topic progress position when composer is open (#31134)
I'm not sure what the original intention was @ZogStriP, but it seems
this causes a lot of overflow...


Before: 

![image](https://github.com/user-attachments/assets/64e12179-d948-4311-9cba-4271ebe8559e)


After: 

![image](https://github.com/user-attachments/assets/416d28b6-f116-42ab-8b8e-cfdeb477637e)
2025-02-03 12:40:18 -05:00
Jarek Radosz
80d7075171
UX: Fix user-select regressions (#31129)
…and cases that didn't take webkit into account at all.
2025-02-03 18:14:11 +01:00
Kris
0989c4b0a4
UX: update system font stack to system-ui (#31125)
support for the `system-ui` value is widely available now, so we can
drop the device specific values:
https://highperformancewebfonts.com/read/ditch-BlinkMacSystemFont-and-apple-system

https://caniuse.com/?search=system-ui
2025-02-03 11:28:17 -05:00
Kris
a6fb065924
UX: clean up post action menu styles, fix issues, add variables (#31100)
Related to
https://meta.discourse.org/t/double-button-inconsistencies-post-menu/349845

This does some general clean up...

* **Moves shared mobile/desktop styles into /common** 
We had some mobile hover states for some reason, and desktop hover/focus
states can be moved to common and gated with `.discourse-no-touch`...
this means we're applying them on capabilities rather than device type
  
* **Adds some `-d-post-control-` variables to make theming easier** 
Theme authors can replace the variables without worrying about selector
specificity
  
* **Removes an overridden fade-out class from likes**
  We were overriding the effect here anyway 
  
* **Fixes a janky hover transition effect on the like button**
   This was being incorrectly inherited from another button
  
...and fixes some issues

* **Corrects border radius on double buttons (likes, flags)** 
   

![image](https://github.com/user-attachments/assets/e3bf45b4-3d72-4858-94b1-dad41ff3e274)

* **Corrects double button height issues for flags**

   

![image](https://github.com/user-attachments/assets/eb5624ea-f434-43b6-8ffc-de9baf1fa0fd)


* **Adjusts the flag count to avoid the lumpy circle CSS problem**

   

![image](https://github.com/user-attachments/assets/7c0d85bc-7d72-4b99-ab1a-ec45bab05750)
   
* **Removes lingering post-tap focus/hover states on mobile by applying
`.discourse-no-touch` and `focus-visible`**

Tested both glimmer and legacy.
2025-02-03 09:31:17 -05:00
Joffrey JAFFEUX
c8ccf79545
FIX: supports height/preview form-kit composer (#31121)
- `@height` was supported but not working correctly, this is now fixed
and tested
- `@preview` was not supported, we would always hide the preview in form
kit. You now have control over this, default `false`.
2025-02-03 12:56:20 +01:00
Jarek Radosz
69889317e1
UX: Fix discourse topic onebox styling (#31106)
Regressed possibly in https://github.com/discourse/discourse/pull/24198

Before / After

<img width="706" alt="Screenshot 2025-02-01 at 02 59 37"
src="https://github.com/user-attachments/assets/328a0a20-152e-4e3b-bb71-45cc19cce92c"
/>
<img width="706" alt="Screenshot 2025-02-01 at 02 59 13"
src="https://github.com/user-attachments/assets/d151b175-1ca4-4e40-87ee-90fa92de1f30"
/>
2025-02-01 12:27:58 +01:00
Penar Musaraj
23e58cd653
UX: remove animation for back button on mobile (#31048)
We're seeing drops in CLS performance and the animation of this element
may likely be the culprit. We can try removing and seeing if this is
indeed the issue.
2025-01-30 09:26:47 -05:00
Joffrey JAFFEUX
d217e61411
DEV: finer format control on field title/description (#31071)
FormKit allows you to set `@format` on a field which will set the width
of the wrapping container of the control. However, title and
descriptions are out of this container. FormKit will now by default
applies the same format to title and description.

You can override this behavior by using `@titleFormat` and
`@descriptionFormat`.
2025-01-30 13:39:05 +01:00
Sam
29e48a6478
DEV: remove experimental lightbox (#30973)
Experimental lightbox did not pan out, we are rolling it back so we can
start again from base principles.
2025-01-29 16:08:21 +11:00
Martin Brennan
15838aa756
DEV: Convert AdminReport component to gjs (#31011)
This commit converts the `AdminReport` component, which is quite
high complexity, to gjs. After this initial round, ideally this
component would be broken up into smaller components because it is
getting quite big now.

Also in this commit:

* Add an option to display the report description in a tooltip, which
was
   the main way the description was shown until recently. We want to use
   this on the dashboard view mostly.
* Move admin report "mode" definitions to the server-side Report model,
inside a `Report::MODES` constant, collecting the modes defined in
various
   places in the UI into one place
* Refactor report code to refer to mode definitions
* Add a `REPORT_MODES` constant in JS via javascript.rake and refactor
  JS to refer to the modes
* Delete old admin report components that are no longer used
  (trust-level-counts, counts, per-day-counts) which were replaced
  by admin-report-counters a while ago
* Add a new `registerReportModeComponent` plugin API, some plugins
   introduce their own modes (like AI's `emotion`) and components and
   we need a way to render them
2025-01-29 10:33:43 +10:00
Kris
f6c5eca485
DEV: add btn-default classes to buttons using default styling (#31039)
All of these buttons use our default grey background styling, but aren't
carrying the `btn-default` class, which makes them easier to target in
themes. This PR adds the class.
2025-01-28 15:40:34 -05:00
Manuel Kostka
8d9b3467f3
DEV: Use CSS custom properties (#31034) 2025-01-28 08:50:13 -05:00
Penar Musaraj
590c250239
A11Y: Show focus when tabbing to user menu items (bottom bar) (#31015) 2025-01-27 15:38:54 -05:00
Kris
85344b4b07
UX: sidebar "more" icon color fix (#31017)
Currently the vertical ellipsis is slightly darker than other sidebar
icons

Before: 

![image](https://github.com/user-attachments/assets/46f58bf0-681b-480a-b290-3ff1062a8c72)


After: 

![image](https://github.com/user-attachments/assets/5f84fa6b-111f-48c5-a501-c8cd2599dac7)
2025-01-27 13:47:45 -05:00
Kris
19aed18d4f
UX: hide user card focus until keyboard navigation begins (#31014)
When the usercard is opened, we manually assign focus to the first link
to capture focus, but this creates an undesirable focus ring for
visitors not relying on focus indicators for navigation.

With this update, the focus is assigned to the container rather than the
first link. This fulfills the goal of capturing focus within the user
card, but hides the focus ring until navigation within the card begins.

`tabindex="-1"` is necessary because this allows us to manually focus
the container (normally unfocusable) while removing it from the tab
order for subsequent navigation.

Before:


![image](https://github.com/user-attachments/assets/1da3a4bb-181b-4cf6-815b-66199757e300)



After:


![image](https://github.com/user-attachments/assets/dda06321-8558-46bf-b16b-dead68e48b92)

then on tab: 


![image](https://github.com/user-attachments/assets/c4cc3d7b-faaf-4bc0-a7c9-d6afef4c6009)

---------

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2025-01-27 12:34:04 -05:00
Keegan George
5d4bb4b54e
UX: Improvements to posts route (#30968)
This update makes some small improvements to the posts route front-end.
Specifically, it adds a title to the page, and it improves the
positioning of expand/collapse caret.
2025-01-23 19:04:43 -08:00
Kris
aa90ba2992
UX: fix admin dashboard link and style regressions (#30969)
Heading link regression reported here:
https://meta.discourse.org/t/admin-panel-reports-in-the-community-health-section-are-no-longer-clickable/347631

Also noticed some style regressions
2025-01-24 10:23:34 +10:00
Martin Brennan
1b9e2ff4f9
FEATURE: Add attribution to staff notice and rename functionality (#30920)
The name "Staff Notice" was not quite right since TL4 users
can also add these notices. This commit changes the wording to
"Official Notice".

In addition to this, currently you have to go look into the staff
action logs to see who is responsible for a notice. This commit
stores the ID of the user who created the notice, then shows this
information on each notice to staff users.

Finally, I migrated the ChangePostNoticeModal component to gjs.
2025-01-24 09:29:22 +10:00
Keegan George
7b76d25946
DEV: Adopt post list component and new posts route front-end (#30604)
Recently we introduced a new `PostList` component (d886c55f63). In this update, we make broader adoption of this component. In particular, these areas include using the new component in the user activity stream pages, user's deleted posts, and pending posts page. This update also takes the existing `posts` route and adds a barebones front-end for it to view posts all in one page.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-01-23 10:20:45 -08:00
Kris
097d987332
UX: add HTML class for composer preview to manage sidebar height (#30956)
This adds the class `composer-has-preview` to the HTML element when the
composer is opened and the preview is visible.

This allows us to adjust the sidebar height, so that the previewless
composer can overlap the sidebar and better utilize the available space.


Before:

![image](https://github.com/user-attachments/assets/8780f159-5d24-4ac0-8a4f-43a9b1665532)



After: 

![image](https://github.com/user-attachments/assets/baf69856-0ece-453f-aa0f-e7be9939af97)
2025-01-23 12:41:36 -05:00
Ella E.
2c8f07fe85
FIX: Adjust search menu buttons alignment (#30939)
### Before
<img width="485" alt="image"
src="https://github.com/user-attachments/assets/869a676a-604f-461e-b008-975f9e352787"
/>


### After
<img width="485" alt="image"
src="https://github.com/user-attachments/assets/3b91022c-9a7d-4237-8382-19b2174f6006"
/>
2025-01-22 19:46:37 -07:00
Bryce Huhtala
1820dd34fc
UX: Revert #30547 UX: use em units for code font-size (#30936)
The solution in (https://github.com/discourse/discourse/pull/30547)
using `em` units was causing readability problems for code blocks in
mobile. This reverts to the previous solution
(https://github.com/discourse/discourse/pull/30536) of using `font-size:
inherit` for code within heading elements.

The downside is that the code in heading won't be slightly smaller than
the other text like it is for inline code in paragraphs, but it seems
worth it to avoid causing other size issues.
2025-01-22 20:09:23 -05:00
Renato Atilio
99b0ae2fc1
UX: inherit font-settings on form controls (#30935) 2025-01-22 19:54:36 -03:00
Penar Musaraj
eb041085bc
UX: Fix minimized composer position on iOS PWA and app (#30926)
See
https://meta.discourse.org/t/minimized-composer-reply-control-issues/348337
2025-01-22 13:38:34 -05:00
Joffrey JAFFEUX
2cff8c82e3
UX: adds chat send shortcut user preference (#30473)
Users can now decide if they want to send a message on:
- <kbd>enter</kbd>
- <kbd>meta + enter</kbd>

If you choose <kbd>meta + enter</kbd>, <kbd>enter</kbd> will add a
linebreak.

<img width="192" alt="Screenshot 2025-01-21 at 12 57 48"
src="https://github.com/user-attachments/assets/abfd6f8b-83b3-4e6f-be67-8f63d536ca8a"
/>
2025-01-22 13:17:45 +01:00
David Taylor
83737aab5f
FIX: Restore footer-nav backdrop-filter for iOS < 18 (#30914)
This was inadvertantly removed in
d88ee33eb622e52cec5f442dd6416e68c8f758e4

See https://meta.discourse.org/t/348262/4
2025-01-21 23:48:14 +00:00
David Taylor
c266e4acb8
FIX: Enforce 'prefix' notation for media-query ranges (#30913)
"context" notation is not supported in iOS < 16.4, and we don't have any
post-processing on our CSS files which can automatically make that
conversion.

For now, changing the stylelint config to enforce the more-compatible
syntax, and updating all occurences.
2025-01-21 23:42:17 +00:00
Jarek Radosz
8c31f1aa5f
UX: Improve git/code oneboxes (#30822) 2025-01-21 14:20:36 -06:00
Penar Musaraj
120f1afc91
UX: Fix scrolling of form template composer on mobile (#30883)
This was a regression in recent composer refactors, this change ensures the `with-form-template` container is scrollable.
2025-01-20 17:32:32 -08:00
Penar Musaraj
ba5cd20ef2
UX: Remove table editor transition effect (#30878)
This fixes a bit of jitteriness on mobile, noticeable mostly when going
from the topic list to a post that has a table.
2025-01-20 17:08:53 -05:00
David Taylor
c171e3dccd
UX: Replace font-size-ios-input workaround (#30877)
By default, iOS safari will automatically zoom into focused inputs with
font-sizes less than 16px. To avoid this, we had a CSS rule to ensure
inputs always had a large font-size on iOS. This worked, but did lead to
design inconsistencies.

Instead, we can set `user-scalable=no` on the viewport meta tag. Since
iOS 10, this property doesn't actually stop users zooming. But it *does*
still prevent the automatic zooming of inputs. So it solves our zoom
problem, and allows us to remove the CSS font-size workaround.
2025-01-20 19:17:30 +00:00
David Taylor
d88ee33eb6
DEV: Introduce stylelint (#29852)
Stylelint is a css linter: https://stylelint.io/

As part of this change we have added two javascript scripts:

```
pnpm lint:css
pnpm lint:css:fix
```

Look at `.vscode/settings.json.sample` and `.vscode/extensions.json` for
configuration in VSCode.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-01-20 15:27:42 +00:00
Joffrey JAFFEUX
89ff7d51e6
UX: replaces custom more menu by d-menu (#29090)
One of the big advantages is a nicer menu on mobile.

This commit also fixes a bug where the close modal action was called for any destroyed d-menu trigger, even if this specific menu was not expanding, which means it was closing a different modal than its own modal, given we can only have one modal at a time.
2025-01-20 12:00:11 +01:00
Ella E.
1702212982
FIX: Adjust grid-template-columns to prevent text overflow (#30864)
### What's changed?
Added `minmax(0, 1fr)` to `grid-template-columns` to ensure the second
column can shrink to fit within the container, avoiding overflow in
smaller viewports or when the container width is limited.

### Before
<img width="489" alt="image"
src="https://github.com/user-attachments/assets/047acba2-6ce7-444e-9ef1-867d3643ee45"
/>

### After
<img width="489" alt="image"
src="https://github.com/user-attachments/assets/b5485746-8dac-422d-ba35-ab819ef78c5d"
/>
2025-01-19 22:06:09 -07:00
Ella E.
7ae5d03a2c
FIX: Prevent wrapping of select box container by applying nowrap (#30863)
Applied `white-space: nowrap` to ensure text remains on a single line.

### Before

![image](https://github.com/user-attachments/assets/f148e216-fce3-46c6-9934-fb43da7f8f47)


### After
<img width="728" alt="image"
src="https://github.com/user-attachments/assets/fce31f33-9a29-4a6d-85c0-d1566c9acd26"
/>
2025-01-19 19:37:10 -07:00
Ted Johansson
0718f940fa
DEV: Use RouteTemplate for admin API keys template (#30835)
This is a small clean-up PR that does the following:

- Convert api-keys.hbs to a RouteTemplate backed api-keys.gjs.
- Move the sub-page templates (index, show, new) into /api-keys sub-directory.
- Removes some styles that aren't used after the admin UI conversion.
2025-01-17 11:22:47 +08:00
Kris
f942599ce1
UX: improve the alignment of long status messages (#30830)
Before: 


![image](https://github.com/user-attachments/assets/77005641-2289-4296-8988-242c139a376d)

After: 


![image](https://github.com/user-attachments/assets/25889d78-7a5d-4097-9242-5cbd82e909ca)

Short message layout stays mostly unchanged: 


![image](https://github.com/user-attachments/assets/893a8f03-0e24-4e68-bc6b-2469eba0523c)
2025-01-16 17:22:37 -05:00
Penar Musaraj
35214201b8
DEV: Target tablets differently for composer position tweaks (#30798) 2025-01-15 14:09:51 -05:00
Penar Musaraj
d16a8a5ea9
UX: Adjust styling of Back button in topic progress (#30769)
Before: 
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/66c07c49-9603-4eb4-84d5-db3821a7af1a"
/>

After: 
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/ba90d74a-4f63-41ae-9dd7-f5999a2d21ef"
/>
2025-01-15 17:41:00 +11:00
Gary Pendergast
5da6a06ce3
UX: Use DPageHeader on the Emails page (#30781)
There are a few changes here to make the Emails admin page more consistent with the rest of the admin UI.

- The header and navigation menu have been updated.
- The sidebar now stays highlighted when visiting the email admin sub-pages.
- Moved the Template editor from /admin/customize/email_templates to /admin/email/templates, so it fit as a sub-page.
- Removed the link to the Template editor from the Customize section of the old top menu, since it's accessible from the Emails section, instead.
2025-01-15 15:36:16 +11:00
Penar Musaraj
73b28815e3
FIX: Safari on iOS crashes when pinch-zooming (#30779)
Not sure why, but it looks like this `z-index: -1` on the composer
causes iOS to crash super quickly when pinch zooming . This change was
introduced in 07e5f8907e2a8de27c42c2d6f5a02fc153212288 and is not
strictly necessary, let's try removing.
2025-01-14 23:56:20 +01:00
Kris
a94009a57d
UX: remove redundant text-decoration: none, follow up to 912b002 (#30775)
This redundant `text-decoration: none` was getting in the way of showing
a strikethrough on the deleted part of the diff

before ("new strike" at the bottom missing the strikethrough): 

![image](https://github.com/user-attachments/assets/4c04696a-efe8-4bb4-a7a7-cf10fcd4b443)


after (strikethrough appears correctly):

![image](https://github.com/user-attachments/assets/22a8c658-6600-47d4-a795-dc3116971485)
2025-01-14 16:33:09 -05:00
Kris
912b002dcc
UX: show strikethrough, underline in post edit diff (#30773)
Reported here:
https://meta.discourse.org/t/strike-through-text-is-not-rendered-in-diff/347101

`text-decoration: none` needs a few exceptions here to avoid stripping
out styling that's present in posts


before (strikethrough and underline stripped): 

![image](https://github.com/user-attachments/assets/ecb8cdee-e04b-463f-93a3-16d92797f0cd)


after: 

![image](https://github.com/user-attachments/assets/b250c535-de2f-429a-8764-5a60e74ef953)
2025-01-14 15:00:12 -05:00
David Battersby
33ea3599c2
FIX: prevent multiple requests when clicking drafts trigger (#30736)
Adds a loading state to prevent multiple requests when clicking the
drafts menu button.

We are also making a very slight adjustment to button spacing (needed
for both desktop and mobile).
2025-01-14 11:37:36 +04:00
Martin Brennan
dc0bf90069
UX: Apply admin UI guidelines to Reports pages (#30684)
Applies the admin UI guidelines from
https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780
to the reports list and single report page for admins.


![image](https://github.com/user-attachments/assets/2431901f-0225-4658-b408-ab0865d022e6)

![image](https://github.com/user-attachments/assets/6f9e531b-8fec-405f-8429-151fd261ee2c)

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-01-14 13:22:08 +10:00
Ella E.
9ce2ad14d1
FIX: Set fixed width for email group chooser dropdown to prevent resizing based on content (#30740)
This PR addresses an issue where the dropdown container width was
inconsistent, resizing based on its content.

**Changes included:**
- Added a fixed width for the dropdown container.
- Adjusted margin spacing by applying it to the `.identifier` class
instead of `.name`. This prevents awkward spacing when either contains a
large number of characters.

Internal topic: /t/143862
2025-01-13 19:00:09 -07:00