Commit Graph

14974 Commits

Author SHA1 Message Date
Kris
dcb40a92c7 Add discovery-below outlet to tag pages too 2020-04-27 22:49:11 -04:00
Kris
c679c8008c Remove additional wrapper, follow-up to d516a88 2020-04-27 22:13:31 -04:00
Penar Musaraj
a70ca3a72a UX: Better spacing for composer toggle buttons on mobile 2020-04-27 22:04:29 -04:00
Penar Musaraj
b1d30d7f05 FIX: keep scroll position when minimizing composer in iOS 2020-04-27 22:03:56 -04:00
Joffrey JAFFEUX
ad978b93ab
FIX: Correctly shows no bookmark message (#9548) 2020-04-28 11:19:35 +10:00
Joffrey JAFFEUX
2c6d6dfd05
FIX: Improves bookmark shortcut reliability and other minor issues (#9547)
This commit reworks slightly the `toggleBookmark` and `toggleBookmarkTopic` functions.

- Pressing [f] (toggleBookmarkTopic)
  - a topic list item is selected, we attempt to toggle the related topic
  - a post is selected, we bookmark the current topic
  - nothing is selected, if there's a currentTopic we bookmark it

- Pressing [b] (toggleBookmark)
  - a post is selected, we bookmark it
  - a topic list item is selected, we attempt to toggle the related topic
  - nothing is selected, if there's a currentTopic we bookmark it

Note this, commit also reduces jquery usage, a bug where the [f] shortcut was propagated to the modal input, and fixes bug when bookmarking a topic list item on the front page and the firstPost couldn't be found.
2020-04-28 10:32:59 +10:00
Martin Brennan
bb4e965a66
FEATURE: Optionally show local time for user in card (#9527)
This adds a site setting (default off) to optionally show a user's local time and timezone in their user card. For example, I live in Brisbane, and if at 3:30PM my time I were to open a user who lives in California's card I would see 22:30 (PST).
2020-04-28 10:13:59 +10:00
Robin Ward
056327c0c9
DEV: Move discourse.js to app/app.js (#9545)
This is another thing to get our application in line with what Ember CLI
expects.
2020-04-27 13:28:10 -04:00
Sam Saffron
1f6eaf26a1
Revert "UX: replace closed topic icon with discourse-no-entry"
This reverts commit 040b8c00a4.

We decided to keep status quo for now
2020-04-25 13:12:56 +10:00
Kris
d516a88b4c DEV: add tag name class to body of tag pages 2020-04-24 22:27:25 -04:00
Kris
67429335d5 Remove SASS spacing function 2020-04-24 19:32:02 -04:00
Kris
040b8c00a4 UX: replace closed topic icon with discourse-no-entry 2020-04-24 17:31:34 -04:00
Jeff Wong
e638d43f0a
FEATURE: dismiss first notification on click anywhere (#9525)
FEATURE: dismiss first notification on click anywhere

Quicker jumpstart for those already familiar with the platform:

Allow dismissal of first notification mask from any click.
On the dismissal click, we also need to send a "yes I saw it" confirmation
by grabbing a batch of notifications. This prevents the dialog from appearing
again on refresh, or other browsers and ensures we only see it once.
2020-04-24 13:27:54 -07:00
Penar Musaraj
5a3350cd76 FIX: Do not override all title elements with page title
This is redudant too, setting document.title is sufficient.
2020-04-24 10:16:05 -04:00
Penar Musaraj
b45142ef79
FIX: reenable draft check modal and fix focus on iOS for PMs 2020-04-24 09:35:19 -04:00
Joffrey JAFFEUX
d83f39be73
DEV: replaces jquery scrollTop by vanilla js code (#9543) 2020-04-24 12:45:47 +02:00
David Taylor
0616826841
DEV: Add jquery-free decorateCookedElement function to plugin api (#9534)
This is a replacement for `decorateCooked` which will work without jquery.

A backwards compatibility layer is provided for existing plugins/themes which are currently using `decorateCooked`
2020-04-24 09:47:33 +01:00
Joffrey JAFFEUX
90d6816d19
FIX: removes inheriting as it's too random and can be very hard to track (#9542) 2020-04-24 10:08:22 +02:00
Kris
9f52997be1 UX: Let's try X for the closed topic icon instead of a \ 2020-04-23 17:23:25 -04:00
Joffrey JAFFEUX
b19d50f355
FIX: site settings dropdown can be 440px width (#9539) 2020-04-23 23:12:58 +02:00
Joffrey JAFFEUX
b871e79c5b
FIX: removes rounding correction as it can be in either direction (#9538) 2020-04-23 23:10:40 +02:00
Penar Musaraj
7cd006fe3a Revert "DEV: Draft check async when starting new PM"
This reverts commit e49212d0bc.

This requires some more work.
2020-04-23 15:51:54 -04:00
Blake Erickson
5b98161f2f
DEV: ember-cli refactor for TextField and TextArea imports (#9480)
In order to be able to use ember-cli we need to fix the import
statements for `TextField` and `TextArea` in the code base.

The only change I don't fully understand is the one in
`discourse-loader.js`, but adding the components to that file make it
all work.
2020-04-23 12:36:05 -06:00
Penar Musaraj
e49212d0bc DEV: Draft check async when starting new PM
When the sequence is missng, the draft check is done synchronously and it results in  iOS devices not launching the keyboard.
2020-04-23 14:17:15 -04:00
Mark VanLandingham
3e543dfa18
FIX: Do not set title attribute on header-topic-info widget (#9533) 2020-04-23 12:44:20 -05:00
Joffrey JAFFEUX
82b43451b3
FIX: Inner content of a row could have no max-width and be very large (#9532) 2020-04-23 19:18:01 +02:00
Joffrey JAFFEUX
be1b7f7468
FIX: fails gracefully if :scope is not handled by a browser (#9529) 2020-04-23 16:50:30 +02:00
Roman Rizzi
7a2e8d3ead
DEV: Add the missing app subdirectory (#9499)
* DEV: Add missing  directory to the Discourse ember app

* DEV: Resolve imports correctly
2020-04-23 10:07:54 -03:00
David Taylor
8e28ccb2ea
PERF: Refactor decorateCooked to run in a detached DOM (#9517)
This means that decorateCooked can be used to modify HTML without triggering the download of remote resources (e.g. images)

In some rare cases (e.g. IntersectionObservers in Chromium), decorating needs to happen in the real DOM. For this, pass `afterAdopt: true` to `decorateCooked`
2020-04-23 11:03:46 +01:00
Sam Saffron
8dccf0521c
Revert "PERF: stop firing superfluous onSelectionChange"
This reverts commit fa96054acf.

Sadly this fails a test case, we may have to hunt up all the
parentElements to check for the cooked class to perform the
bypass
2020-04-23 18:16:13 +10:00
Sam Saffron
fa96054acf
PERF: stop firing superfluous onSelectionChange
onSelectionChanged fires a debounced event that calls window.getSelection()

window.getSelection() is reasonably expensive. There is no reason to do any
of this work if we have an input field focused, that is not how quote works
2020-04-23 17:51:23 +10:00
Joffrey JAFFEUX
7132c50f3b
FIX: prevents constant composer reloading (#9528) 2020-04-23 07:54:29 +02:00
Krzysztof Kotlarek
52c1d7337e
FEATURE: don't display new/unread notification for muted topics (#9482)
* FEATURE: don't display new/unread notification for muted topics

Currently, even if user mute topic, when a new reply to that topic arrives, the user will get "See 1 new or updated topic" message. After clicking on that link, nothing is visible (because the topic is muted)

To solve that problem, we will send background message to all users who recently muted that topic that update is coming and they can ignore the next message about that topic.
2020-04-23 14:57:35 +10:00
Joffrey JAFFEUX
3bbd8b1258
UX: rework date time input range (#9524) 2020-04-22 22:17:53 +02:00
Joffrey JAFFEUX
00f632fb0d
REFACTOR: s/translatedfilterPlaceholder/translatedFilterPlaceholder (#9521) 2020-04-22 20:39:55 +02:00
Joffrey JAFFEUX
4c248fc5c4
UX: do not attempt to full width sk on mobile (#9520) 2020-04-22 20:39:45 +02:00
Vinoth Kannan
df0c386f8a
UX: drop the automatic_membership_retroactive column from groups model. (#9430) 2020-04-22 22:07:39 +05:30
Kris
bf0c055a9a UX: add comment-plus icon for reopening topics 2020-04-22 12:29:27 -04:00
Mark VanLandingham
04fb37c7a4
DEV: Export openNewCategoryModal from discovery-categories (#9501) 2020-04-22 11:03:28 -05:00
Eric Mueller
45f3517ef6
FEATURE: add class to <aside> quote block when quoting an ignored user (#9511)
* add class to <aside> quote block when quoted an ignored user

* Changed from single to double quotes
2020-04-22 12:00:44 -04:00
Justin DiRose
b7dea0d5c1
FIX: Copy button was displayed on quoted codeblock (#9514) 2020-04-22 15:57:25 +02:00
Vinoth Kannan
e5c44f6dcf UX: display 'merge' button in all non-staff user profiles. 2020-04-22 17:42:09 +05:30
Vinoth Kannan
ceee855d00 minor code improvement
a511bea4cc
2020-04-22 16:40:59 +05:30
Joffrey JAFFEUX
5fb5807098
FIX: caret icon should inherit its color (#9513) 2020-04-22 13:10:02 +02:00
Joffrey JAFFEUX
4889dbde49
FIX: differentiate sk outline handling on single/multi (#9512) 2020-04-22 13:02:20 +02:00
Joffrey JAFFEUX
5c45363e67
UX: better outline support in sk components (#9510) 2020-04-22 10:54:02 +02:00
Dan Ungureanu
e733701887
FEATURE: Make report filters reusable (#9444)
This commit also adds 'include subcategories' report filter
2020-04-22 11:52:50 +03:00
Vinoth Kannan
a511bea4cc
FEATURE: admin UI to merge two users. (#9509) 2020-04-22 14:07:51 +05:30
Martin Brennan
628ba9d1e2
FEATURE: Promote bookmarks with reminders to core functionality (#9369)
The main thrust of this PR is to take all the conditional checks based on the `enable_bookmarks_with_reminders` away and only keep the code from the `true` path, making bookmarks with reminders the core bookmarks feature. There is also a migration to create `Bookmark` records out of `PostAction` bookmarks for a site.

### Summary

* Remove logic based on whether enable_bookmarks_with_reminders is true. This site setting is now obsolete, the old bookmark functionality is being removed. Retain the setting and set the value to `true` in a migration.
* Use the code from the rake task to create a database migration that creates bookmarks from post actions.
* Change the bookmark report to read from the new table.
* Get rid of old endpoints for bookmarks
* Link to the new bookmarks list from the user summary page
2020-04-22 13:44:19 +10:00
Kris
b6489d2690 UX: Replaced locked topic "lock" icon with "comment-slash" icon 2020-04-21 17:34:59 -04:00
David Taylor
f51b48b421
PERF: Improve lazy-load performance in Safari
Safari starts loading images as soon as attributes are modified. Modern browsers all prefer the srcset attribute over src, so we should remove srcset last, and add it first.
2020-04-21 19:05:33 +01:00
Mark VanLandingham
036236d6d6
FIX: properly add 'two-rows' class to header-topic-info container (#9497) 2020-04-21 13:01:57 -05:00
David Taylor
a97cb2444c
UX: Fix broken image placeholder styling 2020-04-21 19:00:47 +01:00
Robin Ward
63811707e8 DEV: Remove setupTopicController event 2020-04-21 13:48:33 -04:00
Jeff Wong
c4cc19a2ba Revert "DEV: allow nav items to override computed property values"
This reverts commit 74e4102093.
2020-04-21 09:58:46 -07:00
Joffrey JAFFEUX
1eb9bc4cec
DEV: encapsulates _events and clearing it at app-events module level (#9489) 2020-04-21 17:27:17 +02:00
Justin DiRose
c9cdd12e97
FIX: Improve selector for copy codeblock button (#9493)
Previous selector implementation was not accounting for codeblocks in
nested elements, like lists.
2020-04-21 10:12:56 -05:00
Joffrey JAFFEUX
62459c845f
DEV: allows a sk component to stop click propagation (#9495) 2020-04-21 17:11:40 +02:00
Joffrey JAFFEUX
79058a6d99
DEV: makes sk scroll to current selection (#9492) 2020-04-21 16:48:49 +02:00
Joffrey JAFFEUX
4f834f0008
DEV: allows click to propagate outside of header but not outside of sk (#9491) 2020-04-21 16:20:05 +02:00
Justin DiRose
6559ad0d80
FEATURE: Add copy button to codeblocks (#9451) 2020-04-21 08:02:13 -05:00
Martin Brennan
d123138d3a
FIX: Only confirm bookmark delete if a reminder has been set (#9484)
We do not need a secondary bootbox confirm if the bookmark has no reminder, because nothing really will be lost in that case.
2020-04-21 14:29:12 +10:00
Krzysztof Kotlarek
e9f7262813
FIX: when category or tag is muted, update user (#9456)
Currently, when category or tag is muted, only after hard refresh, these new muted categories are really muted. Without a hard refresh, you will still receive "new topic" messages.

Therefore, when tag or category is muted, we should update the user object right away.
2020-04-21 08:33:55 +10:00
Jeff Wong
74e4102093 DEV: allow nav items to override computed property values
Plugins need to override extra nav-items. Make sure these properties are
override-able.

See:
https://deprecations.emberjs.com/v3.x/#toc_computed-property-override
2020-04-20 15:21:58 -07:00
Robin Ward
ce9c59309c FIX: Temporarily compatibility for Evented on a Topic Route 2020-04-20 17:14:51 -04:00
Robin Ward
5d9f5dd11f REVERT: Fix to app-events to make events not global 2020-04-20 16:57:46 -04:00
Robin Ward
091d6dc9fc DEV: Triggering "saw" on every element seems pointless
We don't seem to wire this up to any listeners, so why waste time doing
all this work?
2020-04-20 16:51:36 -04:00
Robin Ward
28e9f54e2f DEV: sawTop never seems used in our codebase or any plugins 2020-04-20 16:48:51 -04:00
Robin Ward
96d026a329 DEV: Remove EventTarget. Future versions of Ember don't export this.
It was removed altogether from ApplicationRoute, which only triggered
an `activate` event which never seems to be used.

We can replace it with Evented which is still present.
2020-04-20 16:45:01 -04:00
Mark VanLandingham
e5233f5ce6
DEV: Add class to header-topic-info widget (#9475) 2020-04-20 10:34:05 -05:00
Martin Brennan
344ef5226c
FEATURE: Edit bookmark reminders from post and explicit delete button (#9455)
There is now an explicit "Delete Bookmark" button in the edit modal. A confirmation is shown before deleting.

Along with this, when the bookmarked post icon is clicked the modal is now shown instead of just deleting the bookmark. Also, the "Delete Bookmark" button from the user bookmark list now confirms the action.

Add a `d d` shortcut in the modal to delete the bookmark.
2020-04-20 13:30:04 +10:00
Joffrey JAFFEUX
cfe510cbcf
FIX: prevents custom emoji to show double colons and set background img (#9471) 2020-04-19 18:54:10 +02:00
Mark VanLandingham
0e74dd7d7c
FIX: Set user timezone on password reset login (#9461) 2020-04-17 13:39:04 -05:00
David Taylor
4eebbd2212
Revert "FIX: Detect more unsupported browsers"
This change broke IE11 support, even with the polyfills enabled. We may need to add a WeakSet polyfill, but reverting this change for now.

This reverts commit 1cd8c6ce4c.
2020-04-17 16:41:47 +01:00
Roman Rizzi
35f51100e1
FEATURE: Users can be ignored for six months. (#9446) 2020-04-17 10:27:11 -03:00
David Taylor
576872a2d9
PERF: Enable new user card route by default (#9442)
https://meta.discourse.org/t/changes-to-the-user-card-data-source/139951
2020-04-17 09:42:57 +01:00
Joffrey JAFFEUX
17c0c9652d
FIX: stops bookmark keybaod event to be propagated into modal (#9457) 2020-04-17 10:05:51 +02:00
Martin Brennan
8f0544137a
FEATURE: Allow editing bookmark reminders (#9437)
Users can now edit the bookmark name and reminder time from their list of bookmarks.

We use "Custom" for the date and time in the modal because if the user set a reminder for "tomorrow" then edit the reminder "tomorrow", the definition of what "tomorrow" is has changed.
2020-04-17 11:08:07 +10:00
Penar Musaraj
6fad04635b
UX: Set focus when launching composer on iOS (#9443) 2020-04-16 20:19:23 -04:00
Krzysztof Kotlarek
5a60a4233e
FIX: topic title in search contains data-topic-id (#9435)
Data topic id is required by the discourse-encrypt plugin.

Related to https://github.com/discourse/discourse-encrypt/pull/12
2020-04-17 09:35:26 +10:00
Jordan Vidrine
e96e57c629
UX: Wizard Font Size (#9448)
Define font-size in wizard
2020-04-16 16:31:24 -05:00
Joffrey JAFFEUX
98039e6cc5
FIX: template-lint uses strict rel-noopener rule which requires noreferrer (#9449) 2020-04-16 22:38:10 +02:00
Joffrey JAFFEUX
28906fdbc7
linting (#9447) 2020-04-16 22:14:46 +02:00
Joffrey JAFFEUX
0a9f283e7e
REFACTOR: various refactoring applied to group pages (#9440) 2020-04-16 22:12:37 +02:00
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
Jeff Atwood
6e1a33b744
revert heatmap color changes in favor of accessible theme 2020-04-16 11:14:25 -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
Kane York
f1b844ba88
FIX: Only apply bold font on topic lists (#9396) 2020-04-15 16:14:53 +10: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
Kris
10c2087a02 UX: Prevent category dropdown from wrapping count, limit mobile width 2020-04-13 17:23:37 -04: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
Joffrey JAFFEUX
a863d8eecb
UX: applies default background color to onebox (#9407) 2020-04-12 21:21:21 +02:00
Joffrey JAFFEUX
0f14bce799
FIX: remove invalid background (#9406) 2020-04-12 21:14:58 +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
Kris
14467757df UX: Adjust noscript footer nav 2020-04-08 17:29:13 -04:00
Penar Musaraj
c3593dd9e2
DEV: Replace jquery.putCursorAtEnd (#9390) 2020-04-08 16:13:02 -04:00
Kane York
3b7ba8ec99 FIX: WCAG-AA compliant topic list heatmap colors
Color #ec7213: 3.0, Bold - AA Large Pass
Color #b06318: 4.50, Normal - AA Pass
Color #93704a: 4.51, Normal - AA Pass

Used the Chrome Inspector color picker curves to preserve the hue and make minimally invasive changes to the coloring.
2020-04-08 11:58:44 -07: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
Penar Musaraj
84f344c5d1 FIX: ensure .gap width does not exceed window width
Fixes an issue where the viewport was horizontally scrollable on iPad.
2020-04-08 11:38:25 -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
Jordan Vidrine
0991c4ae7e
FIX: Widen modal on desktop 2020-04-07 17:44:57 -05:00
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
Jordan Vidrine
3f49b13e5f
FIX: Fix untitled/long links extending out box 2020-04-07 13:46:40 -05: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
Sam Saffron
81c912bb00
FIX: when loading drafts set the topic
the behavior of loadDraft regressed and it no longer correctly set the topic
model leading to "undefined" when attempting to reply
2020-04-06 16:29:14 +10:00
Kris
a8002baaed UX: Restyle bookmark reminder modal 2020-04-03 20:49:09 -04:00
Jordan Vidrine
751f229665
UX: removes color on categories if no style chosen (#9346)
* UX: removes color on categories if no style chosen

* Update app/assets/javascripts/discourse/templates/components/categories-only.hbs

* Update messages.hbs

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-04-03 15:09:01 -05:00
Joffrey JAFFEUX
883901e4c0
FIX: do not attempt to deselect tags if filter is not empty (#9345) 2020-04-03 16:27:56 +02:00
Sam Saffron
20d8b49add
DEV: remove targetUsernames deprecation
Stable already has this rename, no need to carry the deprecation anymore.
2020-04-03 14:35:30 +11:00
Sam Saffron
83f5f9176b
DEV: only load staff logs when page is visited
Previously we would load admin staff action logs unconditionally as soon
as the controller was instantiated, this is not desirable we only want to
run the query when you visit the route.
2020-04-03 14:13:01 +11:00
Joffrey JAFFEUX
9c43963ff3
FIX: allows color-input to set hex and color names through input (#9339) 2020-04-02 21:19:31 +02:00
Vinoth Kannan
e7e931b70b FIX: track links in onebox body if it's same as header link. 2020-04-03 00:08:29 +05:30
Arpit Jalan
ef7753953d FIX: show today's date on /top page period chooser 2020-04-02 20:36:08 +05:30
Zdravko Curic
41510d5b84
FIX: jQuery deprecation warning (#9331) 2020-04-02 09:54:51 -04:00
Vinoth Kannan
37bf38f801 FIX: removing a timer with duration doesn't work. 2020-04-02 05:59:35 +05:30
Martin Brennan
d261a809e2
FEATURE: Bookmark reminder type changes and bugfixes (#9329)
New Reminder Types
-------------------------------------

* Add a "later this week" reminder which is today + 2 days, will not show if we are on the days Thu-Sun
* Add a "start of next business week" reminder which is 8am Monday

Bugfixes and Tweaks
--------------------------------------

* Move dates out of translation for reminder types and yield HTML for tap-tile for more customizable content and styling
* Make sure double clicking the bookmark icon in quick access takes users to the new bookmarks-with-reminders page
* Sane default to 8am (start of day) for custom reminder with no time
2020-04-02 09:57:48 +10:00
Sam Saffron
cade4957ae
DEV: don't use _ cause property is observed
Followup on fcc5ef96
2020-04-02 10:22:13 +11:00
Penar Musaraj
b82f6098ce
UX: Remove share as link fallback on touch devices (#9332) 2020-04-01 15:18:30 -04:00
Mark VanLandingham
65d9a9c1ce
DEV: Create wizard-field-checkboxes component (#9333) 2020-04-01 13:30:38 -05:00
tshenry
32e14045c4
UX: use color variable for background of shortcut keys 2020-04-01 09:27:14 -07:00
Mark VanLandingham
689c61b462
DEV: Allow plugins to add wizard steps after specific steps (#9315) 2020-04-01 08:36:50 -05:00
Sam Saffron
a098464af3
FIX: ninja edit for replies not working
There is an edge case, in some cases when pulling a post from the store
there is no topic, this ensures it is loaded correctly.
2020-04-01 16:40:55 +11:00
Martin Brennan
c07dd0d22a
FEATURE: Add lazy loading to user bookmarks list (#9317)
This is so users with huge amount of bookmarks do not have to wait a long time to see results.

* Add a bookmark list and list serializer to server-side to be able to handle paging and load more URL
* Use load-more component to load more bookmark items, 20 at a time in user activity
* Change the way current user is loaded for bookmark ember models because it was breaking/losing resolvedTimezone when loading more items
2020-04-01 14:09:07 +10:00
Sam Saffron
b8d2261db9
FIX: correctly load drafts based of id
Previously we relied on race conditions to correctly open a draft, so this
broke.

New code is deliberate.

Also corrects missing observers on composer action
2020-04-01 14:23:26 +11:00
Kris
8bd693891a Follow-up to 8a52756 for safari 2020-03-31 21:57:09 -04:00
Martin Brennan
771dec9a44 Fix currentUser not being loaded correctly in bookmark.js
* this caused errors because resolvedTimezone was no longer
  accessible
2020-04-01 11:13:53 +10:00
Kris
8a527567d3 UX: Break very long words in titles within menus 2020-03-31 20:55:11 -04:00
Martin Brennan
b79ea986ac
FEATURE: High priority bookmark reminder notifications (#9290)
Introduce the concept of "high priority notifications" which include PM and bookmark reminder notifications. Now bookmark reminder notifications act in the same way as PM notifications (float to top of recent list, show in the green bubble) and most instances of unread_private_messages in the UI have been replaced with unread_high_priority_notifications.

The user email digest is changed to just have a section about unread high priority notifications, the unread PM section has been removed.

A high_priority boolean column has been added to the Notification table and relevant indices added to account for it.

unread_private_messages has been kept on the User model purely for backwards compat, but now just returns unread_high_priority_notifications count so this may cause some inconsistencies in the UI.
2020-04-01 09:09:20 +10:00
David Taylor
0e3fa4072f FIX: Bypass serviceworker cache for auth routes
This avoids samesite cookie-related issues in iOS PWAs during the authentication flow
2020-03-31 14:24:02 -03:00
Joffrey JAFFEUX
5112648796
fix documentation (#9327) 2020-03-31 17:19:47 +02:00
Joffrey JAFFEUX
f724cf1cfe
UX: minor tweaks to users directory last updated at styling (#9322) 2020-03-31 10:12:52 +02:00
Joffrey JAFFEUX
acc0a9673e
FIX: the correct action for group-member-dropdown is now actOnGroup (#9320) 2020-03-31 09:21:59 +02:00
Joffrey JAFFEUX
4f6d722e45
DEV: adds a new dropdown widget usable in any widget (#9297) 2020-03-31 09:13:16 +02:00
Joffrey JAFFEUX
9bbaaea1e8
UX: better customize emoji layout on mobile (#9319) 2020-03-31 08:55:47 +02:00
Sam Saffron
fcc5ef9625
FIX: when switching reply type update options
Previously we were not correctly updating reply types leading to inconsistent
behavior when using drop down in composer (for reply type)
2020-03-31 14:40:57 +11:00
Kris
d282233d31 UX: Add flair styles to latest topic list 2020-03-30 21:40:11 -04:00
Sam Saffron
a34711c23a
FIX: do not save draft while it is loading
When editing a post we were incorrectly saving a draft prior to user typing

This caused a bloat in the amount of drafts saved per user and inconsistency
around behavior of "escape" button.

It also lead to lots of warnings about draft conflicts when copying stuff
between posts.

The code is improved to use promises more appropriately, however further
changes are needed to clean up internals so methods consistently return
promises.

Too many methods in the controller sometimes return a promise and sometimes
an object. Long term the methods will become async and all of this will be
corrected.
2020-03-31 11:49:10 +11:00
Joffrey JAFFEUX
5b6cdd6fb5
DEV: adds a loading property to d-button (#9072)
Usage:

```
{{d-button icon="times" label="foo.bar" isLoading=true}}
```

Note that  a button loading without an icon will shrink text size to prevent button to jump in size.

A button while loading is disabled.
2020-03-30 23:17:00 +02:00
Kane York
2a2555e598 DEV: Partial 'block-indentation' linting fixes 2020-03-30 14:13:33 -07:00
Kane York
2afb95fe3e DEV: Enable and fix the 'no-multiple-empty-lines' lint 2020-03-30 14:13:33 -07:00
Kane York
f900efaa4a DEV: composer.hbs: fix indentation 2020-03-30 14:13:33 -07:00
Kane York
1703270055 DEV: Enable and fix no-trailing-spaces lint 2020-03-30 14:13:33 -07:00
Joffrey JAFFEUX
339ddb8701
FIX: makes clicking and displaying date picker more reliable (#9302) 2020-03-30 22:02:24 +02:00
Robin Ward
db35baba26 FEATURE: Display "Last Updated At" on user directory 2020-03-30 14:34:48 -04:00
Joffrey JAFFEUX
0996c3b7b3
FEATURE: allows multiple custom emoji groups (#9308)
Note: DBHelper would fail with a sql syntax error on columns like "group".

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2020-03-30 20:16:10 +02:00
Joffrey JAFFEUX
fa5ba6beb8
FIX: ensures mini-tag-chooser display min tags req if no selection (#9303) 2020-03-30 19:34:53 +02:00
Joffrey JAFFEUX
a3345057f2
FIX: prevents rendering empty timeline-controls (#9304)
The streamlength/height code when true would return just after we had inserted the timeline-controls, resulting, on topic-progress event to display an empty timeline-controls when clicked.

I think this code in unecessary and we should only rely on the code in `hideProgress` which will currenly hide the progress is the stream has only one post displayed on desktop (always shown on mobile).
2020-03-30 19:17:08 +02:00
Joffrey JAFFEUX
f8cb46c0e1
FIX: prevents exception when clicking component title above ace editor (#9309) 2020-03-30 18:55:15 +02:00
Zdravko Curic
d0d5f0c912
DEV: Add Ember.PromiseProxyMixin to ember modules (#9312) 2020-03-30 11:37:14 -04:00
Joffrey JAFFEUX
2b78bd01ab
FIX: allows adapters to define a custom primaryKey (#9254) 2020-03-30 15:23:59 +02:00
Penar Musaraj
92e81d2ae5 UX: Fix composer position on iPads with a hardware keyboard
Adds padding to the composer when the keyboard accessory bar is shown (i.e. submit button no longer hides behind said bar)
2020-03-30 09:23:00 -04:00
Vinoth Kannan
7a32a99595 FIX: Quoting a nested quote should preserve original post info. 2020-03-28 22:24:43 +05:30
Penar Musaraj
a3d47f1aad UX: Better spacing for icons in select-kit labels
Followup to c14e3adac5
2020-03-27 16:06:40 -04:00
Arpit Jalan
702879cbda FIX: check for presence of name before normalizing 2020-03-27 23:01:48 +05:30
Joffrey JAFFEUX
38e347aee6
DEV: allows to decorate topic list item (#9294)
Co-authored-by: David Taylor <david@taylorhq.com>
2020-03-27 16:50:31 +01:00
Joffrey JAFFEUX
eda8f319a2
FIX: keep date object (#9292) 2020-03-27 14:15:14 +01:00
Joffrey JAFFEUX
1b09a0cd17
UX: improves date-time-input on mobile (#9291) 2020-03-27 13:29:58 +01:00
David Taylor
e6e6d20912
Revert "DEV: Enable and fix link-href-attributes lint"
Introducing an href attribute on the upload button caused the page to reload when clicked

This reverts commit a17fa222af.
2020-03-27 11:43:00 +00:00
Kris
33350c31c0
UX: Align bulk select menu toggle relative to main wrapper when possible 2020-03-26 19:15:33 -04:00
Sam Saffron
bed3f7f69a
DEV: long poll for 20 extra minutes when user stops interacting
We have no way of detecting if a browser window is behind another window
or off screen on a virtual desktop.

In some cases we may want events to be delivered quicker to the browser.
Specifically a user may still have a window in view but is not interacting.

This gives users 20 minutes of extra "long polling time" prior to shifting
to short polling.
2020-03-27 10:14:13 +11:00