Commit Graph

51768 Commits

Author SHA1 Message Date
chapoi
cd183edad1
UX: modal > remove obsolete wrapper class (#24381) 2023-11-15 11:33:23 +00:00
Joffrey JAFFEUX
ee2e1e04a8
UX: shorter copy link confirmation (#24380) 2023-11-15 11:30:27 +01:00
chapoi
f72899401d
UX: refactor .d-modal to use BEM and improve styling (#23967)
This PR refactors the following:
* leaving all the CSS applied to the old `modal-body` classes in their respective files
* made  new clean styling for `.d-modal` and refactored the template to use the new BEM classes
  * `inner-`, `middle-`, `outer-` container classes are gone and replaced with simplified `wrapper` and `container` classes  
  * use standardised max-sizes with modifiers `-large` and `-max`
  * lighter backdrop,
  * min-width to prevent puny modals
  * other styling changes regarding padding, close button,…
* pulled out all modal overrides into a general `modal-overrides` file + cleanup of outdated CSS
* pulled out login and create account modal styling into their own file, cause it's such a big override 
* removed old general login.scss file for mobile & desktop
* only kept some remainders I don't want to touch in `app/assets/stylesheets/common/base/login.scss`
2023-11-15 10:14:47 +00:00
Kris
38e53b5e8e
UX: improve mobile user card button display (#24311) 2023-11-14 17:13:37 -05:00
Kris
e69f93e729
UX: use mention mixin for chat mentions (#24319) 2023-11-14 17:13:15 -05:00
dependabot[bot]
a870361528
Build(deps-dev): Bump rubocop-discourse from 3.4.0 to 3.4.1 (#24375)
* Build(deps-dev): Bump rubocop-discourse from 3.4.0 to 3.4.1

Bumps [rubocop-discourse](https://github.com/discourse/rubocop-discourse) from 3.4.0 to 3.4.1.
- [Commits](https://github.com/discourse/rubocop-discourse/compare/v3.4.0...v3.4.1)

---
updated-dependencies:
- dependency-name: rubocop-discourse
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove the setting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-11-14 22:56:30 +01:00
Mark VanLandingham
00f7e58da4
DEV: Add support for condition option when adding toolbar buttons (#24370) 2023-11-14 15:40:34 -06:00
David Taylor
d589c4c47f
DEV: Refactor DiscourseURL redirects (#24372)
Previously this was being handled in two places:

1. As a monkey-patch to the Ember router. This would 'trick' the router into rendering a different route, but would leave the browser URL bar unchanged. Many possible bugs can come from this state

2. In the DiscourseURL.routeTo function. This functioned fine as a redirect, but wouldn't have any effect when the transition is handled by Ember

This commit refactors things so that the DiscourseURL redirects are handled the same as our permalinks. When the Ember 'unknown' route is hit, we check for a possible rewrite and redirect there. This is a supported way of doing things, and should be more robust going forwards.
2023-11-14 20:30:01 +00:00
David Taylor
eda79186ee
FIX: Recompile theme translations when fallback data changes (#24371)
Previously we would only recompile a theme locale when its own data changes. However, the output also includes fallback data from other locales, so we need to invalidate all locales when fallback locale data is changed. Building a list of dependent locales is tricky, so let's just invalidate them all.
2023-11-14 19:53:27 +00:00
David Taylor
69a70f8159
DEV: Refactor user index redirects into single place (#24369)
Previously we had similar logic in two places:

1. A DiscourseURL rewrite, based on a site setting
2. Some logic in the user-index route

This commit moves everything into (2) to make things clearer and more consistent
2023-11-14 19:00:05 +00:00
Penar Musaraj
c6ead3f5c4
FEATURE: Allow users to confirm session with passkeys (#24337)
We ask users to confirm their session if they are making a sensitive
action, such as adding/updating second factors or passkeys. This
commit adds the ability to confirm sessions with passkeys as an option
to the password confirmation.
2023-11-14 11:38:10 -05:00
Discourse Translator Bot
c36ee3bc02
Update translations (#24366) 2023-11-14 14:30:11 +01:00
dependabot[bot]
8ad0ff80f8
Build(deps): Bump loofah from 2.21.4 to 2.22.0 (#24356)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.21.4 to 2.22.0.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.21.4...v2.22.0)

---
updated-dependencies:
- dependency-name: loofah
  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>
2023-11-14 13:07:47 +01:00
dependabot[bot]
eb58758ce3
Build(deps): Bump web-push from 3.0.0 to 3.0.1 (#24355)
Bumps [web-push](https://github.com/pushpad/web-push) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pushpad/web-push/releases)
- [Commits](https://github.com/pushpad/web-push/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: web-push
  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>
2023-11-14 13:07:29 +01:00
dependabot[bot]
8a03d45621
Build(deps): Bump net-imap from 0.4.4 to 0.4.5 (#24354)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.4.4 to 0.4.5.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.4.4...v0.4.5)

---
updated-dependencies:
- dependency-name: net-imap
  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>
2023-11-14 13:07:11 +01:00
dependabot[bot]
c512552b4f
Build(deps): Bump ember-route-template in /app/assets/javascripts (#24353)
Bumps [ember-route-template](https://github.com/discourse/ember-route-template) from 1.0.2 to 1.0.3.
- [Commits](https://github.com/discourse/ember-route-template/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: ember-route-template
  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>
2023-11-14 13:06:53 +01:00
dependabot[bot]
5e2f0f00ab
Build(deps): Bump unf_ext from 0.0.8.2 to 0.0.9 (#24340)
Bumps [unf_ext](https://github.com/knu/ruby-unf_ext) from 0.0.8.2 to 0.0.9.
- [Changelog](https://github.com/knu/ruby-unf_ext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/knu/ruby-unf_ext/compare/v0.0.8.2...v0.0.9)

---
updated-dependencies:
- dependency-name: unf_ext
  dependency-type: indirect
  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>
2023-11-14 12:38:22 +01:00
Godfrey Chan
3a0cdd2734 DEV: Convert components to gjs
- convert chat/channels-list -> gjs
- convert chat/chat-channel-archive-status -> gjs
- convert chat/chat-channel-card -> gjs
- convert chat/chat-channel-leave-btn -> gjs
- convert chat/chat-channel-metadata -> gjs
- convert chat/chat-channel-preview-card -> gjs
- convert chat/chat-channel-status -> gjs
- convert chat/chat-channel-unread-indicator -> gjs
- convert chat/chat-composer-dropdown -> gjs
- convert chat/chat-composer-message-details -> gjs
- convert chat/chat-composer-upload -> gjs
- convert chat/channel -> gjs
- convert chat/header -> gjs
- convert chat/back-link -> gjs
- convert chat/channel-title -> gjs
- convert chat/close-button -> gjs
- convert chat/full-page-button -> gjs
- convert chat/left-actions -> gjs
- convert chat/right-actions -> gjs
- convert chat/toggle-expand-button -> gjs
- convert chat/index -> gjs
- convert chat/chat-emoji-avatar -> gjs
- convert chat/chat-mention-warnings -> gjs
- convert chat/chat-message-in-reply-to-indicator -> gjs
- convert chat/chat-message-separator-date -> gjs
- convert chat/chat-message-separator-new -> gjs
- convert chat/chat-message-text -> gjs
- convert chat/chat-message-thread-indicator -> gjs
- convert chat/chat-notice -> gjs
- convert chat/chat-notices -> gjs
- convert chat/chat-replying-indicator -> gjs
- convert chat/chat-side-panel-resizer -> gjs
- convert chat/chat-side-panel -> gjs
- convert chat/chat-skeleton -> gjs
- convert chat/chat-upload-drop-zone -> gjs
- convert chat/chat-upload -> gjs
- convert chat/chat-user-display-name -> gjs
- convert chat/export-messages -> gjs
- convert chat/button -> gjs
- convert chat/separator -> gjs
- convert chat/avatar -> gjs
- convert chat/error -> gjs
- convert chat/info -> gjs
- convert chat/left-gutter -> gjs
- convert chat/archive-channel -> gjs
- convert chat/channel-summary -> gjs
- convert chat/delete-channel -> gjs
- convert chat/edit-channel-name -> gjs
- convert chat/move-message-to-channel -> gjs
- convert chat/thread-settings -> gjs
- convert chat/toggle-channel-status -> gjs
- convert chat/mention_without_membership -> gjs
- convert chat/scroll-to-bottom-arrow -> gjs
- convert chat/item -> gjs
- convert chat/unread-indicator -> gjs
- convert chat/user-card-button -> gjs
- convert chat/full-page-chat -> gjs
- convert chat/reviewable-chat-message -> gjs
- convert chat/chat -> gjs
- convert chat/toggle-channel-membership-button -> gjs
- convert chat/chat-preferences -> gjs
2023-11-14 10:53:54 +00:00
Godfrey Chan
e1f74fcb4b DEV: prep for gjs conversion: rename .js -> .gjs
Some of these files are quite small, and if we rename them in the same
commit where we inlined the template, Git may choose to see them as
different files. This commit forces Git to recognize the rename, which
will preserve the lineage of the refactored files.
2023-11-14 10:53:54 +00:00
Joffrey JAFFEUX
016e91380c
FIX: correct online indicator for non interactive (#24364)
When introducing non interactive user avatar, the `chat-user-avatar__container` div has been omitted, which prevented the css to correctly apply.
2023-11-14 11:46:50 +01:00
Joffrey JAFFEUX
b1cff6de6a
UX: shows editing title only on settings page (#24330) 2023-11-14 11:34:54 +01:00
Kelv
2b4251c56c
DEV: change header-topic-title-suffix-outlet to insert into classed span element (#24362) 2023-11-14 14:06:48 +08:00
Martin Brennan
014bb0adb8
FIX: buildQuoteMarkdown fn was not passed down properly (#24360)
Followup to d128dc0e61,
I swear I tried this locally and it worked, but it turns
out it didn't. Need to keep the `action "function"` syntax
here.
2023-11-14 10:42:41 +10:00
Alan Guo Xiang Tan
e5b0493b49
FEATURE: Allow /filter route to be accessible by anon users (#24359)
Why this change?

There is no reason for us to exclude anon users from viewing this route
so we're making a product decision to change this.
2023-11-14 08:03:24 +08:00
Martin Brennan
a238f66b33
DEV: Add quote-share-buttons-before plugin outlet (#24358)
This is so additional buttons can be rendered inbetween
the quote/edit buttons and the share buttons for post quotes
2023-11-14 09:41:44 +10:00
Martin Brennan
d128dc0e61
FEATURE: Add buildQuoteMarkdown for post toolbar (#24326)
This allows outlets for the post-text-selection-toolbar to
get just the raw markdown of the selected text for a quote,
rather than opening the composer.
2023-11-14 08:47:39 +10:00
Sérgio Saquetim
9919046c1c
DEV: Improve discovery components plugin-outlets compatibility with existing customizations
This commit changes some plugin outlets in `<Discovery::Layout>`, `<Discovery::Navigation>` and `Discovery::Topics` to improve compatibility with existing customization, simplifying the migration process to the new discovery routes.

In these components, the standard plugin outlets will receive by default at least the arguments: `category` and `tag`.

Furthermore, two new wrapping plugin outlets were added to enable the conversion of existing template overrides to the new pattern: `discovery-list-area` and `topic-list-bottom`. The new template overrides will receive a `model` argument containing the full model handled by the route.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2023-11-13 19:00:00 -03:00
Penar Musaraj
fcf0373b13
FIX: only show passkeys button in login modal (#24351)
We show the rest of the external login buttons in the create account
modal as well, but "login with a passkey" is not relevant in that context.
2023-11-13 16:06:46 -05:00
Joffrey JAFFEUX
a0769f6f43
UX: improves search of message creator
- correctly show unread indicator
- handles disabled user correctly
- do not show new-group-chat when filtering
2023-11-13 22:03:47 +01:00
Penar Musaraj
a814348176
DEV: Rename experimental_passkeys to enable_passkeys (#24349)
Also includes a migration.
2023-11-13 15:04:15 -05:00
David Taylor
e2e454c480
DEV: Update specs to avoid dependence on ember-cli build (#24347)
The `src` of js files is now dependent on the ember-cli/webpack build, so it's not a good thing to check in specs. In CI it passes because the ember-cli build is not run. But locally it would fail if you had a build in `app/assets/javascripts/discourse/dist`.

This commit updates the specs to check for the presence of a stable data attribute instead.
2023-11-13 14:26:43 -05:00
Joffrey JAFFEUX
1dad379412
DEV: allows to wrap wizard checkbox with outlet (#24334) 2023-11-13 14:02:14 -05:00
David Taylor
f395130429
FEATURE: Configure poll 'public' default via site setting (#24348)
Followup to 7e37e3e824
2023-11-13 18:54:21 +00:00
Kris
797da5870b
FEATURE: remove category badge style options, set bullet style as default (#24198) 2023-11-13 10:46:15 -05:00
Jordan Vidrine
70b72ee893
FIX: Hide chat message header with new argument (#24346) 2023-11-13 09:05:18 -06:00
Joffrey JAFFEUX
7f3f682f67
DEV: removes dead code (#24345) 2023-11-13 15:18:15 +01:00
Joffrey JAFFEUX
208491fa00
DEV: uses alphanumeric to avoid flakey specs (#24344)
Faker text with quotes or thread dots for example would cause issues in tests due to cooking.
2023-11-13 14:54:26 +01:00
Godfrey Chan
8444c865e9
DEV: remove slightly less trivial {{action}} usages (#24289)
Follow-up to #24278 that is slightly less trivial.

* Some were "trivial" usages that were missed in the previous PR because the same file that had at least one other non-trivial usage.
* These involve extra arguments or inheritance but I have checked that they seem correct.
2023-11-13 13:29:20 +01:00
dependabot[bot]
fcafc8872f
Build(deps): Bump ember-route-template in /app/assets/javascripts (#24338)
Bumps [ember-route-template](https://github.com/discourse/ember-route-template) from 1.0.1 to 1.0.2.
- [Commits](https://github.com/discourse/ember-route-template/commits)

---
updated-dependencies:
- dependency-name: ember-route-template
  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>
2023-11-13 11:13:19 +00:00
David Taylor
4982f95472
FIX: EmberCli cache clearance issue in production (#24343) 2023-11-13 10:34:06 +00:00
David Battersby
4b78254065
FIX: Post moved small action links should respect subfolder installs (#24336)
This change fixes an issue with small action links (when post is moved) to add the subfolder path to the url.
2023-11-13 11:06:25 +08:00
Jarek Radosz
1e1bb45b96
FIX: Add a missing service injection (#24341)
Fixes the reorder-categories modal.
2023-11-13 01:31:04 +01:00
Martin Brennan
ea0b37c1cf
FIX: Hide old min_trust_level_for_here_mention setting (#24342)
Followup to 67ac4c5616
2023-11-13 09:23:56 +10:00
David Taylor
7e37e3e824
UX: Create polls with public=true by default (#24332)
In the vast majority of cases, people want poll voters to be public. Previously, the checkbox for this was hidden behind the 'show advanced' settings in the poll builder UI.

This commit makes three changes to improve the experience:

1. Add `public=true|false` to poll markup (previously it would only be added when true

2. Bring the 'public' switch outside the 'show advanced' section for improved visibility

3. Change the default to 'true'
2023-11-13 09:07:51 +11:00
David Taylor
cdbe0f74e8
FIX: Load highlightjs bundle via CDN (#24335) 2023-11-10 22:19:06 +00:00
David Taylor
0878dde213
DEV: Modernise highlightjs loading (#24197)
- Remove vendored copy
- Update Rails implementation to look for language definitions in node_modules
- Use webpack-based dynamic import for hljs core
- Use browser-native dynamic import for site-specific language bundle (and fallback to webpack-based dynamic import in tests)
- Simplify markdown implementation to allow all languages into the `lang-{blah}` className
- Now that all languages are passed through, resolve aliases at runtime to avoid the need for the pre-built `highlightjs-aliases` index
2023-11-10 20:39:48 +00:00
Daniel Waterworth
e845138bc1
FIX: Updating presence status in readonly mode should fail gracefully (#24333) 2023-11-10 14:27:43 -06:00
Blake Erickson
bed4b3ee91
DEV: Remove .github/workflows/check-branches.yml (#24331)
We no longer need this workflow.
2023-11-10 08:49:38 -07:00
David Taylor
ac896755bb
DEV: Simplify ember-cli proxy strategy (#24242)
Previously, the app HTML served by the Ember-CLI proxy was generated based on a 'bootstrap json' payload generated by Rails. This inevitably leads to differences between the Rails HTML and the Ember-CLI HTML.

This commit overhauls our proxying strategy. Now, we totally ignore the ember-cli `index.html` file. Instead, we take the full HTML from Rails and surgically replace script URLs based on a `data-discourse-entrypoint` attribute. This should be faster (only one request to Rails), more robust, and less confusing for developers.
2023-11-10 11:16:06 +00:00
David Taylor
80208d0ab6
DEV: Support legacy precompiler paths in theme compiler (#24329)
This updates the behaviour to match ember-cli-htmlbars, and should take care of the handful of themes which were relying on runtime compilation in tests (see 4425e99bf9)
2023-11-10 10:37:50 +00:00