Commit Graph

2443 Commits

Author SHA1 Message Date
d09f283e91 PERF: Move highlightjs to a background worker, and add result cache (#10191)
Syntax highlighting is a CPU-intensive process which we run a lot while rendering posts and while using the composer preview. Moving it to a background worker releases the main thread to the browser, which makes the UX much smoother.
2020-07-15 12:48:07 +01:00
052178efa7 DEV: Fix fixtures (#10241) 2020-07-15 11:46:43 +03:00
0058a15266 FIX: prevent redirect when image scale btn is inside a link.
Currently in composer preview, if the image scale buttons are inside a `<a>` link then it redirects to the `href` location after the image scaling task.
2020-07-15 09:34:54 +05:30
06073fe8c6 FEATURE: Allow group moderators to close/archive topics
* FEATURE: Allow group moderators to close/archive topics
2020-07-14 12:36:19 -04:00
f4f3e8c401 FIX: Various improvements to bookmark modal UI (#10225)
* Do not autofocus name input on mobile
* Improve code for formatted reminder type times to not be computed, so the modal times update correctly
* Change wording of "Next Monday" to "Monday" for all days except when today is Monday
2020-07-14 14:02:13 +10:00
c02e358146 FIX: Remove social sharing icons from private contexts (#10213) 2020-07-13 14:35:39 -04:00
cf02c518b9 DEV: Merge category and tag hashtags code paths (#10216)
Category and tag hashtags used to be handled differently even though
most of the code was very similar. This design was the root cause of
multiple issues related to hashtags.

This commit reduces the number of requests (just one and debounced
better), removes the use of CSS classes which marked resolved hashtags,
simplifies a lot of the code as there is a single source of truth and
previous race condition fixes are now useless.

It also includes a very minor security fix which let unauthorized users
to guess hidden tags.
2020-07-13 19:13:17 +03:00
eb73048b0f DEV: Allow displaying both title and panels in modals (#10220) 2020-07-13 12:43:06 +02:00
942cc9b57a DEV: Add rawTitle property support to modal-tab (#10221)
```js
const panels = [
  { id: "test1", rawTitle: "Test 1" },
  { id: "test2", rawTitle: "Test 2" }
];

showModal("a-modal", { panels }));
```
2020-07-13 01:26:45 +02:00
706f1a6294 DEV: Remove text-ellipsis component and use CSS line-clamp instead (#10196) 2020-07-09 20:51:43 -04:00
5b276af921 Remove Discourse.SiteSettings from tests (#10193)
* Remove unused Discourse.SiteSettings

* Remove `Discourse.SiteSettings` from many tests

* REFACTOR: `lib:formatter` was using a lot of leaky state

* Remove more `Discourse.SiteSettings` from tests

* More SiteSettings removed from tests
2020-07-09 15:54:53 -04:00
10384bcdf4 FIX: Flaky tests
Locally I was getting a lot of failures from discourse-encrypt due to
leaky state in composer actions. This fixes it.
2020-07-09 12:58:57 -04:00
32ee9fae40 FIX: Short URL resolution in cook-text (#10200)
Regressed in 3b51e05de2aeb0cff547befcfde442f5ceeb329d. Thanks to @romanrizzi for reporting!
2020-07-09 14:39:13 +02:00
66257ca8b6 FEATURE: Add "smallest" option to user text size preferences 2020-07-07 13:08:19 -04:00
4a90464619 FIX: Do not highlight large code blocks (#10125) 2020-07-07 18:51:19 +03:00
6705c45156 FEATURE: Add reply_as_new_group_message composer action (#10168) 2020-07-07 18:30:48 +03:00
556f7dc9c0 FIX: Fix race condition when resolving tag and category hashtags (#10153)
* FIX: Fix race condition when resolving tag and category hashtags

If the category hashtags were resolved first and then tag hashtags, then
the tags would overwrite the categories. Similarly, if the category
hashtags were resolved last it would overwrite even hashtags which ended
with '::tag'.

* DEV: Add test

* DEV: Fix test
2020-07-07 10:20:51 +10:00
194c962124 FIX: Do not rerender widget-dropdown on all clicks (#10100)
Because of how the dropdown was structured, as long it was in the DOM, all clicks outside the widget would rerender it.

This commit introduces `widget-dropdown-body` that handles the `clickOutside` callback and is rendered conditionally, so it won't get called when the dropdown is closed.
2020-07-06 17:04:16 +02:00
5284d41a8e FEATURE: Optionally skip the create account popup for external auth 2020-07-06 10:18:57 +01:00
04d7693355 FIX: Filter read/unread notifications on the server side (#10152)
https://meta.discourse.org/t/notifications-unread-only-filter/37621/32
2020-07-02 11:06:00 +01:00
0e2f7ecfd0 DEV: Make component-test afterEach async aware (#10099)
Before this fix, if a test case was async, `afterEach` callback would be executed immediately, without waiting for the test to finish. 😬
2020-06-24 16:03:38 +10:00
d04234c667 DEV: Fix typos in tests 2020-06-21 21:56:20 +02:00
4a2871f7f6 FEATURE: Don't display muted/ignored users under "who liked" (#10084)
* FEATURE: Don't display muted/ignored users under "who liked"

Previously, if you clicked on the heart icon below a post
it would show you the avatar for a user even if you ignored or muted
them.

This commit will instead display a (?) icon. The count of likes will
remain correct, but you needn't be reminded of the person you
preferred not to see.

* Use a circle instead of (?) for unknown user
2020-06-19 10:44:21 -04:00
7d289a4f3e UX: Style video elements, show descriptions (#10040)
It's a stop gap – ideally we would generate a thumbnail for uploaded videos. For now, a bit of intentionality in the style and a pinch of context should do.
2020-06-17 12:38:00 +02:00
a859d507e7 FIX: Prevent producing "undefined" strings (#10042)
Fixes a bug in search-menu-results (type: "group"), where:

```javascript
const fullName = escapeExpression(group.fullName);
const name = escapeExpression(group.name);
const groupNames = [h("span.name", fullName || name)];
```

`groupNames` could end up having value "undefined" if a group doesn't have a `fullName`.
2020-06-17 12:37:06 +02:00
52580605d8 FIX: select-kit components not being hidden. 2020-06-17 09:39:51 +08:00
7f8c5cf70b FIX: Allow plugins to provide test directories with transpiled .js 2020-06-16 14:31:01 -04:00
298393a5bc FIX: Keep onebox styling in edit history 2020-06-15 15:23:14 -04:00
1303e89a72 DEV: Fix a composer state leak in tests
This is the one that made discourse-encrypt tests (and all subsequent tests) hang.
2020-06-15 01:44:41 +02:00
ff6811ceb8 Allow multiple groups which can vote when creating a poll (#10015)
* FEATURE: Allow multiple groups which can vote when creating a poll

* DEV: Fix select-kit deprecations

* DEV: Fix lint
2020-06-12 14:52:32 +03:00
60196cc192 FIX: Hide bootbox after a negative answer (#10028)
Starting to reply and then editing a post was not possible because of a
bootbox which kept showing up.
2020-06-12 13:48:45 +02:00
dd85d44dda FIX: Show tag count for existing tags (#9892)
* FIX: Show tag count for existing tags

* Add test
2020-06-11 14:13:48 +03:00
a26b490047 FIX: present correct new/unread counts when filtered by tag
Previously we would incorrectly ignore tags.

This ensures tracking state is properly shipped to client if
show_filter_by_tag is enabled.
2020-06-11 16:47:57 +10:00
3094459cd9 FEATURE: multiple use invite links (#9813) 2020-06-09 20:49:32 +05:30
293467a37a REFACTOR: Remove jquery usage from resolveAllShortUrls, and fix debounce
- This function now requires an explicit scope. It will never run on the entire document.

- Previously debounce was being used with an anonymous function, which means it was having no effect.
2020-06-05 17:15:14 +01:00
2d880b42a3 UX: Add simple-list setting type (#9970) 2020-06-04 10:44:54 -04:00
ae52f5eaf5 DEV: removes brittle test (#9977) 2020-06-04 09:21:21 +02:00
ba00cc8ec4 DEV: Move Discourse.getURL and related functions to a module (#9966)
* DEV: Move `Discourse.getURL` and related functions to a module

* DEV: Remove `Discourse.getURL` and `Discourse.getURLWithCDN`

* FIX: `get-url` is required for server side code

* DEV: Deprecate `BaseUri` too.
2020-06-03 12:45:26 -04:00
0cf297725f DEV: Use consistent interpolation key format in translations
From now on client strings can easily be reused on the server and you don’t have to think about choosing the right format anymore.
2020-06-02 19:05:10 +02:00
ef3e3077d0 FIX: Staff users can bypass tag validation rule (#9924) 2020-06-02 16:11:25 +10:00
40c4a8e3fc DEV: skips/tweaks brittle tests (#9952) 2020-06-01 11:09:34 +02:00
82de9c5308 DEV: add countTags to topic tracking state
This introduces a new core API to get counts per tag from topic
tracking state

This API will only be useful if a plugin enable tags in topic
tracking state using

`TopicTrackingState.include_tags_in_report = true`
2020-06-01 17:05:24 +10:00
2b2434b82d Start Discourse in an initializer (#9930)
* DEV: To be pedantic, there is more than EMBER in there now

* DEV: Use less globals. Have `Discourse` start in an initializer

* DEV: Remove another global
2020-05-29 14:37:02 -04:00
7635c18a14 DEV: ensures highlightjs is correctly tested (#9923) 2020-05-29 13:05:44 +02:00
ce1491e830 UX: remove in:unpinned filter from advanced search page. (#9911) 2020-05-29 00:47:28 +05:30
2033c3ec9c Revert "Revert "DEV: Import MessageBus from message-bus-client instead of globals""
This reverts commit b10e995d9d8cf92adffb810f68bce7c3f75dabf0.
2020-05-28 08:42:36 -04:00
0854785175 FIX: allows to define label/title properties for display instead of name
Usage:

```
const content = [{foo: "FOO", bar: "BAR", value: 1, name: "foo-bar"}];

{{combo-box
  content=content
  value=value
  labelProperty="foo"
  titleProperty="bar"
}}
```
2020-05-28 08:30:31 +02:00
ecc8e559ec UX: remove edit PM button
Edit PM button leads to confusion and is uneeded
2020-05-28 15:15:27 +10:00
ee60488e6a DEV: add acceptance test for encoded subcategory
follow-up on 63323bd7a8ff2128abf10c675bcad225dab13cd2

Add acceptance tests on ember routing to ensure that ember can route
to a sub-category via slug-only.

63323bd7a8
2020-05-27 16:59:49 -07:00
b10e995d9d Revert "DEV: Import MessageBus from message-bus-client instead of globals"
This reverts commit 9dddbcc00dd1b1f582f31eed756f672e8a56f9f5.
2020-05-27 16:14:09 -06:00