Commit Graph

2194 Commits

Author SHA1 Message Date
Robin Ward 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
Joffrey JAFFEUX 7635c18a14
DEV: ensures highlightjs is correctly tested (#9923) 2020-05-29 13:05:44 +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
Joffrey JAFFEUX 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
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
Penar Musaraj b1c726be0d
Remove support for FontAwesome 4.7 icon names (#9871) 2020-05-26 14:53:32 -04:00
Joffrey JAFFEUX 8825395bdc
DEV: allows to decorate username selector (#9869)
Usage:

```
api.addUsernameSelectorDecorator(username => {
  return iconHTML("calendar-alt");
});
```
2020-05-25 19:09:55 +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
Mark VanLandingham bd57ae83f1
DEV: Guardian for hiding about stats (#9841) 2020-05-20 10:26:20 -05: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
Joffrey JAFFEUX e81a4048e3
REFACTOR: s/focusAfterOnchange/focusAfterOnChange (#9801) 2020-05-16 11:20:37 +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 b07f1bfd93
FIX: displays a title on sk header if no selected name (#9794)
none has to be defined.
2020-05-15 17:36:00 +02: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
Blake Erickson 1a2b9435b0
DEV: Standardize table sorting verbiage (#9757)
* DEV: Standardize table sorting verbiage

This commit creates a common component that tables can use to make their
headers sortable. This commit also standardizes on using `desc` as the
default and passing in the `asc=true` flag to adjust the sorting
direction.

* Add deprecation warnings

Adds deprecation warnings if using previous params and maintains
backwards compatibility. Set the default sort value for group members to
be asc.

* switch group requests to use common table-header-toggle

* update fixture
2020-05-14 20:10:59 -06: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
Joffrey JAFFEUX 42e5a5bb39
DEV: do not append/prepend if callback returns nothing (#9778) 2020-05-14 14:38:03 +02: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
Robin Ward eab560fe2a
DEV: import I18n instead of global usage (#9768)
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
Co-authored-by: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2020-05-13 16:23:41 -04:00
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
Martin Brennan a64cf265fd
FIX: Change /bookmarks URL back to topic list and add bookmark poster avatars (#9759)
* Changes the /bookmarks URL to show the original "topics filtered by bookmark" list instead of redirecting to user activity bookmarks (see https://meta.discourse.org/t/domain-com-bookmarks-is-showing-domain-com-u-user-activity-bookmarks-with-reminders/149252/12)
* Add the user avatar for the user who made the post that is bookmarked
2020-05-13 14:03:24 +10:00
Joffrey JAFFEUX e73e9aa7f2
DEV: skip failing test (#9755) 2020-05-12 18:32:12 +02:00
Joffrey JAFFEUX 286b4e535e
DEV: allows buttons to define aria-label (#9747) 2020-05-11 22:09:44 +02:00
jjaffeux 0deb05740f Revert "DEV: allows to define an ariaLabel on d-button (#9716)"
This reverts commit 7a95dd4841.
2020-05-11 19:19:13 +02:00
Joffrey JAFFEUX 7a95dd4841
DEV: allows to define an ariaLabel on d-button (#9716)
* DEV: allows to define an ariaLabel on d-button

This topic also adds this function to topic-footer-buttons, simplifies the whole logic of titile/label/arialabel in d-button and adds tests for these properties.

* typo
2020-05-11 18:42:51 +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
Joffrey JAFFEUX 9bf11a8c68
DEV: allows select-kit to prevent autofocus of header after onChange (#9718) 2020-05-09 10:26:23 +02:00
Joffrey JAFFEUX a40649409e
DEV: calling preload-store is deprecated (#9703) 2020-05-08 17:04:28 +02: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 7acb25db12 FIX: preload-store was moved 2020-05-06 15:55:52 -04:00