Commit Graph

11929 Commits

Author SHA1 Message Date
Robin Ward
b37b238382 FIX: Reviewable score JS was in the wrong folder 2020-04-16 15:09:08 -04:00
Kane York
0fccea3762
FIX: Keyboard navigation fixes in setup wizard (#9413)
- Delete a positive tabindex from a reused component
 - Copy :hover styles to :focus
 - Replace an 'outline: 0' rule with a TODO for a custom :focus style

Discovered while fixing the no-positive-tabindex lint.
2020-04-16 12:01:11 -07:00
Kane York
424a76145d DEV: Fix no-implicit-this for all user-* components 2020-04-16 10:12:43 -07:00
Joffrey JAFFEUX
1168d5c70a
FIX: ensures keyboard event is not propagated when using c shortcut (#9441) 2020-04-16 15:45:18 +02:00
Joffrey JAFFEUX
5e24436454
DEV: attempts to fix various leaks (#9428)
* DEV: attempts to fix various leaks

* scheduleOnce doesnt work with anon function

* removes the I18n change
2020-04-16 07:58:04 +02:00
Joffrey JAFFEUX
ca06991ee5
FIX: makes topic-list-item decorator work on mobile (#9433) 2020-04-16 07:57:32 +02:00
Martin Brennan
d7f744490a
FEATURE: Decorate topic-level bookmark button with reminder time (#9426)
* Show the correct bookmark with clock icon when topic-level bookmark reminder time is set and show the time of the reminder in the title on hover.
* Add a new bookmark lib and reminder time formatting function to show time with today/tomorrow shorthand for readability. E.g. tomorrow at 8:00am instead of Apr 16 2020 at 8:00am. This only applies to today + tomorrow, future dates are still treated the same.
2020-04-16 09:20:44 +10:00
Joffrey JAFFEUX
5a8a844e4e
FIX: attempts to listen more reliably to scopedCategoryId changes (#9431) 2020-04-15 19:59:27 +02:00
Joffrey JAFFEUX
8c58319992
DEV: allows to decorate topic header class (#9427) 2020-04-15 12:41:01 +02:00
Vinoth Kannan
4a2c4232c5
FIX: remove word boundary regex (\b) for search result highlights. (#9338) 2020-04-15 11:11:00 +05:30
Kane York
c670a34013 DEV: Fix and enable the 'require-button-type' lint 2020-04-14 18:32:16 -07:00
Kane York
5a5685766a DEV: Fix all 'require-valid-alt-text' lints except in reused compoments
Three violations require parameters from the caller to generate valid alt text.
2020-04-14 17:21:20 -07:00
Joffrey JAFFEUX
6023ea1979
DEV: pass widget back when cleaning up stream (#9422) 2020-04-14 18:45:40 +02:00
Joffrey JAFFEUX
d9db0e6691
FIX: allows custom groups updates to be reflected without recompilation (#9421) 2020-04-14 16:43:57 +02:00
Martin Brennan
2aaf5cb2b8
FEATURE: Extend bookmark cutoff time for "Later Today" to 5pm (#9419)
* Extend cutoff time for "Later Today" to 5pm

* users can now use the Later Today option up until 5PM
* the time for later today maxes out at 6pm, so any time
  it is used after 3pm it is maxed to 6pm
* round to hour instead of half-hour for Later Today as well

* Rounding time bugfix
2020-04-14 17:28:51 +10:00
Joffrey JAFFEUX
c4644c61d9
DEV: enforces double quotes ember-template-lint (#9416) 2020-04-14 08:18:49 +02:00
Martin Brennan
2d122f0393
FIX: Toggle bookmark for topic was not working after cancelling the modal (#9418)
* When bookmarking the topic, if the user cancelled the bookmark modal the bookmark topic button no longer worked because we did not reset the "bookmarked" property
* Prefill the custom reminder time to 8:00am
2020-04-14 15:17:24 +10:00
Robin Ward
b6b92a562c
FEATURE: New site setting embed_unlisted (#9391)
If enabled, posts imported to discourse via embeddings will default to
unlisted until they receive a reply.
2020-04-13 15:17:02 -04:00
Joffrey JAFFEUX
b66b277dc4
DEV: enforces block-indentation of ember-template-lint rules (#9408) 2020-04-13 17:17:20 +02:00
Vinoth Kannan
0cef409d49 UX: strip base64 image URLs when converting HTML to markdown. 2020-04-12 21:05:23 +05:30
Arpit Jalan
600cb2130d FIX: show today's date on /users page period chooser 2020-04-11 06:34:13 +05:30
Joffrey JAFFEUX
d984848aa9
FIX: ensures toolbar is updated on composer action change (#9402) 2020-04-10 22:39:19 +02:00
Justin DiRose
5471c065cd
FIX: Missing timezone guess on email session login (#9404)
Timezone is guessed by moment.js if unset upon a normal login, but was not when
logging in via an email link. This adds logic to update a guessed
timezone upon email login so timezones don't end up blank.
2020-04-10 13:19:39 -05:00
Joffrey JAFFEUX
058506bb77
DEV: prevents toolbar callbacks to leak between tests (#9403) 2020-04-10 16:47:27 +02:00
Joffrey JAFFEUX
3e10d4133d
FIX: adds values/entries/NodeList.forEach/before polyfills for iOS 9.3 (#9401) 2020-04-10 13:52:33 +02:00
Joffrey JAFFEUX
3cac60f07c
DEV: enforce no-quoteless-attributes ember-template-lint (#9400) 2020-04-09 22:00:44 +02:00
Joffrey JAFFEUX
d891665ac5
DEV: allows groups-selector to have an onChangeCallback (#9399) 2020-04-09 21:57:06 +02:00
Jeff Wong
5ccbc5f3ee
FEATURE: add after-reviewable-post-user plugin outlet (#9397)
FEATURE: add after-reviewable-post-user plugin outlet

Add a plugin outlet after reviewable post user

Add a basic user serializer that includes custom fields.
Allows review queue serializer to include custom fields for its users
2020-04-09 11:32:39 -07:00
Roman Rizzi
64ec771dc6
REFACTOR: Resize controls (#9393) 2020-04-09 12:13:15 -03:00
Dan Ungureanu
1cd8c6ce4c
FIX: Detect more unsupported browsers 2020-04-09 11:47:59 +03:00
Martin Brennan
befaf39aca
DEV: Refactor and test plugin addKeyboardShortcut (#9381)
Refactor plugin-api `addKeyboardShortcut` to point to `KeyboardShortcuts`.
* Do not add shortcuts to the default object directly.
* Create an addShortcut function in keyboard-shortcuts to add shortcuts safely and call to bindKey to be able to use opts.
* Refactor controllers/bookmark.js to use new addShortcut func and emove unnecessary addBindings.
* No longer export keyboard shortcut bindings, rename to DEFAULT_BINDINGS and remove export, these do not need to be accessed by anything else.
2020-04-09 10:30:26 +10:00
Martin Brennan
452d0c868f
FIX: Ensure first post is loaded before trying to bookmark topic (#9382)
Load first post if not loaded when trying to bookmark topic

* if the first post was not loaded we could not bookmark it because
  now we call the toggleBookmarkReminder function on an actual post
  to open the modal window
* add a firstPost function to the topic model to get the first post
  from the stream if it is loaded and if not do a GET request to load
  it
* use the firstPost promise when bookmarking topic
2020-04-09 09:42:03 +10:00
Penar Musaraj
c3593dd9e2
DEV: Replace jquery.putCursorAtEnd (#9390) 2020-04-08 16:13:02 -04:00
Kane York
abdc10ae70 FIX: Labels for modal close and dismiss-error buttons 2020-04-08 11:56:29 -07:00
Dan Ungureanu
73d71e3fee
FEATURE: Show noscript view to unsupported browsers (#9373) 2020-04-08 20:24:18 +03:00
Robin Ward
e1f8014acd
FEATURE: Support for publishing topics as pages (#9364)
If the feature is enabled, staff members can construct a URL and publish a
topic for others to browse without the regular Discourse chrome.

This is useful if you want to use Discourse like a CMS and publish
topics as articles, which can then be embedded into other systems.
2020-04-08 12:52:36 -04:00
Jarek Radosz
ae1a391377
FIX: Quoting posts (#9378)
Fixes to the quote feature. Most important changes listed below:

* FIX: Correctly attribute quotes when using Reply button
* FIX: Correctly attribute quotes when using replyAsNewTopic
* FIX: Allow quoting a quote
* FIX: Correctly mark quotes as "full"
* FIX: Don't try to create a quote if it's empty
* DEV: Remove an obsolete method `loadQuote`
  It isn't used in core anymore, the only use in core has been removed over 4 years ago in 3251bcb. It's not used in any plugins in all-the-plugins and all references to it on GitHub are from outdated forks (https://github.com/search?q=%22Post.loadQuote%22&type=Code)
2020-04-08 16:28:23 +02:00
Arpit Jalan
236833ed5d FIX: redirect /my/*path to /login-preferences on client side 2020-04-08 07:10:58 +05:30
Kane York
ed95a6005b FEATURE: screenreader landmarks for main, suggested topics
In order to avoid a boatload of attributeBindings, I moved the root
element of the suggested-topics component into the template. Also,
autoformat their hbs files.

Testing info: https://www.scottohara.me/blog/2018/03/03/landmarks.html#using-screen-readers-to-navigate-landmarks

Additionally, flag modals with aria-modal=true to avoid the screenreader
accidentally escaping the modal. There's no need to ever toggle the
attribute to false, because we display:none the modal root when it's
closed.
2020-04-07 15:42:03 -07:00
Neil Lalonde
e8fad7a69e
DEV: changes so plugins can customize invites UI (#9365)
* DEV: changes so plugins can customize invites UI

Co-Authored-By: Robin Ward <robin.ward@gmail.com>
2020-04-07 11:58:49 -04:00
Robin Ward
4f42bb1fd2
DEV: Support for onChange on {{text-field}} (#9362)
* DEV: Support for `onChange` on `{{text-field}}`

This will automatically be debounced and only fired when the value
changes.

There is also `onChangeImmediate` which is not debounced in case you
need that, but in almost all cases when observing text in an element you
should debounce.

* Add cancel for timer
2020-04-07 11:41:21 -04:00
Martin Brennan
34df9f7908 Revert DEFAULT_SHORTCUTS plugin API-breaking change
* this was done in previous commit
93c38cc175,
  unaware that addKeyboardShortcut in plugin-api.js imports
  bindings from KeyboardShortcuts
2020-04-07 16:27:13 +10:00
Martin Brennan
42c2678d8f
FIX: Show topic level bookmark with reminder modal (#9336)
* When using the topic-level bookmark button or shortcut, we now show the bookmark with reminder modal for consistency.
* When hovering on a bookmark reminder notification where the bookmark has a name, show the name of the bookmark on hover.
2020-04-07 15:43:00 +10:00
Martin Brennan
7e42963590
DEV: Define keyboard shortcuts help onShow, and un-define onClose (#9355)
This is so we don't have a big hash just sitting in the controller definition, it is only created when it is needed. From comment here #9318 (comment)
2020-04-07 14:40:03 +10:00
Martin Brennan
93c38cc175
FEATURE: Bookmark keyboard shortcuts (#9318)
Adds keyboard bindings and associated help menu for selecting reminder type in bookmark modal, and pressing Enter to save.

Introduce the following APIs for `KeyboardShortcuts`:

* `pause` - Uses the provided array of combinations and unbinds them using `Mousetrap`.
* `unpause` - Uses the provided combinations and rebinds them to their default shortcuts listed in `KeyboardShortcuts`.
* `addBindings` - Adds the array of keyboard shortcut bindings and calls the provided callback when a binding is fired with Mousetrap.
* `unbind` - Takes an object literal of a binding map and unbinds all of them e.g. `{ enter: { handler: saveAndClose" } };`
2020-04-07 14:03:15 +10:00
Mark VanLandingham
58bec3b200
DEV: Option for adding an icon in wizard-field-checkboxes component (#9363) 2020-04-06 14:00:55 -05:00
Joffrey JAFFEUX
028915e4b9
FIX: revert inadvertently removed css class (#9360) 2020-04-06 19:22:29 +02:00
Jordan Vidrine
30983021e2
No category styles (#9359)
* UI: "No category styles" apply to category boxes
2020-04-06 12:02:33 -05:00
Vinoth Kannan
fd39c85c1a FIX: add category hashtags support for sub-sub categories.
Hashtags will include last two levels only (ex: "parent:child").
2020-04-06 20:43:38 +05:30
Joffrey JAFFEUX
a947b7b839
FIX: prevents registering multiple topic-notifications-button:changed (#9356)
A large topic page will always have the bottom tracking button, and will also have the timeline, meaning we already had 2 tracking events.

But it gets even worse when you know that the timeline button is a component connector which will trigger `didInsertElement` very frequently, meaning we were constantly adding more and more appEvents handlers.
2020-04-06 15:06:26 +02:00