Commit Graph

994 Commits

Author SHA1 Message Date
David Battersby
6e6dbde898
DEV: move chat time formats to core locales (#29236)
This change moves the date/time formats to core locales, so that they can be used outside of the plugin.
2024-10-16 20:10:40 +04:00
David Battersby
6078fb73ea
UX: consistent chat message date format (#29232)
In certain locales like English (GB), If a user posted 2 subsequent messages, the first would have a date displayed in 24 hour format, while the second message would be shown in 12 hour format (when hovering the message).

This change forces both messages to display in 12 hour format, the first message showing the am/pm, and the second showing the smaller version without am/pm.
2024-10-16 21:51:04 +08:00
David Taylor
06d32a8a89
DEV: Refactor uppy component mixins into standalone classes (#28710)
This commit replaces all uppy-related mixins with standalone classes. The main entrypoint is now lib/uppy/uppy-upload.js, which has a list of its config options listed at the top of the file. Functionality & logic is completely unchanged.

The uppy-upload mixin is replaced with a backwards-compatibility shim, which will allow us to migrate to the new pattern incrementally.
2024-10-16 11:15:19 +01:00
chapoi
c1325dbe13
UX: prevent unread indicator from shrinking in flexbox (#29207) 2024-10-15 10:08:45 +02:00
Martin Brennan
6c6cdd96e9
UX: Bump up chat delete messages limit (#29202)
50 is pretty restrictive, let's do 200 for now
2024-10-15 13:15:40 +10:00
chapoi
1695971523
UX: change thread button in chat nav to use btn-transparent (#29186) 2024-10-14 09:25:27 +02:00
David Battersby
79d2eb5beb
FEATURE: enable threading in chat DM channels (#29170)
Support threads in DMs and group chats so members can keep their conversations organized.

This change adds a new toggle switch for threads within the Chat Channel Settings screen. For new direct message channels threading is enabled by default.

We have made a decision to exclude direct message threads from the My Threads screen for now.
2024-10-11 13:05:07 +04:00
chapoi
3c03d9b1e5
UX: chat index flex issues (#29157) 2024-10-10 12:55:08 +02:00
chapoi
d58a2b853f
UX: fix missing text overflow ellipsis in chat index pages (#29150) 2024-10-10 09:57:32 +02:00
Sérgio Saquetim
08d5cf01cd
FIX: Don't override other sidebar panels when opening/closing the chat drawer (#29144)
This commit fixes an issue where the following happens:

1. The user opens a page where an alternative sidebar panel is displayed like /admin or other page where a plugin is displaying an alternative sidebar like the `docs-categories` plugin
2. Clicking the chat icon in the header and opening the drawer, or if you just minimize chat into drawer after it opens full-screen
3. The alternative sidebar panel is lost and reverted to the main panel.
2024-10-09 20:29:19 -03:00
chapoi
d64d0ddd3d
UX: fix overflow on thread index pages (mobile) (#29126) 2024-10-08 15:27:41 +02:00
chapoi
0ba7a7ecab
UX: new sidebar styling (#29119) 2024-10-08 11:28:36 +02:00
David Battersby
a7a9148b1e
DEV: consolidate chat channel notification settings (#29080)
On the chat channel settings page, we want to show a single Send push notifications setting instead of the current Desktop notifications and Mobile push notifications settings.

For existing users, use the Mobile push notifications setting value for the new Send push notifications setting.
2024-10-08 13:13:01 +04:00
Martin Brennan
85774cc214
UX: Automatically collapse admin page header buttons on mobile (#29040)
This commit attempts to improve the mobile experience for
admin page header and subheader by automatically collapsing
all action buttons in these components into a DMenu when viewing
mobile.

This is done by using different "list" wrapper components and a
DMenu trigger and a DropdownMenu on mobile only, and uses has-block
to determine whether to render the DMenu trigger at all.

This also removes the `PluginOutlet` in `AdminPluginConfigPage`, it
was too inflexible for this `DropdownMenu` case, and since the `:actions`
were always rendering we couldn't rely on `has-block`. A new plugin API,
`registerPluginHeaderActionComponent`, has been introduced instead to
replace it.
2024-10-08 08:28:32 +10:00
chapoi
8d1867688f
UX: add padding bottom to chat index list (#29096) 2024-10-07 07:09:27 +02:00
Penar Musaraj
d959bfdc61
UX: Improve bottom padding to chat index on mobile (#29086)
Minor adjustment to #29082
2024-10-04 11:33:38 -04:00
chapoi
c13ca6eb19
UX: chat index mini refactor (#29082) 2024-10-04 08:10:36 -04:00
David Battersby
9eaf908e63
DEV: cleanup chat desktop notification data (#28943)
Makes channel_id and is_direct_message_channel consistent across desktop notifications, which also removes the need to lookup the channel from Chat Notification Manager.
2024-10-03 12:43:17 +04:00
Jarek Radosz
41c3c5745e
DEV: Fix optionalService in decorator form (#29042)
…and remove unused injections
2024-10-01 14:12:34 +02:00
Martin Brennan
73f42e110a
FIX: Unscoped plugin config page actions outlet (#29026)
In 61c1d35f17 I added a
PluginOutlet to AdminPluginConfigPage. This was intended to be
used as a way to render actions buttons inside the header of
a plugin that has a custom admin UI page. This worked, but
since the outlet was generically named, as soon as one plugin
used it the button would show on all plugins.

This fixes the immediate issue by naming the outlet based
on the plugin, then having each plugin specify their own
outlet to render into. There may be a nicer way to do this,
but for now this stops the bleeding.
2024-09-30 14:35:23 +10:00
chapoi
9b383e3729
UX: chat composer style tweaks (#28938) 2024-09-18 02:45:44 +02:00
Joffrey JAFFEUX
2aca41914a
FEATURE: supports mark tag in chat messages (#28949)
This brings feature parity with posts where you can use this tag.
2024-09-17 20:52:34 +02:00
chapoi
0923f5e3a7
UX: small colour change to chat composer insert button (#28904) 2024-09-17 03:31:55 +02:00
David Battersby
b60f4606e5
FEATURE: allow names in chat channel title (#28843)
This change adds full names to direct message channel titles when the following conditions are met:

- SiteSetting.enable_names = true
- SiteSetting.display_name_on_posts = true
- SiteSetting.prioritize_username_in_ux = false

If a user's full name is blank, it will fallback to their username in both 1-1 channels and Group DM channels.
2024-09-16 18:12:13 +04:00
Kris
a914d3230b
DEV: remap all core icons for fontawesome 6 upgrade (#28715)
Followup to 7d8974d02f

Co-authored-by: David Taylor <david@taylorhq.com>
2024-09-13 16:50:52 +01:00
David Battersby
e9b7663798
UX: sort chat channels by activity in desktop drawer (#28822)
This change sorts the desktop chat channels by activity in drawer mode, and keeps sidebar channel list sorted by slug.
2024-09-13 10:14:37 +04:00
chapoi
b59056780c
UX: upodate stying of chat composer focused state (#28900) 2024-09-13 07:34:40 +02:00
Jarek Radosz
896f116443
DEV: Fix random typos (#28891) 2024-09-12 23:25:34 +02:00
Jarek Radosz
4d484d89d0
DEV: Add a missing service injection (#28890) 2024-09-12 23:20:33 +02:00
David Battersby
c697e70892
FIX: prevent chat channel not found ajax error (#28818)
On occasion we get an error popup on desktop due to the channel not being found.

This change means that we only check the cached channels in ChatChannelsManager for the matching channel id, but we skip doing manual lookup which results in ajax popup when it fails.
2024-09-10 11:52:25 +04:00
Martin Brennan
61c1d35f17
FEATURE: Convert chat plugin UI to new show plugin and admin UI guidelines (#28632)
This commit converts the current chat plugin UI into the
new "show plugin" UI already followed by AI and Gamification.

In the process, I also:

* Made a dedicated /new route to create new webhooks
* Converted the webhook form to FormKit
* Made some fixes and improvements to the `AdminPluginConfigPage`, `AdminPageHeader`,
   and `AdminPageSubheader` generic components, so more plugins can
   adopt the UI guidelines too. This includes adding a header outlet so plugins
   can add action buttons to the plugin show page header.
* Fixes the submit button loading state for FormKit (by Joffrey)

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-09-10 15:16:16 +10:00
Kris
deb751dfe3
UX: remove btn-default class from chat thread tracking dropdown (#28789) 2024-09-06 15:14:29 -05:00
David Battersby
2a5e1aa8e6
FEATURE: only play chat sound when chat badge icon is shown (#28387)
Every time a desktop chat sound plays, there should be some visual cue as to why the sound was played in the first place.

This change follows the chat indicator preference:

- All New Messages - a blue dot is shown for all messages, so we attempt to play a sound every time
- Direct Messages, Mentions and Watched Threads - a green dot is shown for all urgent messages, so we attempt to play a sound for urgent chat notifications
- Only Mentions - only play chat sounds when user is mentioned
- Never - we never play chat sounds, as user wouldn’t know why the sound was played
2024-09-06 18:25:25 +04:00
David Battersby
a193bf4360
UX: update chat channel sorting (#28760)
Reverts chat channel sorting changes made in #28731 due to desktop sidebar.
2024-09-05 20:58:15 +04:00
David Battersby
b7cfd4e146
FIX: toggle chat drawer on channel thread list (#28759)
Chat toggle relies on using a height: auto to collapse drawer, however in channel threads we should be only displaying threads when drawer is expanded. Displaying threads conditionally based on drawer toggle status fixes this.
2024-09-05 19:01:12 +04:00
David Battersby
d5670069f5
UX: fix spacing of emoji in chat channel title (#28756)
Fixes a small spacing bug with emoji in channel titles
2024-09-05 16:43:06 +04:00
David Battersby
e991574389
UX: chat drawer increase unread channel visibility (#28731)
This change increases the visibility of unread channels to make them stand out more in drawer mode (desktop).

When a channel is unread:

- it floats to the top;
- when multiple channels are unread, they are sorted alphabetically (equal to how it’s done on mobile)
- the unread indicator blue dot moves to directly right of the channel name
2024-09-05 13:36:50 +04:00
Osama Sayegh
a23773f83d
DEV: Deprecate show_in_ui argument of the register_stat API (#28727)
We need to start printing deprecation notices when the `show_in_ui` argument is used because it works only for the old about page which will be removed soon. For the new about page, we've introduced a new API `addAboutPageActivity` which is more flexible than a true/false argument on the server side.

Internal topic: t/136551.
2024-09-04 19:58:14 +03:00
David Battersby
a2f625a0ef
DEV: remove CSS for consolidated DM notifications (#28728)
Removes unused CSS that was a temporary fix for a new notification type that was later reverted.
2024-09-04 11:39:49 +04:00
David Battersby
fdcf4698fc
UX: Update Chat Group Name and Placeholder (#28703)
* UX: Update Chat Group Name and Placeholder

* update tests

* fix failing tests

* better checking of system user when setting dm title
2024-09-04 15:52:23 +10:00
David Battersby
997fbc9757
FEATURE: Add ability to watch chat threads (#28639)
This change introduces a new thread notification level allowing users to get notified when someone replies to the thread.

Users who watch a thread will get a green notification on the chat icon and a user notification (blue). User notifications are consolidated based on thread id to prevent cluttering the original users notification area.

---------

Co-authored-by: Régis Hanol <regis@hanol.fr>
2024-09-02 16:45:55 +04:00
David Taylor
583c932173
DEV: Refactor complex initializers into classes (#28661)
We're working to remove all decorators from object-literal-properties. This commit refactors all initializers which were using these decorators into classes, where decorators are allowed. Also adds cleanup logic to the local-dates initializer, which was previously missing.
2024-09-02 10:08:07 +01:00
David Taylor
ed4f80d589
FIX: Chat emoji picker positioning (#28643)
Removes chat-specific changes from dfc947a97d, and adds `preventScroll: true` to prevent timing issues between the emoji picker being brought into the viewport and being focussed.
2024-08-29 17:00:26 +01:00
David Taylor
a2cab9a342
DEV: Update remaining core plugin components to native-class syntax (#28611)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-29 12:16:52 +01:00
Jan Cernik
a12b933f5c
UX: highlight the chat channel/DM only when chat is expanded (#28488) 2024-08-27 09:50:36 -03:00
Joffrey JAFFEUX
b4a8873596
DEV: changes identifier from card to usercard (#28575) 2024-08-27 14:08:49 +02:00
David Battersby
910bfaf5f5
FIX: prevent desktop notification callbacks on mobile (#28527) 2024-08-26 15:49:49 +10:00
David Taylor
fe6c91daa3
DEV: Convert select-kit subclasses to native class syntax (#28491)
This covers all select-kit subclasses in core and core plugins

Followup to https://github.com/discourse/discourse/pull/28489
2024-08-23 13:19:26 +01:00
Joffrey JAFFEUX
842d2749a1
FIX: adds chat-draw-expanded class to body (#28490)
To achieve this, the code is now using bodyClass instead of relying on the addChatDrawerStateCallback`.
2024-08-22 17:46:41 +02:00
Osama Sayegh
db6eff7be9
DEV: Allow custom site activity items in the new /about page (#28400)
This commit introduces a new frontend API to add custom items to the "Site activity" section in the new /about page. The new API is called `addAboutPageActivity` and it works along side the `register_stat` serve-side API which serializes the data that the frontend API consumes. More details of how the two APIs work together is in the JSDoc comment above the API function definition.

Internal topic: t/128545/9.
2024-08-20 16:16:05 +03:00