Commit Graph

688 Commits

Author SHA1 Message Date
Bianca Nenciu 6705c45156
FEATURE: Add reply_as_new_group_message composer action (#10168) 2020-07-07 18:30:48 +03:00
Dan Ungureanu 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
David Taylor 5284d41a8e
FEATURE: Optionally skip the create account popup for external auth 2020-07-06 10:18:57 +01:00
Ahmed Gagan 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
Jarek Radosz d04234c667 DEV: Fix typos in tests 2020-06-21 21:56:20 +02:00
Guo Xiang Tan 52580605d8 FIX: select-kit components not being hidden. 2020-06-17 09:39:51 +08:00
Jarek Radosz 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
Bianca Nenciu 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
Bianca Nenciu 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
Arpit Jalan 3094459cd9
FEATURE: multiple use invite links (#9813) 2020-06-09 20:49:32 +05:30
Dan Ungureanu ef3e3077d0
FIX: Staff users can bypass tag validation rule (#9924) 2020-06-02 16:11:25 +10:00
Joffrey JAFFEUX 40c4a8e3fc
DEV: skips/tweaks brittle tests (#9952) 2020-06-01 11:09:34 +02:00
Vinoth Kannan ce1491e830
UX: remove `in:unpinned` filter from advanced search page. (#9911) 2020-05-29 00:47:28 +05:30
Robin Ward 2033c3ec9c Revert "Revert "DEV: Import `MessageBus` from `message-bus-client` instead of globals""
This reverts commit b10e995d9d.
2020-05-28 08:42:36 -04:00
Sam Saffron ecc8e559ec
UX: remove edit PM button
Edit PM button leads to confusion and is uneeded
2020-05-28 15:15:27 +10:00
Jeff Wong ee60488e6a DEV: add acceptance test for encoded subcategory
follow-up on 63323bd7a8

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
Blake Erickson b10e995d9d Revert "DEV: Import `MessageBus` from `message-bus-client` instead of globals"
This reverts commit 9dddbcc00d.
2020-05-27 16:14:09 -06:00
Robin Ward 9dddbcc00d DEV: Import `MessageBus` from `message-bus-client` instead of globals 2020-05-27 16:42:42 -04:00
Robin Ward 0f71d38d3a Revert "DEV: Import `MessageBus` from `message-bus-client` instead of globals (#9902)"
This reverts commit d3bd482142.
2020-05-27 16:34:30 -04:00
Robin Ward d3bd482142
DEV: Import `MessageBus` from `message-bus-client` instead of globals (#9902) 2020-05-27 15:56:46 -04:00
Joffrey JAFFEUX 488f8d914a
DEV: skip bunch of failing tests (#9896) 2020-05-27 17:36:50 +02:00
Bianca Nenciu e31adef32d
FIX: Keep composer title and reply when switching to PM (#9851) 2020-05-25 15:46:02 +10:00
Michael Brown d9a02d1336
Revert "Revert "Merge branch 'master' of https://github.com/discourse/discourse""
This reverts commit 20780a1eee.

* SECURITY: re-adds accidentally reverted commit:
  03d26cd6: ensure embed_url contains valid http(s) uri
* when the merge commit e62a85cf was reverted, git chose the 2660c2e2 parent to land on
  instead of the 03d26cd6 parent (which contains security fixes)
2020-05-23 00:56:13 -04:00
Jeff Atwood 20780a1eee Revert "Merge branch 'master' of https://github.com/discourse/discourse"
This reverts commit e62a85cf6f, reversing
changes made to 2660c2e21d.
2020-05-22 20:25:56 -07:00
Mark VanLandingham 1a5bcf2a64
UX: Remove live theme previewing in favor of refresh (#9798) 2020-05-21 08:32:50 -05:00
Joffrey JAFFEUX 66960563ea
FIX: ensures category chooser is case insensitive (#9850) 2020-05-21 11:16:44 +02:00
Joffrey JAFFEUX 7b7c0ef52f
DEV: removes brittle test (#9826) 2020-05-19 10:02:40 +02:00
Joffrey JAFFEUX 303dece5ee
DEV: skip this test for now (#9818)
It seems to be involved in various random failures
2020-05-18 15:37:58 +02:00
Alan Guo Xiang Tan 7f07c513a7
FIX: Switching composer action does not refresh composer actions content (#9791) 2020-05-15 13:54:44 -04:00
Joffrey JAFFEUX 26c2fb4354
DEV: skip click track test (#9792)
This test might be responsible of random test failures, skip this for now to check if the random failure sill happens after dozens of tests.
2020-05-15 16:12:22 +02:00
Robin Ward aa2d040526 DEV: Update ESLint to remove I18n global
Also fixes missed imports in core.
2020-05-14 10:18:12 -04:00
Guo Xiang Tan d7e230c1b9
UX: Introduce composer-actions when editing a post. 2020-05-14 15:56:08 +08:00
Vinoth Kannan c014b93854
UX: don't disable "create account" button & display error message for required fields. (#9643) 2020-05-14 12:15:33 +05:30
Martin Brennan 50e63f5202 Skip later today test again :'( 2020-05-13 16:58:26 +10:00
Martin Brennan 0e09c5837f DEV: Try once more to make acceptance test fake timers work
In my original PR (#9647) I attempted to solve the problem of
using fake timers in acceptance tests by using the new sinon
clock.tickAsync methods. This way of doing things seems to be flawed,
however, as we are getting random spec timeouts starting with the
bookmark acceptance test where this was introduced.

I think I was going about things the wrong way. This commit introduces
a new function with callback (acceptanceUseFakeClock) that sets up the
fake timers using sinon.useFakeTimers with the shouldAdvanceTime option
set to true. This advances time at a normal rate of 20ms per tick, which
means that we are not freezing any time and existing setTimeout funcs.
should proceed as normal. Along with this the callback passed will
run clock.reset() at the end to make sure all the timers are cleaned
up correctly.

There is an optional third parameter after the callback, which is the
timezone. If the user is logged in for the acceptance test then their
timezone is used, otherwise we default to America/Denver.

Usage is (inside an acceptance test):

```
test("Name of the test", async assert => {
  // first parameter is time to start fake clock at
  await acceptanceUseFakeClock("2020-05-04T13:00:00", async () => {
    // test code goes here e.g. await visit("/url");
  });
});
```
2020-05-13 15:16:07 +10:00
Joffrey JAFFEUX e73e9aa7f2
DEV: skip failing test (#9755) 2020-05-12 18:32:12 +02:00
Jarek Radosz fe2d5da623 DEV: Remove obsolete commented out tests
Commented out in 2016 in ff74bd7e28
2020-05-11 18:19:21 +02:00
Jarek Radosz 7d3c4a5f13
FIX: Show category name in badge preview on edit (#9726) 2020-05-11 17:05:40 +02:00
Martin Brennan 12d4d51d81
FIX: CurrentUser now must be passed to resolveTimezone and user card local time issues (#9734)
* This is to prevent user's timezones being changed accidentally
e.g. by admin looking at a user
* This problem only occurred via the user card, however the user card
was still calling userTimezone even if the setting to display user
time in card was disabled
2020-05-11 11:01:47 +10:00
Jarek Radosz 8f5a651e51 DEV: No need for double `await` 2020-05-10 19:54:07 +02:00
Bianca Nenciu 8149bfbaf1
FEATURE: Filter settings by plugin (#9692) 2020-05-10 14:07:45 +03:00
Robin Ward f9608c0af5 DEV: Remove INLINE_ONEBOX_* constants
There were two constants here, `INLINE_ONEBOX_LOADING_CSS_CLASS` and
`INLINE_ONEBOX_CSS_CLASS` that were both longer than the strings they
were DRYing up: `inline-onebox-loading` and `inline-onebox`

I normally appreciate constants, but in this case it meant that we had
a lot of JS imports resulting in many more lines of code (and CPU cycles
spent figuring them out.)

It also meant we had an `.erb` file and had to invoke Ruby to create the
JS file, which meant the app was harder to port to Ember CLI.

I removed the constants. It's less DRY but faster and simpler, and
arguably the loss of DRYness is not significant as you can still search
for the `inline-onebox-loading` and `inline-onebox` strings easily if
you are refactoring.
2020-05-07 16:14:38 -04:00
Martin Brennan 6fb0f36ce1
FEATURE: Optionally delete bookmark when reminder sent (#9637)
We now show an options gear icon next to the bookmark name.

When expanded we show the "delete bookmark when reminder sent" option. The value of this checkbox is saved in local storage for the user.

If this is ticked, when a reminder is sent for the bookmark the bookmark itself is deleted. This is so people can use the reminder functionality by itself.

Also remove the blue alert reminder section from the "Edit Bookmark" modal as it just added clutter, because the user can already see they had a reminder set:

Adds a default false boolean column `delete_when_reminder_sent` to bookmarks.
2020-05-07 13:37:39 +10:00
Martin Brennan 7e303f9320
DEV: Upgrade sinon and fix time based bookmark tests (#9647)
Update sinon.js to 9.0.2 to access async fake timers https://sinonjs.org/releases/v9.0.2/fake-timers/ which can then be used with acceptance tests (previously useFakeTimers didn't work with await, e.g. for visit).

Fix the bookmark acceptance test that was time based to use these new fake timers.

Add a fakeTime function that uses moment and the provided date string + timezone to freeze time using useFakeTimers and return a clock.

Add a timeStep function that accepts a clock from fakeTime and a function to run. Once the function is run we call clock.tickAsync(1000) to progress the fake clock forward 1s to progress promises/callbacks.
2020-05-07 09:10:32 +10:00
Robin Ward 01929e3505 DEV: Move `preload-store` to `discourse/lib/preload-store`
It's only used inside Discourse so it needn't be its own module
2020-05-06 15:28:06 -04:00
Robin Ward 612284cef3
DEV: Remove `Discourse.RAW_TEMPLATES` (#9630)
We were sharing `Discourse` both as an application object and a
namespace which complicated things for Ember CLI. This patch
moves raw templates into `__DISCOURSE_RAW_TEMPLATES` and adds
a couple helper methods to create/remove them.
2020-05-05 12:15:03 -04:00
David Taylor 04e4932307
DEV: Skip time-dependent bookmark test 2020-05-05 09:50:50 +01:00
Martin Brennan 5cf6984a1a
FIX: Pre-select Later Today on bookmark edit if the time is the same (#9636)
If the user chooses "Later Today" as the reminder for a bookmark, then edits that bookmark, we should pre-select "Later Today" if that time has not changed (e.g. later is still 6pm). We do this to avoid confusion instead of opening the custom date + time section.
2020-05-05 16:28:31 +10:00
Martin Brennan 6aa9014509
UX: Bookmark removal tweaks (#9635)
* Do not show confirmation modal if deleting bookmark from list unless the bookmark has a reminder
* Remove the deleted bookmark from the in-memory array for the user list so a full reload of the list is not needed and scrolling is maintained
2020-05-05 14:56:04 +10:00
Joffrey JAFFEUX a2c85f0845
DEV: use the existing parsePostData function (#9629) 2020-05-04 18:35:04 +02:00