Commit Graph

6458 Commits

Author SHA1 Message Date
Krzysztof Kotlarek
74f24d5973
FIX: bold sidebar header when admin sidebar is disabled (#26993)
Recently a bug was introduced when the admin sidebar section was made bold.

When the admin sidebar is disabled, we display the original sidebar in the admin panel. In that case, an incorrect CSS rule is executed.
```CSS
.admin-area .sidebar-wrapper {
  background-color: var(--d-sidebar-admin-background);
  .sidebar-section-header-text {
    font-weight: bold;
  }
}
```
Bug in this PR: https://github.com/discourse/discourse/pull/26801

To solve it, a custom CSS class with a panel key was added which will allow granular customisations.
2024-05-13 12:36:03 +10:00
carson chang
4fad0b33eb
UX: Use breakpoint CSS variable instead of arbitrary 570px (#26945)
* Update header.scss

* Update discourse.scss
2024-05-09 09:16:24 -07:00
Martin Brennan
abb073b80a
UX: Add CSS for admin plugin empty list CTA (#26949)
This adds `admin-plugin-config-area__empty-list`,
allows us to standardize on CTA styling for empty lists.
2024-05-09 12:46:41 +10:00
Jan Cernik
7bc7ad45bb
UX: Merge the redesign experiment for embedded replies (#26876)
This PR merges the [design experiment](https://meta.discourse.org/t/embedded-replies-feedback/290538) based on the [Custom embedded replies component](https://meta.discourse.org/t/custom-embedded-replies/272670) created by [Don](https://meta.discourse.org/u/don/summary)

---------

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2024-05-08 18:00:17 +02:00
Joffrey JAFFEUX
cf8b81771f
DEV: implements <DropdownMenu /> (#26917)
DropdownMenu component is meant as a way to describe the content of menus.

Syntax:

```
<DropdownMenu as |dm|>
  <dm.item class="test">
    First
  </dm.item>
  <dm.divider class="foo" />
  <dm.item class="bar">
    Second
  </dm.item>
</DropdownMenu>
```
2024-05-08 09:08:42 +02:00
Joffrey JAFFEUX
fe16633a0c
DEV: allows for multiple menus/tooltips (#26823)
menus and tooltips are now appended to their own portals. The service are the only responsible for managing the instances, prior to this commit, services could manage one instance, but the DMenu and DTooltip components could also take over which could cause unexpected states.

This change also allows nested menus/tooltips.

Other notable changes:

- few months ago core copied the CloseOnClickOutside modifier of float-kit without removing the float-kit one, this commit now only use the core one.
- the close function is now trully async
- the close function accepts an instance or an identifier as parameter
2024-05-07 23:48:44 +02:00
chapoi
4edc011d10
UX: use quaternary colour for keyboard navigation (#26911) 2024-05-07 20:20:16 +02:00
Kris
01e725a225
DEV: Remove default button classes from sidebar buttons (#26893) 2024-05-07 09:20:30 -04:00
Penar Musaraj
d6b63309b0
FIX: Restore legacy popup menu SCSS (#26864)
Were removed in 8dd883d but some plugins rely on them. Let's restore
them for now and address cleaning up once plugins/themes no longer use
them.

Should fix https://meta.discourse.org/t/see-who-voted-display-issue/306641
2024-05-03 12:27:09 -04:00
Jan Cernik
5ac7e01b8d
FIX: Select posts menu styles (#26857) 2024-05-03 01:33:09 -03:00
Krzysztof Kotlarek
0842ca7f9e
UX: admin sidebar headings are bold (#26801)
Make admin sidebar headings bold.
2024-04-30 09:31:53 +10:00
Jan Cernik
8dd883d4e5
DEV: Refactor topic admin menu to use <DMenu> (#26678)
* DEV: Refactor topic admin menu to use `<DMenu>`

This PR also introduces a new plugin API to add buttons to the topic admin menu

```javascript
api.addTopicAdminMenuButton((topic) => {
  return {
    action: () => {
      alert('Sunrise!');
    },
    icon: 'sun',
    className: 'sunrise-button',
    label: 'actions.rise',
  };
});
```

The plugins that needed to be updated are:

- [discourse-zoom](https://github.com/discourse/discourse-zoom/pull/73)
- [discourse-salesforce](https://github.com/discourse/discourse-salesforce/pull/74)
- [discourse-topic-noindex](https://github.com/discourse/discourse-topic-noindex/pull/11)
2024-04-29 12:44:38 -03:00
Vinoth Kannan
143f06f2c6
FEATURE: Allow watched words to be created as a group (#26632)
At the moment, there is no way to create a group of related watched words together.  If a user needed a set of words to be created together, they'll have to create them individually one at a time.

This change attempts to allow related watched words to be created as a group. The idea here is to have a list of words be tied together via a common `WatchedWordGroup` record.  Given a list of words, a `WatchedWordGroup` record is created and assigned to each `WatchedWord` record. The existing WatchedWord creation behaviour remains largely unchanged.

Co-authored-by: Selase Krakani <skrakani@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2024-04-29 15:50:55 +05:30
Penar Musaraj
1f73e7d039
FIX: Allow deleting avatars from the selectable avatars setting (#26720)
Fixes two issues:

- frontend was reloading the page when clicking-to-remove avatar
- backend wasn't allowing resetting the setting by deleting all avatars
2024-04-24 16:07:12 -04:00
Penar Musaraj
30e3f291f8
UX: Fix styling for focused row (#26698) 2024-04-22 13:17:00 -04:00
Kris
b971efed8c
UX: dynamic spacing for summarization buttons (#26690) 2024-04-22 09:49:00 -04:00
Carson Chang
7cf04d96c3
UX: Keep input headings consistently bold (#26510) 2024-04-18 20:22:08 -07:00
Krzysztof Kotlarek
98fc614162
FEATURE: mandatory fields for group site setting (#26612)
Automatically add `moderators` and `admins` auto groups to specific site settings.

In the new group-based permissions systems, we just want to check the user’s groups since it more accurately reflects reality

Affected settings:
- tag_topic_allowed_groups
- create_tag_allowed_groups
- send_email_messages_allowed_groups
- personal_message_enabled_groups
- here_mention_allowed_groups
- approve_unless_allowed_groups
- approve_new_topics_unless_allowed_groups
- skip_review_media_groups
- email_in_allowed_groups
- create_topic_allowed_groups
- edit_wiki_post_allowed_groups
- edit_post_allowed_groups
- self_wiki_allowed_groups
- flag_post_allowed_groups
- post_links_allowed_groups
- embedded_media_post_allowed_groups
- profile_background_allowed_groups
- user_card_background_allowed_groups
- invite_allowed_groups
- ignore_allowed_groups
- user_api_key_allowed_groups
2024-04-18 08:53:52 +10:00
Jarek Radosz
84efa66cc1
DEV: Apply flex-direction: column on .d-header (#26658)
This doesn't change anything in 99.9% of cases - by default d-header has only one child element `.wrap`.

There are only two themes that I'm aware of that add another child:
1. discourse-categories-navbar - which I'm currently updating to use the new header APIs, and where the column layout makes more sense
2. a private theme, which was recently updated to use those APIs and that works around the current layout by applying `flex-wrap: wrap` to d-header (I'll remove that override as it conflicts with this change)
2024-04-17 23:00:55 +02:00
Jarek Radosz
4d2dcdad9b
UX: Emoji aligment fixes, followup to #26491 (#26618) 2024-04-12 10:48:14 +02:00
David Battersby
11eb4153fa
UX: prevent toasts from covering header (#26615)
This change prevents toast notifications from blocking the header and user navigation on both desktop and mobile.
2024-04-12 15:49:23 +08:00
Martin Brennan
973a0028b4
FEATURE: Bulk topic tagging allowing restricted operations on sole categories (#26602)
The bulk actions menu for topics has multiple options to work
with tags on topics (append, replace, remove). Our tagging system
along with categories allows for some complicated tag restrictions
to be applied via tag groups. This was a problem for the topic bulk
actions because you couldn't append restricted tags to topics.

This commit allows restricted tags to be used in bulk tagging actions
as long as all selected topics are for a sole category. The category
information will be shown in the modal, and the category ID is used
for the tag search.
2024-04-12 13:10:14 +10:00
Jarek Radosz
98ec4af327
FIX: Add the ident to fix user status styling in posts (#26585) 2024-04-10 01:44:37 +02:00
Jarek Radosz
d16bc06b66
UX: Fix user menu ellipsis color (#26578) 2024-04-09 17:20:26 +02:00
Jarek Radosz
f5c9e75438
UX: Fix alignment issues around user status (#26491)
Minor changes but they 1. correct the html structure (no divs in spans) 2. unify the margins
2024-04-09 11:10:12 +02:00
chapoi
fb41fccb20
UX: new default border radius (#26560)
* UX: remove border radius from PMs

* UX: add default 2px border radius
2024-04-08 22:21:57 +02:00
Joffrey JAFFEUX
17c92b4b2a
UX: shows the bookmark menu improvements
This commit adds a new option `@modalForMobile` for `<DMenu />` which allows to display a `<DModal />` when expanding a menu on mobile.

This commit also adds a `@views` options to toasts which is an array accepting `['mobile',  'desktop']` and will control if the toast is show on desktop and/or mobile.

Finally this commit allows to hide the progressBar even if the toast is set to `@autoClose=true`. This is controlled through the `@showProgressBar` option.
2024-04-08 08:18:50 +02:00
Blake Erickson
8da49b5664
FEATURE: Add message to bulk close topics (#26535)
This will allow you to type a single message when bulk closing topics
that will be applied to every topic, that way they all have the same
message.
2024-04-05 14:56:52 -06:00
Jarek Radosz
570e3f7a1a
UX: Tweak the mention padding (#26492)
…to prevent them from overlapping/touching when placed on consecutive lines of text
2024-04-05 22:23:37 +02:00
David Battersby
f75d119cd3
FEATURE: add progress bar to toast notifications (#26483)
This change adds a progress bar to toast notifications when autoClose is enabled (true by default).

The progress bar allows users to visually see how long is left before the notification disappears.

When hovered on desktop, the progress and autoclose timer will be paused, it will resume again once the mouse is moved away from the toast notification.
2024-04-05 18:29:11 +08:00
Martin Brennan
67a8080e33
FEATURE: Redesigned bookmark modal and menu (#23071)
Adds the new quick menu for bookmarking. When you bookmark
a post (chat message behaviour will come later) we show this new quick
menu and bookmark the item straight away.

You can then choose a reminder quick option, or choose Custom... to open
the old modal. If you click on an existing bookmark, we show the same quick menu
but with Edit and Delete options.

A later PR will introduce a new bookmark modal, but for now we
are using the old modal for Edit and Custom... options.
2024-04-05 09:25:30 +10:00
Penar Musaraj
c4e8221d7e
UX: Improvements to user tips (#26480)
- Add a "Skip tips" button to first notification tip
- Add a "Skip tips" button to the admin guide tip
- Fixes the timeline tip showing when no timeline was present
- Fixes post menu tip showing when no "..." button is present
- Adds system tests
- Marks each tip as seen as soon as it is displayed so that refreshing,
clicking outside, etc. won't show it again
- Change just above means we no longer need a MessageBus track

Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
2024-04-03 11:43:56 -04:00
Kris
b35da59865
UX: adjustments for experimental bulk select menu (#26474) 2024-04-02 18:01:21 -04:00
Vinoth Kannan
cd43985de0
UX: rename the word "Upgrade" to "Update" in the UI. (#26396)
In this PR, all references in the UI to the word "`upgrade`" are changed to "`update`". This is to differentiate the update process in self-hosted sites from the plan "upgrade" process in hosted sites.

Follow-up to the PR: https://github.com/discourse/docker_manager/pull/208
2024-04-02 20:04:37 +05:30
Alan Guo Xiang Tan
91f0c71720
UX: Improve validation error message when saving theme objects setting (#26455)
Why this change?

Before this change, the validation error message shown to the user when
saving a theme objects setting is very cryptic. This commit changes the
validation error messages to be displayed on top of the editor instead.

Note that I don't think this way of displaying is the ideal state we
want to get to but given the time we have this will do for now.
2024-04-02 11:55:51 +08:00
Kris
fa6e275ad9
UX: fix overflow of long site text site names in the header (#26450) 2024-04-02 09:17:14 +11:00
Kris
48cb7b7863
UX: minor style adjustments for schema objects editor (#26444) 2024-04-01 12:43:19 -04:00
Kris
5a54aefd27
UX: highlight code in em and strong blocks (#26435) 2024-03-29 16:41:12 -04:00
Kris
603dd89691
UX: minor theme schema editor adjustments for mobile (#26434) 2024-03-29 15:01:02 -04:00
Kris
e80593c23e
UX: wrap small-user-list-content for many users case (#26422) 2024-03-28 13:40:23 -04:00
Joffrey JAFFEUX
88b9f0bc56
FIX: tweaks of select-kit on mobile (#26401)
- uses footer-nav height and safe-area-inset-bottom as bottom padding
- body scroll lock select-kit only when inside a modal
2024-03-27 17:26:24 +01:00
Kris
9baa820d53
UX: add collabsible headings to theme objects editor, adjust styles (#26383)
This adds collapsible headings to child lists, and adjusts the layout to utilize the available space.
2024-03-27 13:59:01 +08:00
Krzysztof Kotlarek
0932b146d9
FEATURE: the ability to expand/collapse all admin sections (#26358)
By default, admin sections should be collapsed.
In addition, a button to expand/collapse all sections has been added.
2024-03-27 14:42:06 +11:00
Alan Guo Xiang Tan
fbde7f8bc1
UX: Fix position of characters count on objects setting input field (#26357) 2024-03-26 12:54:04 +08:00
Kris
0de20f860b
UX: update twitter blue to X black (#26343) 2024-03-25 11:36:33 -04:00
Jan Cernik
e840d01151
DEV: Convert actions-summary to a component (#26337) 2024-03-25 09:35:52 -03:00
Jarek Radosz
9c7b1b16dd
UX: Convert mention style to inline (#26317)
Works around a webkit bug (?) and makes more sense for elements that are mostly text and displayed _inline_ with text content.

Tested on Chromium and in macOS Safari, with 3 different text sizes in the Interface settings
2024-03-25 09:55:29 +01:00
Joffrey JAFFEUX
9855b794e9
UI: better modal backdrop opacity fading (#26328)
The fading should now be function of the swipe position. We should also correctly instantly remove the fading when closing the modal.
2024-03-22 22:49:01 +01:00
Joffrey JAFFEUX
f7b73f3d70
UX: improves modal on mobile (#26055)
This commit mainly improves three things:
- slide up/down animation of the modals on mobile, also allowing swipe down to close the modal
- body scroll locked modals, it means that only the body of the modal can scroll
- a new `<:headerPrimaryAction>` block for `d-modal` which when present will move the cancel button to the left of the modal title, and this primary action to the right of the title
2024-03-22 16:29:32 +01:00
Kris
2f307b8f54
A11Y: improve markup of 404 page search form (#26322) 2024-03-22 11:09:53 -04:00