Commit Graph

23879 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
0b210e0fc3
FIX: correctly closes search menu on escape (#29848)
Prior to this fix the menu would not close if a child was in focus, and the search suggestions had a special implementation to handle this. The fix now relies on trapping the keydown escape event on the top dip of the search menu.
2024-11-21 07:39:47 +01:00
Ella E.
a0cf8f64f9
UX: Update sidebar invite button to use correct title attribute text (#29875)
This PR updates the sidebar's Invite button to use the intended text for its title attribute.
2024-11-21 12:22:01 +10:00
chapoi
58edabc2b5
DEV: Dmenu add modifier (#29846) 2024-11-21 03:14:46 +01:00
Jordan Vidrine
34e6c8f3dd
UX: Codeblocks experiment merge (#29870) 2024-11-20 17:24:41 -06:00
dependabot[bot]
4f4b4e74c7
Build(deps): Bump ember-resolver from 13.0.2 to 13.1.0 (#29868)
Bumps [ember-resolver](https://github.com/ember-cli/ember-resolver) from 13.0.2 to 13.1.0.
- [Release notes](https://github.com/ember-cli/ember-resolver/releases)
- [Changelog](https://github.com/ember-cli/ember-resolver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-resolver/compare/v13.0.2...v13.1.0)

---
updated-dependencies:
- dependency-name: ember-resolver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 23:39:31 +01:00
Amanda Alves Branquinho
71a8d48d21
DEV: add outlet wrapper for small user list (#29763)
* DEV: add outlet wrapper for small user list

* DEV: use value transformer to extend small user attrs function

* Update app/assets/javascripts/discourse/app/components/small-user-list.gjs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-11-20 19:22:02 -03:00
Kris
fdfc9284fa
DEV: add order to posters column so it gets a classname (#29866) 2024-11-20 17:09:21 -05:00
Kris
9db6bd08a2
FEATURE: add transformer to pass topic ID to simple invite generation (#29861) 2024-11-20 16:08:08 -05:00
David Taylor
daa34b9e11
DEV: Unsilence d-section deprecation (#29851) 2024-11-20 15:27:19 +00:00
David Taylor
6f7c581a80
DEV: Bump @discourse/lint-configs and autofix (#29847)
In particular, this applies:

- new `discourse/no-implicit-this` template-lint rule
- `init`/`willDestroy` ordering enforcement
- `lines-between-class-members`
2024-11-20 14:15:04 +00:00
Joffrey JAFFEUX
67ce111861
DEV: converts do-not-disturb to gjs (#29840) 2024-11-20 09:50:15 +00:00
Joffrey JAFFEUX
704a5f4cab
DEV: converts insert-hyperlink to gjs (#29841) 2024-11-20 09:49:44 +00:00
Joffrey JAFFEUX
8271010387
DEV: converts grant-badge to gjs (#29842) 2024-11-20 09:49:09 +00:00
Joffrey JAFFEUX
a8ca82b11f
DEV: convert keyboard-shortcuts-help to gjs (#29831) 2024-11-19 23:25:02 +01:00
Joffrey JAFFEUX
ad034a5947
DEV: converts user-status to gjs (#29832) 2024-11-19 23:24:49 +01:00
Joffrey JAFFEUX
921416a741
DEV: converts activation-edit modal to gjs (#29827)
* DEV: converts activation-edit modal to gjs

* Update app/assets/javascripts/discourse/app/components/modal/activation-edit.gjs

---------

Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-11-19 23:19:51 +01:00
Joffrey JAFFEUX
e02a37b0d7
DEV: converts jump-to-post modal to gjs (#29830)
* DEV: converts jump-to-post modal to gjs

* Update app/assets/javascripts/discourse/app/components/modal/jump-to-post.gjs

---------

Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-11-19 23:14:10 +01:00
David Taylor
32665cf9dd
DEV: Consolidate i18n import paths (#29804)
Enables our new eslint rules which enforce consistent i18n imports. For more info, see 0d58b40cd7
2024-11-19 20:45:18 +00:00
Kris
acc7caa816
A11Y: make the uppy image uploader keyboard navigable (#29807) 2024-11-19 15:38:13 -05:00
Kris
84fecd370c
A11Y: convert sortable topic list headers to proper buttons (#29808) 2024-11-19 15:38:03 -05:00
David Taylor
79b3cb8289
DEV: Bump @discourse/lint-configs and apply fixes (#29823) 2024-11-19 19:10:02 +00:00
David Taylor
d606ac3d8e
DEV: add i18n named export to "discourse-i18n" (#29820)
Soon, we intend to consolidate all js/gjs translation calls to this new function. See https://github.com/discourse/lint-configs/pull/67 and https://github.com/discourse/discourse/pull/29804
2024-11-19 11:25:22 +00:00
Ted Johansson
682e8df007
FIX: Amend broken settings link in emoji admin breadcrumbs (#29818)
Because of an oversight in a previous PR, the breadcrumb link when visiting Admin > Emoji > Settings was broken. The correct path is customize, not config.
2024-11-19 17:24:49 +08:00
Ted Johansson
c3367c329c
DEV: Make breadcrumb separators unclickable icons (#29817)
The current breadcrumb separators are ">" characters that are added as pseudo-elements. These become part of the clickable area for the links, which causes mis-clicks.

This PR does two things:

- Replace the pseudo-element with a DIcon.
- Make sure the separator is not clickable.
2024-11-19 16:42:43 +08:00
Ted Johansson
d96b8d1001
DEV: Modernize admin emoji JavaScript (#29714)
app/assets/javascripts/admin/addon/templates/emojis.hbs
2024-11-19 15:44:34 +08:00
Martin Brennan
01a160d8af
UX: Add AdminConfigAreaEmptyList component (#29816)
This component can be used as a placeholder on
admin pages where the table has no data as per
the admin UI guidelines.
2024-11-19 16:49:57 +10:00
Joffrey JAFFEUX
582de0ffe3
DEV: adds blocks support to chat messages (#29782)
Blocks allow BOTS to augment the capacities of a chat message. At the moment only one block is available: `actions`, accepting only one type of element: `button`.

<img width="708" alt="Screenshot 2024-11-15 at 19 14 02" src="https://github.com/user-attachments/assets/63f32a29-05b1-4f32-9edd-8d8e1007d705">

# Usage

```ruby
Chat::CreateMessage.call(
  params: {
    message: "Welcome!",
    chat_channel_id: 2,
    blocks: [
      {
         type: "actions",
         elements: [
           { value: "foo", type: "button", text: { text: "How can I install themes?", type: "plain_text" } }
         ]
      }
    ]
  },
  guardian: Discourse.system_user.guardian
)
```

# Documentation

## Blocks

### Actions

Holds interactive elements: button.

#### Fields

| Field | Type | Description | Required? |
|--------|--------|--------|--------|
| type | string | For an actions block, type is always `actions` | Yes |
| elements | array | An array of interactive elements, maximum 10 elements | Yes |
| block_id | string | An unique identifier for the block, will be generated if not specified. It has to be unique per message | No |

#### Example

```json
{
  "type": "actions",
  "block_id": "actions_1",
  "elements": [...]
}
```

## Elements

### Button

#### Fields

| Field | Type | Description | Required? |
|--------|--------|--------|--------|
| type | string | For a button, type is always `button` | Yes |
| text | object | A text object holding the type and text. Max 75 characters | Yes |
| value | string | The value returned after the interaction has been validated. Maximum length is 2000 characters | No |
| style | string | Can be `primary` ,  `success` or `danger` | No |
| action_id | string | An unique identifier for the action, will be generated if not specified. It has to be unique per message | No |

#### Example

```json
{
  "type": "actions",
  "block_id": "actions_1",
  "elements": [
    {
      "type": "button",
      "text": {
          "type": "plain_text",
          "text": "Ok"
      },
      "value": "ok",
      "action_id": "button_1"
    }
  ]
}
```

## Interactions

When a user interactions with a button the following flow will happen:

- We send an interaction request to the server
- Server checks if the user can make this interaction
- If the user can make this interaction, the server will:

  * `DiscourseEvent.trigger(:chat_message_interaction, interaction)`
  * return a JSON document
  
  ```json
  {
    "interaction": {
        "user": {
            "id": 1,
            "username": "j.jaffeux"
        },
        "channel": {
            "id": 1,
            "title": "Staff"
        },
        "message": {
            "id": 1,
            "text": "test",
            "user_id": -1
        },
        "action": {
            "text": {
                "text": "How to install themes?",
                "type": "plain_text"
            },
            "type": "button",
            "value": "click_me_123",
            "action_id": "bf4f30b9-de99-4959-b3f5-632a6a1add04"
        }
    }
  }
  ```
  * Fire a `appEvents.trigger("chat:message_interaction", interaction)`
2024-11-19 07:07:58 +01:00
Krzysztof Kotlarek
04bac33ed9
UX: consistent flags page (#29798)
Add/Edit form should not have an admin header
2024-11-19 14:46:08 +11:00
Joffrey JAFFEUX
55a074e4c3
FIX: ensures category row is not focusable (#29803) 2024-11-19 03:50:32 +01:00
Ella E.
79ffbe7cd5
UX: Make cells middle aligned; apply overview class directly to td elements (#29813) 2024-11-18 18:42:29 -07:00
Jordan Vidrine
2a59df79d3
UX: Add title & adjust dnd image (#29812) 2024-11-18 19:25:41 -06:00
Kris
809ce5f5da
DEV: remove !important from btn-transparent background (#29809) 2024-11-19 09:38:10 +11:00
Penar Musaraj
f1849199e9
A11Y: Allow dismissing the discard drafts modal via keyboard (#29802) 2024-11-18 15:43:36 -05:00
Rafael dos Santos Silva
d85bc1eff6
DEV: Increase max reports dashboard limit (#29806) 2024-11-18 15:54:35 -03:00
Joffrey JAFFEUX
388b9dd38d
FIX: removes aria-hidden on category-status (#29800)
Descendants can gain focus (category badge) and that makes aria-hidden incorrect as a result.
2024-11-18 08:23:50 +01:00
Ella E.
9dab8ed29b
DEV: Moved styles for to be nested under to prevent layout issues affecting other admin tables (#29791) 2024-11-17 22:48:47 -07:00
Gary Pendergast
69d9868c7f
FEATURE: Add keyboard shortcuts for jumping to unread channels (#29734) 2024-11-18 11:18:58 +11:00
dependabot[bot]
f700a72c8f
Build(deps-dev): Bump ember-cli from 6.0.0 to 6.0.1 (#29795)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
- [Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/compare/v6.0.0...v6.0.1)

---
updated-dependencies:
- dependency-name: ember-cli
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-17 22:40:04 +01:00
Jarek Radosz
6e68de79d2
DEV: Use test-provided assert object (#29794) 2024-11-17 22:39:01 +01:00
Ella E.
93983286b5
UX: Increase admin section header contrast (#29790) 2024-11-15 19:43:29 -07:00
Jan Cernik
876591fdab
FIX: Signup fields tab order and descriptions (#29772) 2024-11-15 18:17:55 -03:00
Ella E.
4efcc88039
UX: Move flag CTA button from subheader to header (#29781)
* UX: Move flag CTA button from subheader to header

* DEV: Remove unused subpageheader import
2024-11-15 09:12:45 -07:00
David Taylor
d3caa875be
DEV: Fix duplicate port on livereload (#29771)
Followup to fd5ef6896d
2024-11-14 23:05:47 +00:00
dependabot[bot]
4d89abbc14
Build(deps): Bump ace-builds from 1.36.4 to 1.36.5 (#29764)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.36.4 to 1.36.5.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.36.4...v1.36.5)

---
updated-dependencies:
- dependency-name: ace-builds
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-14 23:31:44 +01:00
Kris
5f130b2971
A11Y: update clickable search dropdown tips to be buttons (#29762) 2024-11-14 16:23:43 -05:00
Jan Cernik
2ac1894292
FIX: Error with social logins and fullpage signup (#29761) 2024-11-14 16:02:17 -03:00
David Taylor
f70cc6215c
DEV: Improve JSDoc for withPluginApi (#29758)
This allows consumers to get intellisense completions on the `api.` argument of their callback
2024-11-14 17:20:23 +00:00
Penar Musaraj
9b691853e0
FIX: Dismiss unread posts in subcategories (#29671)
When a parent category shows topics from subcategories, dismissing
should dismiss posts in both parent and subcategories.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2024-11-14 10:06:12 -05:00
Penar Musaraj
f62ed063fb
UX: Fix Android Firefox Mobile reply position (#29751) 2024-11-14 10:01:55 -05:00
David Taylor
fd5ef6896d
DEV: Overhaul devcontainer configuration (#28446)
- Uses a more appropriate image, with immutable tag (so update prompts work correctly)
- Updates port forwarding
- Improves mount setup (inc. persistant PG/Redis when rebuilding)
- Fixes ember-cli live reload
- Automatically configures VSCode & extensions
2024-11-14 12:11:38 +00:00