Commit Graph

2191 Commits

Author SHA1 Message Date
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
tshenry b8b1cbbfb9
UX: Improve second factor UI (#9526)
This will make a few minor improvements to the second factor user interface. Highlights include:

- Using the site's title to prefix the backup code filename. If non-ascii characters are detected, then prefix "discourse" instead.
- Add icons and change the text on some of the buttons for better clarity and consistency
- Add an education link to the security key modal
2020-05-05 11:05:25 +10:00
Joffrey JAFFEUX a2c85f0845
DEV: use the existing parsePostData function (#9629) 2020-05-04 18:35:04 +02:00
Joffrey JAFFEUX 0e4db91870
FIX: save bookmark reminder on tap unless custom (#9611) 2020-05-02 10:31:44 +02:00
Robin Ward f182e61def DEV: Remove global Handlebars 2020-05-01 14:12:09 -04:00
Jeff Wong 2cb9e85d14
FEATURE: add category banner for why a user cannot post (#9576)
* FEATURE: add category banner for why a user cannot post

Adds a category banner for why a user is unable to post in a category.

Also adds an extra alert for the user when a user is unable to create a topic in a
category and they still try and click on the disabled-looking new topic
button.
2020-04-30 10:39:11 -07:00
Joffrey JAFFEUX 1b2db44678
FEATURE: allows to limit visible reports and tabs in dashboard (#9598) 2020-04-30 17:31:04 +02:00
Martin Brennan 10f9f295dc
DEV: Add acceptance tests for bookmarks with reminders (#9592) 2020-04-30 14:58:26 +10:00
Sam Saffron d6df92b074
DEV: correct bad test
Test was unlisting a topic and then checking for the unlist info
in the whisper field
2020-04-30 14:27:24 +10:00
Martin Brennan ca539fdccf
FIX: Rename all instances of bookmarkWithReminder to just bookmark (#9579)
* Rename all instances of bookmarkWithReminder and bookmark_with_reminder to just bookmark
* Delete old bookmark code at the same time
* Add migration to remove the bookmarkWithReminder post menu item if people have it set in site settings
2020-04-30 10:09:22 +10:00
Joffrey JAFFEUX a1b9150512
DEV: adds a caret option to widget dropdown (#9588) 2020-04-29 19:37:21 +02:00
Martin Brennan 6cf31f16f7
FIX: Change bookmarks-with-reminders URL back to bookmarks for user activity (#9566)
* Bookmarks with reminders is a core feature now, no need to have a separate URL
* Keep around the old /u/:username/activity/bookmarks-with-reminders route for backwards compat in Ember but just redirect to user activity bookmarks.
2020-04-29 10:53:37 +10:00
Martin Brennan 17ca47af1a
FIX: Remove timezone in brackets from user card (#9567)
For clarity and to save space remove the timezone in brackets e.g. (EDT) from the user card. Also add a title to the user time span to say it is Local Time.
2020-04-29 08:45:38 +10:00
mentalstring 67f3fe14aa
FEATURE: support SSO website and location overrides
Add location and website + the ability to override using SSO using the `sso_overrides_location` and `sso_overrides_website` site settings.
2020-04-28 16:06:35 +10:00
Martin Brennan 66b5b8cf29
FIX: Local time not updating between user cards (#9564)
The local time was not updating between user cards because the computed property was not used correctly.

There's an old saying in Tennessee — I know it's in Texas, probably in Tennessee — that says, fool me once computed properties, shame on — shame on you. Fool me — you can't get fooled again.
2020-04-28 13:23:43 +10:00
Joffrey JAFFEUX ad978b93ab
FIX: Correctly shows no bookmark message (#9548) 2020-04-28 11:19:35 +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
Jarek Radosz fb20b57057
DEV: Re-enable "remove featured link" test (#9550)
It was disabled in ac4b4e30dc
2020-04-27 17:54:07 +02:00
Sam Saffron 3de901e38d
DEV: correct missing file from revert
Test did not revert cleanly. Corrected.
2020-04-25 13:29:45 +10: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 040b8c00a4 UX: replace closed topic icon with discourse-no-entry 2020-04-24 17:31:34 -04:00
Kris 9f52997be1 UX: Let's try X for the closed topic icon instead of a \ 2020-04-23 17:23:25 -04: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
Vinoth Kannan df0c386f8a
UX: drop the `automatic_membership_retroactive` column from groups model. (#9430) 2020-04-22 22:07:39 +05:30
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
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 d1bee13fda test fix 2020-04-21 17:57:25 -04:00
Joffrey JAFFEUX fe579c918f
DEV: fix failing test relating to sk click propagation
* followup to 62459c84
2020-04-21 12:01:16 -04:00
Joffrey JAFFEUX 1eb9bc4cec
DEV: encapsulates _events and clearing it at app-events module level (#9489) 2020-04-21 17:27:17 +02: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
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
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
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
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
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
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
Vinoth Kannan 4a2c4232c5
FIX: remove word boundary regex (\b) for search result highlights. (#9338) 2020-04-15 11:11:00 +05:30
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
Vinoth Kannan 0cef409d49 UX: strip base64 image URLs when converting HTML to markdown. 2020-04-12 21:05:23 +05:30
Joffrey JAFFEUX d984848aa9
FIX: ensures toolbar is updated on composer action change (#9402) 2020-04-10 22:39:19 +02:00
Joffrey JAFFEUX 058506bb77
DEV: prevents toolbar callbacks to leak between tests (#9403) 2020-04-10 16:47:27 +02: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
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
Jarek Radosz 874999941a
DEV: Fix some more flaky tests (#9384)
Includes:
* DEV: Don't overwrite a computed property in test
2020-04-08 12:46:43 +02: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
Sam Saffron 624a9bf234
DEV: allow for internal format change of Drafts
This follows up on 20d8b49add we should no longer be testing with
usernames in the draft
2020-04-03 14:56:34 +11:00