Commit Graph

14715 Commits

Author SHA1 Message Date
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
Jarek Radosz
67b34600d5
DEV: Use type instead of method in ajax calls (#8974)
Even though `type` is an alias for `method`, we have custom logic in `/discourse/lib/ajax` that checks only `type`, and ~200 other ajax calls in the codebase already use `type` param.
2020-03-26 21:00:10 +01:00
Kane York
17211b940f DEV: Enable and fix the 'no-duplicate-attributes' lint 2020-03-26 12:31:34 -07:00
Kane York
07dc8d20c4 DEV: Enable and fix the 'require-iframe-title' lint 2020-03-26 12:31:34 -07:00
Kane York
a17fa222af DEV: Enable and fix link-href-attributes lint 2020-03-26 12:31:34 -07:00
Joffrey JAFFEUX
ef3d6d6580
FIX: groups filtering input was causing a full page reload (#9282) 2020-03-26 15:46:31 +01:00
Bianca Nenciu
7952cbb9a2
FIX: Perform crop using user-specified image sizes (#9224)
* FIX: Perform crop using user-specified image sizes

It used to resize the images to max width and height first and then
perform the crop operation. This is wrong because it ignored the user
specified image sizes from the Markdown.

* DEV: Use real images in test
2020-03-26 16:40:00 +02:00
Sam Saffron
e62071830d
DEV: prefer Date.now() over new Date().getTime()
`New Date().getTime()` is both uglier and slower than `Date.now()`

`Date.now()` is available on all the browsers we support.
2020-03-26 17:36:53 +11:00
Sam Saffron
25f1f23288
FEATURE: Stricter rules for user presence
Previously we would consider a user "present" and "last seen" if the
browser window was visible.

This has many edge cases, you could be considered present and around for
days just by having a window open and no screensaver on.

Instead we now also check that you either clicked, transitioned around app
or scrolled the page in the last minute in combination with window
visibility

This will lead to more reliable notifications via email and reduce load of
message bus for cases where a user walks away from the terminal
2020-03-26 17:36:52 +11:00
Kris
b2aa203e67
Add additional classes to topic-map stats 2020-03-25 21:40:51 -04:00
Robin Ward
a12c7fcb2f Revert "FIX: Allow JS transpilation"
This reverts commit 6d1263812f.
2020-03-25 16:13:01 -04:00
Robin Ward
6d1263812f FIX: Allow JS transpilation 2020-03-25 16:05:16 -04:00
Kane York
6a1fe9ff87
FIX: Use 1 column instead of 4 for permalink destination (#9260) 2020-03-25 11:30:39 -07:00
Vinoth Kannan
b09f79366e UX: disallow tag creation in "default tags" site setting choosers. 2020-03-25 23:37:46 +05:30
Joffrey JAFFEUX
6acbd1bedf
DEV: allows time-input to be clearable (#9277) 2020-03-25 19:05:11 +01:00
Vinoth Kannan
dbc323e12a Fix the typo. 2020-03-25 23:32:32 +05:30
Joffrey JAFFEUX
105cc5505c
FIX: ensures we have a date object in date-time-input (#9276) 2020-03-25 17:57:43 +01:00
Robin Ward
f2f8ede22c Last ES6 files in our app/assets/javascripts 2020-03-25 12:30:20 -04:00
Dan Ungureanu
3ae26c6c59
FEATURE: List search menu shortcuts in instructions modal (#9273) 2020-03-25 17:11:33 +02:00
Joffrey JAFFEUX
7d7c5641b4
DEV: allows to use routeAction from components/widgets (#9267)
ATM this is only usable as a helper in templates.
2020-03-25 15:51:30 +01:00
David Taylor
d62d258fe5
Revert "FIX: word boundary regex (\b) not working in Unicode languages. (#9163)"
Lookbehind regex is not supported in Firefox or IE11

This reverts commit 572bb5988f.
2020-03-25 14:34:45 +00:00
Jordan Vidrine
9521a88984 UI: Fix 'lock' icon spacing in category dropdown 2020-03-25 08:59:00 -05:00
Vinoth Kannan
572bb5988f
FIX: word boundary regex (\b) not working in Unicode languages. (#9163) 2020-03-25 18:39:19 +05:30
Joffrey JAFFEUX
cff9d4726c
FIX: ensures search-menu is not briefly showing previous results (#9272) 2020-03-25 10:00:48 +01:00
Dan Ungureanu
70012f2027
FEATURE: Navigate through search results using J/K (#9264) 2020-03-25 15:45:35 +11:00
Joffrey JAFFEUX
2501c0cd0f
FIX: user-selector was not excluding currentUser (#9266)
concat doesn't mutate the variable so it has to be assigned.
2020-03-24 22:17:26 +01:00
Robin Ward
a11938d58d Rename more es6 files to js 2020-03-24 16:32:56 -04:00
Robin Ward
4876884fd1 More JS files 2020-03-24 16:18:56 -04:00
Robin Ward
0fd0a04019 This should be js 2020-03-24 16:13:30 -04:00
Robin Ward
4d190c93b6 Migrate ember-addons from ES6 -> JS 2020-03-24 16:11:56 -04:00
Jordan Vidrine
9659da1044
UI: Update margin select kit category name 2020-03-24 12:40:11 -05:00
Joffrey JAFFEUX
58ced428ee
FIX: race conditions in search menu (#9262)
Race conditions could lead the previous query search term to be used in the next query. This commit also attempts to simplify code.
2020-03-24 15:16:42 +01:00
Bianca Nenciu
d8640fd042
DEV: Move requested_group_id custom field from post to topic (#9127)
Follow-up-to accbbded15
2020-03-24 11:12:52 +02:00
Martin Brennan
b8b29e79ad
FIX: Improve user timezone saving (#9230)
Based on issues identified in https://meta.discourse.org/t/improved-bookmarks-with-reminders/144542/20

* Implement the resolvedTimezone() function on the user model where we return the user's timezone if it has been set, or we guess it using moment and save it to the user using an update call if it has not yet been set. This covers the cases of users who do not log out/in often who will not get their timezone set via login. This also makes sure the guess + save is done in a non-obtrusive way not on every page -- only when it is needed.

* Before if a user's timezone was blank when they visited their profile page we were autofilling the dropdown with the guessed timezone from moment. However this was confusing as it would appear you have that timezone saved in the DB when you really didn't. Now we do not autofill the dropdown and added a button to automatically guess the current timezone to make everything more explicit.
2020-03-24 11:39:09 +10:00
Kane York
4b8acce92b FIX: Check for permalinks before showing the 404 page
Limitations: the user profile "open external links in new tab setting" is
slightly broken for "External URL" permalinks.

Remove the copy from the admin permalinks page stating that this doesn't work.
2020-03-23 16:31:07 -07:00
Vinoth Kannan
dc1836573d
UX: display avatar flair in categories route topic list items (#9197) 2020-03-24 01:13:25 +05:30
Robin Ward
27641f21e4 Migrate discourse-common from es6 -> js 2020-03-23 15:05:58 -04:00
Robin Ward
7f3bb06ac7 FIX: Wizard tests were missing 2020-03-23 14:25:25 -04:00
Robin Ward
1ac0242201 Convert wizard es6 files to js 2020-03-23 14:15:16 -04:00
Kris
39dde33cbb UX: Larger tap areas for profile panel in user menu on mobile devices 2020-03-23 13:25:33 -04:00
Joffrey JAFFEUX
48c1de4836
DEV: adds afterCreate/beforeUpdate hooks to rest models (#9253)
We already have beforeCreate and afterUpdate and it seems these hooks can be useful and it's also unexpected to not have parity on this.
2020-03-23 16:58:40 +01:00
Arpit Jalan
e58f0adfcc FIX: respect prioritize_username_in_ux setting on /about page 2020-03-23 20:28:01 +05:30
Dan Ungureanu
5715f0ad01
UX: Hotkey K can select partial posts
When no post is selected, K selects first partial post and J selects
first full post.
2020-03-23 14:05:29 +02:00
Joffrey JAFFEUX
3f9b922d20
FIX: middle click was reading every notifications (#9252) 2020-03-23 13:28:16 +02:00
Robin Ward
07813c4a91
Convert select-kit from es6 to js (#9246)
* Convert select-kit from es6 to js

* Hide more git blames
2020-03-20 12:40:32 -04:00
Kris
69df19a663 UX: Disable highlight animation on deleted posts 2020-03-20 12:15:58 -04:00
Robin Ward
c150566506
Migrate pretty-text to .js extensions (#9243) 2020-03-20 09:55:42 -04:00
Roman Rizzi
080960a15e
FIX: Show the envelope icon when the flagged post is a PM. Flagged PM must be exclusively reviewed by admins (#9232) 2020-03-19 15:12:42 -03:00
Vinoth Kannan
aad12822b7
FEATURE: automatically delete replies on a topic after N days. (#9209) 2020-03-19 21:06:31 +05:30
Martin Brennan
8769ca08bb SECURITY: Prevent access to other user's bookmark lists 2020-03-19 10:59:32 +10:00
Blake Erickson
1c7680c568 FIX: Use id instead of elementId in hbs file
I think this issue is caused by a current regression in ember

https://github.com/emberjs/ember.js/issues/18147

but using `id` works just fine in templates. This also appears to be the
only template file we are using `elementId` directly in the template.
2020-03-18 13:44:35 -06:00
Martin Brennan
9b4b690bba FIX: Prevent mobile bookmark modal cutoff 2020-03-18 15:54:50 +10:00
Martin Brennan
e2ce12d414
FIX: Broken computing of userHasTimezone in bookmark modal and missing tap-tile templates for regular users (#9229)
Based on reports here https://meta.discourse.org/t/improved-bookmarks-with-reminders/144542

* Because the `userHasTimezone` property was computed and we were checking on an (essentially) global object, ember was not aware that the user timezone had changed because it changed in a different place. instead set the timezone as internal state for the modal on show and base the computed property off of that so it mutates correctly
* The tap-tile components were in the admin folder completely unnecessarily, move them out into the main discourse folder otherwise noone else can use the new bookmarks (icon + text is missing)
2020-03-18 11:12:23 +10:00
Vinoth Kannan
48d690ae01 FIX: Remote themes Github link should go to custom branch #9184 2020-03-18 03:57:54 +05:30
Justin DiRose
9101227266
FEATURE: Demote muted categories on category list (#9226) 2020-03-17 15:33:15 -05:00
David Taylor
92e9fa70c7
DEV: Add class to backup restore buttons, for easier targeting 2020-03-17 18:46:17 +00:00
Jeff Wong
8e6be1c353 FIX: consistency to show mute/ignore menu in user profile
Show the mute/ignore menu for another user even when the current user
cannot message them.
2020-03-17 11:22:34 -07:00
Bianca Nenciu
43b38dbbc2
FIX: Dismiss notifications on middle click (#9098) 2020-03-17 17:48:12 +02:00
David Taylor
e72c0544b0
UX: Refresh group membership list when removing users or changing owners 2020-03-17 11:06:17 +00:00
Martin Brennan
949bb74add FIX: Add basePath to link for "no timezone" in bookmark modal 2020-03-17 16:53:12 +10:00