Commit Graph

15726 Commits

Author SHA1 Message Date
Robin Ward 792bd3faff Remove `getURL` and `getURLWithCDN` deprecations, they have been removed 2020-08-06 14:01:31 -04:00
Neil Lalonde 1ca81fbb95
FEATURE: set notification levels when added to a group (#10378)
* FEATURE: set notification levels when added to a group

This feature allows admins and group owners to define default
category and tag tracking levels that will be applied to user
preferences automatically at the time when users are added to the
group. Users are free to change those preferences afterwards.
When removed from a group, the user's notification preferences aren't
changed.
2020-08-06 12:27:27 -04:00
Jarek Radosz cd4f251891
FEATURE: Poll breakdown 2.0 (#10345)
The poll breakdown modal replaces the grouped pie charts feature.

Includes:

* MODAL: Untangle `onSelectPanel`
Previously modal-tab component would call on click the onSelectPanel callback with itself (modal-tab) as `this` which severely limited its usefulness. Now showModal binds the callback to its controller.

"The PR includes a fix/change to d-modal (b7f6ec6) that hasn't been extracted to a separate PR because it's not currently possible to test a change like this in abstract, i.e. with dynamically created controllers/components in tests. The percentage/count toggle test for the poll breakdown feature is essentially a test for that d-modal modification."
2020-08-06 17:57:06 +02:00
Penar Musaraj 6fdc711b4a
FEATURE: Allow users to opt out of automatic dark mode (#10377) 2020-08-06 09:45:37 -04:00
Joe c047e16285 UX: ensure CSS vars are loaded in the Wizard stylesheet
The in-app select-kit stylesheet references some of the CSS vars we recently added. This commit ensures that those vars are available when that sheet is complied since the wizard lives outside of the app.
2020-08-06 19:19:15 +08:00
Sam Saffron ba482c251c
FIX: stop sync of tracking state when list is filtered
This stops sync of tracking state when list is filtered, in the past this
would cause the tracking state to go off wack.

Additionally this introduces an alias for "filter=tracking", called "f=tracking"

This was done cause the term "filter" is used internally in 2 different ways
the main way is for /unread /new filtering.

Trying to also call a query param "filter" causes enormous amounts of
internal pain, this circumvents the issue.
2020-08-06 16:34:02 +10:00
Robin Ward 09254410ea FIX: Only raise proper `"error"` messages
Also support "1" for `QUNIT_FAIL_FAST` to make it consistent with other
arguments.
2020-08-05 16:27:06 -04:00
Robin Ward f1b6b1bd0e FIX: Pretender errors were being swallowed
Lots of test were broken and needed fixes.
2020-08-05 15:48:57 -04:00
Robin Ward b0564205d9 FIX: Raise errors for broken pretender responses in test mode 2020-08-05 15:48:56 -04:00
Vinoth Kannan aa017f276f FIX: replace `fullPath` while rewriting the `/my/` URLs.
And added the tests. Follow-up to cdca5a2ee4
2020-08-05 23:22:15 +05:30
jbrw 67e8bc5342
FEATURE - allow category group moderators to split/merge topics (#10351) 2020-08-05 10:33:25 -04:00
Bianca Nenciu 42f62a9e63
FIX: Shows all_results if current settings category has no results (#10358)
Searching for a specific setting only showed results from the current selected category. Before fixing fd02856, it automatically redirected the user to all_results. This was a problem because the redirect always happened and there was no way to share a link to a specific category.

The fix to this bug is to simply redirect the user to all_results if there are no results to be displayed.
2020-08-05 09:39:54 +02:00
Kane York 8850f51fd0
FIX: Show "group members forbidden" message on mobile (#10370)
This commit fixes an oversight in commit 88359b0f16.
2020-08-04 16:16:52 -07:00
Kris eb619c8e98 prevent long email addresses from breaking admin table layout 2020-08-04 16:47:50 -04:00
tshenry 0cda5b9d55
FEATURE: New plugin outlet for category-heading (#10363) 2020-08-04 12:52:43 -07:00
Vinoth Kannan cdca5a2ee4 FIX: rewrite of `/my/`URL should work on sub directory site too. 2020-08-05 00:59:10 +05:30
Joffrey JAFFEUX 4593bb60c5
FIX: allows to change a user group notification level (#10369)
The current code has an ambiguous name of "user" which is actually not a user model, the real user model is accessible on the model key of user.
2020-08-04 21:23:55 +02:00
Penar Musaraj fb91320cba
UX: Refactor pikaday month prev/next button styling
And topic-list last poster halo effect
2020-08-04 14:39:25 -04:00
Robin Ward 92b26ecbfb REFACTOR: Move Page title / focus / counts logic to service
We had a handful of methods attached to the root `Discourse` object
related to focus and notification counts.

This patch pulls them out into a service called `document-title` for
updating the title, and a component called `d-document` to attach
and listen for browser events related to focus.

It also removes some computed properties and observers in favor of plain
old Javascript objects.
2020-08-04 12:02:25 -04:00
Mark VanLandingham b76731d722
FEATURE: Invite emails to groups from add member modal (#10308) 2020-08-04 10:02:01 -05:00
Penar Musaraj 413fa49032
UX: Refactor lightbox hover drop shadow
For parity with auto dark mode switching, this includes a subtle effect in dark themes too.
2020-08-04 10:43:18 -04:00
Penar Musaraj c937afc75e
FEATURE: automatic dark mode (#10341)
A first step to adding automatic dark mode color scheme switching. Adds a new SCSS file at `color_definitions.scss` that serves to output all SCSS color variables as CSS custom properties. And replaces all SCSS color variables with the new CSS custom properties throughout the stylesheets. 

This is an alpha feature at this point, can only be enabled via console using the `default_dark_mode_color_scheme_id` site setting.
2020-08-03 22:57:10 -04:00
Sam Saffron eb18f91cf7
DEV: new api to iterate through tracked topics
`topicTrackingState.forEachTracked(topic,isNew,isUnread)` can be used to
iterate through tracking state efficiently.

This is handy for extension looking at subsets of tags and categories.
2020-08-04 10:40:03 +10:00
Kris 5e46ec8b76 width fix for category chooser in move posts modal 2020-08-03 17:44:11 -04:00
Penar Musaraj 52b864facf
FIX: bug with sharing when used outside a topic
Followup to ac76bfb, fixes share buttons in topic lists (only used in themes or plugins)
2020-08-03 16:27:11 -04:00
Penar Musaraj e6349685d3
UX: Uniform focus styles for composer inputs/textarea (#10296)
Uses a thin border as indicator that element is in focus for all editable items in the composer (inputs, select kit, textarea).

 Disables a default iOS style that has a blinking background color on inputs/textareas
2020-08-03 10:01:04 -04:00
Joffrey JAFFEUX eb61916e23
UX: allows to navigate widget dropdown with tab and enter (#10356) 2020-08-03 10:37:30 +02:00
Bianca Nenciu 12913a46e4
FIX: Reset max_posts query parameter (#10334) 2020-08-03 11:19:36 +03:00
Penar Musaraj ac76bfb400
Disable social media sharing on private categories, unlisted topics (#10349)
* Do not show social media sharing on private categories, unlisted topics

* Disable quote sharing entirely in private categories and unlisted topics
2020-08-03 17:06:09 +10:00
Joffrey JAFFEUX 8a9e4504fe
DEV: allows to decouple csv-uploader texts from bulk invite (#10344) 2020-08-01 10:29:09 +02:00
Robin Ward 0b3f963804 FIX: Removes an error in the console in test mode 2020-07-31 14:06:52 -04:00
Jordan Vidrine 831802aedc
Change pp to published-page (#10343)
* UI: Markdown Code Wrapping

* pp -> published-page

change to match previous syntax

* pp -> published-page

change to match previous syntax
2020-07-31 09:24:08 -05:00
Vinoth Kannan 6a1746a0c5
FEATURE: add expandable muted categories ui to `/categories` page. (#10303)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-30 23:32:51 +05:30
Jordan Vidrine f90e02162b
UI: Styling for Published Page (#10335)
* UI: Styling for Published Page

Styling to look more visually connected to Discourse
2020-07-30 10:25:28 -05:00
Sam Saffron dc14d156b6
FEATURE: g,j and g,k to navigate to next and prev topic
After visiting a topic list (by tag / category / top level) we track the list

Once a list is tracked the combo `g` `j` can be used to go to the next topic
in the list and `g` `k` to go to previous topic.

This allows you to quickly work through subsets of topics without having
to navigate back to the top level lists

The shortcut does not work in PM lists yet, or search results, both are
under consideration.
2020-07-30 17:54:47 +10:00
Kris 6da90af6c6 fix triple-click text selection in firefox 2020-07-29 22:38:38 -04:00
Penar Musaraj 25dcc577ae
DEV: More color transformation refactoring 2020-07-29 12:01:12 -04:00
Penar Musaraj 3116591dc6
DEV: Refactor `dark-light-choose()` usage in SCSS
Covers most, but not all, cases.
2020-07-29 09:09:37 -04:00
Penar Musaraj fb2fce037b
DEV: Refactor `.coldmap` styles
Component is only used in mobile category lists, no need to have it available globally

Uses opacity instead of color manipulation to deliver the same effect
2020-07-29 09:00:21 -04:00
Bianca Nenciu 27d853e2ea
FIX: Reset 'filter' query parameter when clicking on a nav-item (#10299)
Usually, this would have been implemented using resetController, but
because we do not use link-to component for linking, that method is not
called.
2020-07-29 15:38:15 +03:00
Bianca Nenciu fd02856f80
FIX: Keep category name in URL when filtering (#10317) 2020-07-29 14:57:05 +03:00
Sam Saffron 04a3b949a4
FIX: add protection when removing auto delete on post bookmarks
If you reply to a topic and are looking at an admin page (like site settings)
,you have no postStream or posts.
2020-07-29 16:42:39 +10:00
Penar Musaraj c2d31f5336
DEV: Remove effectively unused `disable-no-hover` class 2020-07-28 21:44:16 -04:00
Penar Musaraj 29276a37ed
DEV: Refactor `scale-color()` usage in SCSS 2020-07-28 19:56:35 -04:00
Penar Musaraj 8ae66047fc
Remove unused SCSS rules 2020-07-28 19:48:08 -04:00
Rafael dos Santos Silva 2ea17c06dd
FEATURE: Allow picture HTML element in posts 2020-07-28 20:26:32 -03:00
Kris 150e83d2a6 Add color definition so bold/italic btn localization matches icon color 2020-07-28 18:24:25 -04:00
Jordan Vidrine 7cf45dab01
Remove darken & lighten functions from scss (#10330) 2020-07-28 18:21:53 -04:00
Rafael dos Santos Silva c65c3407f8
FIX: Allow playsinline for videos in posts
This is used in webkit browsers mostly.
2020-07-28 19:03:54 -03:00
jbrw 74ab4f3bff
FEATURE - group modetators visual indicator (#10310) 2020-07-28 17:15:04 -04:00
Penar Musaraj 81ab62c72a
DEV: Refactor `blend-primary-secondary()` usage in SCSS 2020-07-28 13:33:31 -04:00
Joffrey JAFFEUX cfd3dcee4a
FIX: reduces charts height (#10327) 2020-07-28 18:42:14 +02:00
Joffrey JAFFEUX 11faec71ae
FIX: prevents group show serializer to override basic group serializer (#10326) 2020-07-28 18:11:15 +02:00
Robin Ward 4e317e7aca FIX: Computed property deprecation
This `description` field on a theme is returned from the server side and
needn't be calculated in the front end. I tested in the UX and seems to
work well.
2020-07-28 11:55:47 -04:00
Robin Ward fc63f0d316 FIX: page:changed was sometimes reporting the wrong URL
(This change could be considered a little risky so we should keep an eye
on it.)

The core issue here is that sometimes as far as the router was concerned
we had transitioned to a route even if a Topic model was still in the
process of loading. In this case the callback could not retrieve the
correct title yet because it had not loaded.

This fix returns a promise from `setupController` when visiting a topic,
which will have the router block until the topic is loaded. This means
that the transition never triggers until the topic title is present.

Note: adding a test for this is basically impossible - it was super hard
to reproduce even in a browser.
2020-07-28 11:48:40 -04:00
Penar Musaraj 69efbd213b
DEV: Refactor `dark-light-diff` usage in stylesheets
- Adds new `$danger-low-mid` SCSS variable
- Removes `dark-light-diff` outside variables and color transformations
2020-07-28 11:06:06 -04:00
Robin Ward c9485692ed FIX: Add back group redirects 2020-07-28 10:59:42 -04:00
Joffrey JAFFEUX 0c7eaa57b2
FEATURE: allows to display charts by day/week/month (#10325) 2020-07-28 16:14:41 +02:00
Kris 074fa5cb18 Follow-up Safari fixes for 89f6ff1 2020-07-27 20:45:29 -04:00
Kris 7508c55a7b Remove extra whitespace between d-button icon and text 2020-07-27 18:49:57 -04:00
Blake Erickson 070a1d6e1e DEV: Remove duplicate allowedPmUsernames property
This property is already declared in the same file, so this removes the
one that isn't needed.
2020-07-27 16:10:00 -06:00
Kris 89f6ff1574 Prevent topic title from clipping some characters due to overflow 2020-07-27 17:26:48 -04:00
Jarek Radosz 223b6d17bf DEV: Fix a function name typo 2020-07-27 11:22:57 +02:00
Sam Saffron de5ef5d895
DEV: add CSS class for composer action
This CSS class can be used to style specific composer actions
2020-07-27 16:51:01 +10:00
Sam Saffron 179335b5e3
DEV: correct performance hack
This code was intended to bypass iterating through tags in absence of a new
or unread topic.

Instead it always fired cause it was checking for function existence which
was clearly always true.
2020-07-27 16:51:01 +10:00
Krzysztof Kotlarek f2342c2d32
FIX: reserve id for reaction notifications (#10315)
Use id 25 for reaction notifications
2020-07-27 11:39:50 +10:00
Krzysztof Kotlarek e0d9232259
FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
2020-07-27 10:23:54 +10:00
Robin Ward 5077cf52fd REFACTOR: Remove `Discourse.SiteSettings` from upload.js 2020-07-24 13:39:16 -04:00
Robin Ward bb2460fe66 FIX: Uploads was not testing properly 2020-07-24 09:45:55 -04:00
Robin Ward 808b5aa5ba FIX: Pass `siteSettings` through in more places 2020-07-24 09:45:55 -04:00
Robin Ward f8aa304c7d REFACTOR: Remove `Discourse.SiteSettings` from uploads.js
This involves passing the siteSettings around, which is somewhat error
prone so I tried to be careful.
2020-07-24 09:45:55 -04:00
Robin Ward 8456252c21 Add deprecation for `Discourse.SiteSettings` in a helper 2020-07-24 09:45:55 -04:00
Robin Ward c4d5c0c91b REFACTOR: Remove `Discourse.SiteSettings` from utilities
This involves a little refactoring of how our `defaultHomepage()` works.
It previously would check the meta tag / site settings each time it was
called but now it only checks once on application boot.
2020-07-24 09:45:55 -04:00
Robin Ward 4def5a8339 Remove old redirect rules 2020-07-24 09:45:55 -04:00
Robin Ward 06a3fd0566 This initializer is not used anymore 2020-07-24 09:45:55 -04:00
Robin Ward bad083b3a3 REFACTOR: Remove `Discourse.SiteSettings` from clipboardData
Also rename method to `clipboardHelpers` to make searching easier since
`clipboardData` refers to browser functionality.
2020-07-24 09:45:55 -04:00
Robin Ward 0213211068 REFACTOR: Remove `Discourse.SiteSettings` from text helpers 2020-07-24 09:45:55 -04:00
Robin Ward 98fee7aa50 REFACTOR: Remove `Discourse.SiteSettings` from highlightSyntax 2020-07-24 09:45:55 -04:00
Robin Ward 656abe22c7 REFACTOR: Remove `Discourse.SiteSettings` from more lib-like helpers 2020-07-24 09:45:55 -04:00
Martin Brennan 1dd3af20c6
FIX: Do not show Email tab for group settings unless IMAP + SMTP enabled (#10301)
Also hide all the SMTP/IMAP related settings to avoid confusion, as this feature is still not 100% ready to go.
2020-07-24 12:00:36 +10:00
David Taylor 61d3640643
DEV: Improve HTML structure for group-reports-nav-item outlet 2020-07-23 12:44:11 +01:00
Martin Brennan e027acd367
FIX: Move consts and translations for bookmark auto delete prefs (#10295) 2020-07-23 13:12:28 +10:00
Penar Musaraj 1100b3d185
UX: fix spacing of composer preview on mobile
Followup to 723d7e3a
2020-07-22 14:36:05 -04:00
Robin Ward c1bcb78441 REFACTOR: Allow helpers to access site settings
Since `Discourse.SiteSettings` is removed, helpers can now include and
call `helperContext().siteSettings` to get access to the settings
without using a global variable.
2020-07-22 14:14:38 -04:00
Robin Ward 939fae3500 REFACTOR: Remove `Discourse.SiteSettimgs` from @setting decorator 2020-07-22 13:27:57 -04:00
Robin Ward 4ecb4439b9 REFACTOR: Remove `Discourse.SiteSettings` from lightbox.js 2020-07-22 13:27:57 -04:00
Robin Ward 94419d0176 REFACTOR: Remove `Discourse.SiteSettings` from static route builder 2020-07-22 13:27:57 -04:00
Robin Ward 0bf28e418f REFACTOR: Remove `Discourse.SiteSettings` from `lib:search` 2020-07-22 13:27:57 -04:00
Robin Ward aa2eea7729 REFACTOR: Remove `Discourse.SiteSettings` from click tracking 2020-07-22 13:27:57 -04:00
Robin Ward bc7dac852f REFACTOR: Remove `Discourse.SiteSettings` from Category model 2020-07-22 13:27:57 -04:00
Robin Ward 217b970e16 REFACTOR: Remove `Discourse.SiteSettings` from desktop notifications 2020-07-22 13:27:57 -04:00
Robin Ward 37f2611d9c REFACTOR: Remove `Discourse.SiteSettings` from topic bulk actions 2020-07-22 13:27:57 -04:00
David Taylor 5b7c016ebc
FIX: Restore navigation-bar on tag topic list
This was accidentally removed in ac0d5b1d
2020-07-22 18:26:37 +01:00
tshenry 723d7e3a61
FEATURE: Submit post from mobile composer preview (#10286) 2020-07-22 09:17:51 -07:00
Bianca Nenciu 1fc58b5a4e
FEATURE: Add query params to staff action logs (#10279) 2020-07-22 18:25:58 +03:00
Penar Musaraj 09eb087f84
FIX: Remove iOS trick to prevent scrolling when focusing on input
No longer needed, removing it also fixes blinking when tapping the composer textarea
2020-07-22 11:18:01 -04:00
Jarek Radosz 300e30dcbf
FIX: Remove the border from YT thumbnail placeholder (#10288) 2020-07-22 16:38:35 +02:00
Penar Musaraj 45ae24a1e9
FIX: Apply video preview trick for Safari to stream only 2020-07-22 10:31:08 -04:00
Jordan Vidrine 5f19fd64ea
Update wizard.scss 2020-07-22 09:24:04 -05:00
Jordan Vidrine b0b42a3209
FIX: add system fonts to wizard 2020-07-22 09:07:57 -05:00
Vinoth Kannan 0884d570b1
FEATURE: add support for `top` filter in tag page. (#10281)
Currently, tag pages only have the `latest` filter.
2020-07-22 19:26:36 +05:30
Penar Musaraj 6d39452317
UX: Shrink composer consistently when pressing Done in iOS 2020-07-21 23:54:43 -04:00
Martin Brennan 62f2e1f971
FIX: Stop double prepending of window.location.origin on media URLs (#10275)
This fixes an issue where sometimes when composing a post and uploading a video/audio file, _loadCachedShortUrls/the uploads controller would return a full URL with origin, instead of just the URL with the host e.g. http://localhost:3000/some/video.mp4 instead of just //localhost:3000/some/video.mp4. We were prepending window.location.origin onto the URL no matter what, and since http://localhost:3000/some/video.mp4 does not match the host URL regex, we were ending up with something like http://localhost:3000http://localhost:3000/some/video.mp4 which broke composer previews. This was only noticed with a video upload in a secure upload environment.
2020-07-22 09:23:55 +10:00
jbrw 0ed784b4fc
FEATURE: Create logs for Group Moderator changes (#10271) 2020-07-21 14:29:02 -04:00
Robin Ward fa74f28a51 REFACTOR: Remove `Discourse.SiteSettings` from initializers 2020-07-21 13:51:28 -04:00
Robin Ward f5adf6d183 REFACTOR: Remove `Discourse.SiteSettings` from reply adapter 2020-07-21 13:51:28 -04:00
Robin Ward 9aab81f304 REFACTOR: Remove `Discourse.SiteSettings` from components 2020-07-21 13:51:28 -04:00
Robin Ward f83c383177 REFACTOR: Remove `Discourse.SiteSettings` from some controllers 2020-07-21 13:51:28 -04:00
Robin Ward 17bccbb52f REFACTOR: Remove `Discourse.SiteSettings` from search-result widget 2020-07-21 13:51:28 -04:00
Robin Ward ac0d5b1d3f REFACTOR: Remove `Discourse.SiteSettings` from nav-item 2020-07-21 13:51:28 -04:00
Robin Ward 9dd6367d81 REFACTOR: Remove `Discourse.SiteSettings` from `PostCooked` widget 2020-07-21 13:51:28 -04:00
Robin Ward 531793e98f REFACTOR: Remove `Discourse.SiteSettings` from topic tracking state 2020-07-21 13:51:28 -04:00
Robin Ward f6c40075e5 REFACTOR: Remove `Discourse.SiteSettings` from post model 2020-07-21 13:51:28 -04:00
Robin Ward 21ea4d1238 REFACTOR: Remove `Discourse.SiteSettings` from application controller 2020-07-21 13:51:28 -04:00
Robin Ward ccb36f81c4 REFACTOR: Remove `Discourse.SiteSettings` from topic model 2020-07-21 13:51:28 -04:00
Joffrey JAFFEUX de5245631b
FIX: gives emojis a width/height to prevent lazy loading warning (#10277) 2020-07-21 08:50:56 +02:00
Kris aa00a6f077 UX: Improve alignment and consistency on full page search 2020-07-21 00:04:07 -04:00
Penar Musaraj 98e6a6a895
UX: Fix quote sharing button spacing 2020-07-20 21:09:13 -04:00
Martin Brennan 41b43a2a25
FEATURE: Add "delete on owner reply" bookmark functionality (#10231)
This adds an option to "delete on owner reply" to bookmarks. If you select this option in the modal, then reply to the topic the bookmark is in, the bookmark will be deleted on reply.

This PR also changes the checkboxes for these additional bookmark options to an Integer column in the DB with a combobox to select the option you want.

The use cases are:

* Sometimes I will bookmark the topics to read it later. In this case we definitely don’t need to keep the bookmark after I replied to it.
* Sometimes I will read the topic in mobile and I will prefer to reply in PC later. Or I may have to do some research before reply. So I will bookmark it for reply later.
2020-07-21 10:00:39 +10:00
Blake Erickson 949c8923a4 DEV: Clean up some extra wording
Remove "Allowed" label because it isn't needed now that we have
relocated the checkbox.

Follow up to: 30af3f24ef
2020-07-20 16:53:10 -06:00
Blake Erickson 30af3f24ef DEV: Relocate enable allowed PMs checkbox
To avoid confusion move the enable allowed PMs checkbox to the same page
that you add your allowed users.

Follow up to: 690f17bcbe
2020-07-20 16:23:42 -06:00
Blake Erickson 690f17bcbe
FEATURE: Allow List for PMs (#10270)
* FEATURE: Allow List for PMs

This feature adds a new user setting that is disabled by default that
allows them to specify a list of users that are allowed to send them
private messages. This way they don't have to maintain a large list of
users they don't want to here from and instead just list the people they
know they do want. Staff will still always be able to send messages to
the user.

* Update PR based on feedback
2020-07-20 15:23:49 -06:00
jbrw 7ab5658462
FEATURE: Allow group moderators to add/remove staff notes (#10252)
* FEATURE: Allow group moderators to add/remove staff notes
2020-07-20 15:53:47 -04:00
Krzysztof Kotlarek edc6c09500
FIX: correct stream counter when load more posts (#10264)
Small bug in that fix in which we started loading posts in partial:
https://github.com/discourse/discourse/pull/10240

We should add only displayed partial to stream counter to have a correct total number.
2020-07-20 09:52:06 +10:00
Jarek Radosz de79f19947
Revert "UX: Style video elements, show descriptions (#10040)" (#10258)
This reverts commit 7d289a4f3e.

Now that 36bad0c31f is in and we have video previews on all platforms, the commit that's being reverted is no longer needed. In the worst case scenario, the video description is clipped under the video poster if the video aspect ratio is other than 16:9. This commit removes descriptions and the custom style for the video elements.

# Conflicts:
#	app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js
#	test/javascripts/lib/pretty-text-test.js
2020-07-17 23:31:01 +02:00
Robin Ward 683a1210e3 FIX: Don't use prototype extensions like `.observes` 2020-07-17 15:23:26 -04:00
Robin Ward 394b5db848 FIX: Tests involving dates were logging warnings 2020-07-17 15:20:45 -04:00
Penar Musaraj bf22f7080d
FEATURE: optional quote sharing buttons (#10254) 2020-07-17 14:44:31 -04:00
Robin Ward 6e94f28cf0 FIX: Error in test mode with missing `topic` 2020-07-17 14:37:08 -04:00
Robin Ward 0ecca3a2d2 FIX: tooltip is no longer used
It has been deprecated and now it's time to remove it.
2020-07-17 14:08:45 -04:00
Penar Musaraj db9162610a
FIX: missing title when inserting hyperlinks 2020-07-17 10:41:58 -04:00
David Taylor 85d1677b26
DEV: Drop unsupported-browser plugin (#10261)
Discourse 2.6 will not have support for older browsers (e.g. IE11)
2020-07-17 15:04:06 +01:00
Martin Brennan 716ccf7fe4
FIX: Bookmark search fixes (#10239)
* Remove unneeded bookmark name index.
* Change bookmark search query to use post_search_data. This allows searching on topic title and post content
* Tweak the style/layout of the bookmark list so the search looks better and the whole page fits better on mobile.
2020-07-17 15:55:07 +10:00
Kris 39fef99c37 FIX: add topic title back to choose-topic 2020-07-16 20:19:33 -04:00
tshenry 15c4f6e4cf
FIX: update meh-o icon to far-meh (#10256) 2020-07-16 16:26:17 -07:00
Robin Ward b7fe5f04ba FIX: Deprecation `usernames` is now `recipients` 2020-07-16 16:11:52 -04:00
Robin Ward 6ba1c64130 FIX: deprecation - `usernames` is now `recipients` 2020-07-16 15:42:51 -04:00
Roman Rizzi f13ec11c64
FEATURE: Add scopes to API keys (#9844)
* Added scopes UI

* Create scopes when creating a new API key

* Show scopes on the API key show route

* Apply scopes on API requests

* Extend scopes from plugins

* Add missing scopes. A mapping can be associated with multiple controller actions

* Only send scopes if the use global key option is disabled. Use the discourse plugin registry to add new scopes

* Add not null validations and index for api_key_id

* Annotate model

* DEV: Move default mappings to ApiKeyScope

* Remove unused attribute and improve UI for existing keys

* Support multiple parameters separated by a comma
2020-07-16 15:51:24 -03:00
Robin Ward 766cb24989 FIX: Overwriting more computed properties 2020-07-16 13:22:13 -04:00
Robin Ward 46e5372c06 FIX: Setting computed properties in tests 2020-07-16 11:57:50 -04:00
Robin Ward 70771e02bb FIX: Removal of i18nPrefix deprecations 2020-07-16 10:41:11 -04:00
Kris 88a43ef800 FIX: Search page bulk-select button position 2020-07-15 22:57:40 -04:00
Krzysztof Kotlarek d9475b70c7
FIX: count new and unread respects muted categories (#10131)
* FIX: count new and unread respects muted categories

countCategoryByState function should take categories muted by the user into consideration
2020-07-16 12:24:51 +10:00
Kris ee88666bad
FEATURE: Improve header meta alignment and truncation with css grid (#10238) 2020-07-15 19:30:35 -04:00
Penar Musaraj a04573c28e
FIX: apply video preview workaround to iOS
Followup to 9e160f5
2020-07-15 19:29:43 -04:00
Kris 9c3f89c17e Let category rows occupy full width when editing topic title w/ no tags 2020-07-15 19:16:02 -04:00
Krzysztof Kotlarek 9052dfe356
FEATURE: load hidden posts in segments (#10240)
* FEATURE: load hidden posts in segments

Currently, when "View hidden replies" button is clicked, all replies are loaded like there is no tomorrow. When there is plenty of hidden replies, it may cause a timeout.

Therefore, we should load them in pages and display the view link as long as we have more hidden replies.
2020-07-16 09:05:11 +10:00
Penar Musaraj 34bbd51350
FIX: regression in secure URL generation, followup to 36bad0c 2020-07-15 18:52:59 -04:00
Penar Musaraj 36bad0c31f
FIX: Preload metadata for audio/video when secure media enabled
Fixes an issue with missing video previews. Should have no side effects now that presigned URLs expire after 5 minutes.
2020-07-15 18:36:51 -04:00
Penar Musaraj 9e160f58ab
FIX: Trick Safari into loading video previews (#10244) 2020-07-15 18:14:14 -04:00
Robin Ward 24b3996f45 FIX: Don't overwrite `maxlength` computed property
We can use a `text-field` instead.
2020-07-15 16:05:37 -04:00
Robin Ward 6fac4a36b4 FIX: `loaded` is a CP and can't be overwritten 2020-07-15 15:53:59 -04:00
Robin Ward 04881b10db FIX: Error with `currentCategory` 2020-07-15 13:34:09 -04:00
Robin Ward 72c5a389eb FIX: filterPlaceholder is a computed property
These cannot be overridden.
2020-07-15 13:32:27 -04:00
Robin Ward 16766a5d62 FIX: `topic.details` is not a plain JS Object 2020-07-15 13:10:05 -04:00
Robin Ward a37a19b55c REFACTOR: Remove less effective method of injecting `siteSettings` 2020-07-15 11:48:55 -04:00
Robin Ward ca13160435 REFACTOR: Remove `Discourse.SiteSettings` from user/admin-user 2020-07-15 11:48:55 -04:00
Mark VanLandingham a1507b2316
REFACTOR: Invite modal panels init, actions, and styling (#10242)
* Import @action rather than using actions: {}
* Set default values in functions outside of init, so the functions can be modified by modifyClass (plugin api).
* Move padding from .choices div to the input in group selector.
2020-07-15 09:18:31 -05:00
David Taylor 7d300006a1
Revert "PERF: Move highlightjs to a background worker, and add result cache (#10191)"
This caused a CORS error when used with S3 asset storage

This reverts commit d09f283e91.
2020-07-15 13:52:35 +01:00
David Taylor c802c7367a
FIX: Allow highlightjs-worker to be compiled successfully 2020-07-15 13:17:52 +01:00
David Taylor d09f283e91
PERF: Move highlightjs to a background worker, and add result cache (#10191)
Syntax highlighting is a CPU-intensive process which we run a lot while rendering posts and while using the composer preview. Moving it to a background worker releases the main thread to the browser, which makes the UX much smoother.
2020-07-15 12:48:07 +01:00
Vinoth Kannan 0058a15266 FIX: prevent redirect when image scale btn is inside a link.
Currently in composer preview, if the image scale buttons are inside a `<a>` link then it redirects to the `href` location after the image scaling task.
2020-07-15 09:34:54 +05:30
Sam Saffron 97f581e1df
FIX: add protection just in case topic is not set
Under some conditions we may be loading the composer with no topic set.
This code could fail leading to a broken composer.
2020-07-15 11:38:46 +10:00
Jarek Radosz fd083394cb
MODAL: Align the close button with other header elements (#10222) 2020-07-14 21:29:36 -04:00
Martin Brennan af7ce5d6eb
Revert "DEV: Add debug hint in discourse-markdown-it"
This reverts commit 5a4855b992.
2020-07-15 11:23:28 +10:00
Martin Brennan 5a4855b992
DEV: Add debug hint in discourse-markdown-it
This console.debug message ONLY shows if isDevelopment() is
true for the environment
2020-07-15 11:18:41 +10:00
Mark VanLandingham 332cb5cdb1
DEV: 2 plugin outlets for group views (#10233) 2020-07-14 15:32:07 -05:00
Rafael dos Santos Silva 72534223f3 FEATURE: Allow video tag attributes for video gifs 2020-07-14 13:46:45 -03:00
jbrw 06073fe8c6
FEATURE: Allow group moderators to close/archive topics
* FEATURE: Allow group moderators to close/archive topics
2020-07-14 12:36:19 -04:00
Faizaan Gagan 9917b9cb21
added 'addFeaturedLinkMetaDecorator' method to the plugin api (#10232)
* added 'addFeaturedLinkMetaDecorator' method to the plugin api

* fixed formatting

* Fixed quotes around import
2020-07-14 10:40:40 -04:00
Martin Brennan bcc80e0ea8
FEATURE: Add search to user bookmark list (#10230)
User bookmarks can now be searched by name or post raw content. The q querystring param is hooked up from the Ember router as well.
2020-07-14 14:43:41 +10:00
Martin Brennan f4f3e8c401
FIX: Various improvements to bookmark modal UI (#10225)
* Do not autofocus name input on mobile
* Improve code for formatted reminder type times to not be computed, so the modal times update correctly
* Change wording of "Next Monday" to "Monday" for all days except when today is Monday
2020-07-14 14:02:13 +10:00
Guo Xiang Tan ce39733b1a
FIX: Incorrect search blurb when advanced search filters are used take2
Also remove include_blurbs attribute which isn't used.
2020-07-14 11:50:40 +08:00
Kris 277d09516e topic-admin-menu shouldn't be fixed width on mobile 2020-07-13 18:50:57 -04:00
Penar Musaraj c02e358146
FIX: Remove social sharing icons from private contexts (#10213) 2020-07-13 14:35:39 -04:00
Dan Ungureanu cf02c518b9
DEV: Merge category and tag hashtags code paths (#10216)
Category and tag hashtags used to be handled differently even though
most of the code was very similar. This design was the root cause of
multiple issues related to hashtags.

This commit reduces the number of requests (just one and debounced
better), removes the use of CSS classes which marked resolved hashtags,
simplifies a lot of the code as there is a single source of truth and
previous race condition fixes are now useless.

It also includes a very minor security fix which let unauthorized users
to guess hidden tags.
2020-07-13 19:13:17 +03:00
Bianca Nenciu 6c6c56613d FIX: Check if last poster exists before using it
There was a problem when admins viewed topics where the last poster was
deleted.
2020-07-13 18:55:14 +03:00
Arpit Jalan 7532f24668 UX: better error message if moderator is not allowed to invite to group
UX: do not show invite to group option if mod is not owner of any group
2020-07-13 18:09:36 +05:30
Arpit Jalan ba57dc57cc DEV: use group_ids instead of group_names in invite params 2020-07-13 17:37:04 +05:30
Jarek Radosz eb73048b0f
DEV: Allow displaying both title and panels in modals (#10220) 2020-07-13 12:43:06 +02:00
Krzysztof Kotlarek 180494185c
FIX: last visit bar regression (#10224)
Last visit regression bar is missing because of that change https://github.com/discourse/discourse/commit/9b7000dbf10

Order property was changed from "default" to null and it was picked by guard condition
2020-07-13 10:42:05 +10:00
Jarek Radosz 6c91f795d0
DEV: widget-dropdown CSS tweaks (#10219)
* DEV: Remove the margin from widget-dropdown

Generic components should not have a margin. Those should be styled in the place where they are used.

* DEV: Remove margin from the dropdown body

It triggered a warning in popper and was effectively a no-op as popper positions dropdowns on its own using `position: fixed` and `top/right/bottom/left` properties.
2020-07-13 01:27:31 +02:00
Jarek Radosz 942cc9b57a
DEV: Add rawTitle property support to modal-tab (#10221)
```js
const panels = [
  { id: "test1", rawTitle: "Test 1" },
  { id: "test2", rawTitle: "Test 2" }
];

showModal("a-modal", { panels }));
```
2020-07-13 01:26:45 +02:00
Bianca Nenciu 275b748016
FIX: Replace links to removed uploads from reviewables with a placeholder (#10180) 2020-07-10 17:57:06 +03:00
David Taylor 4b0d86d8d3
FIX: Do not display enabled inputs when username/name are locked 2020-07-10 10:49:32 +01:00
Dan Ungureanu c72bc27888
FEATURE: Implement support for IMAP and SMTP email protocols. (#8301)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-10 12:05:55 +03:00
Martin Brennan 56f42d89c5
FIX: Post menu bookmark icon and attributes not refreshing on notification click (#10214)
When creating a bookmark reminder that deletes the bookmark on reminder, if the user clicked on the notification and got taken to the post in the topic the bookmark icon still showed as blue with the reminder clock indicator. This was because the response JSON for reloading a topic post was not including the bookmark attributes, not even the bookmarked boolean.

We now return the correct attributes in the serializer, and if bookmarked is false we clear all the bookmark related attributes on the post for the notification to make sure nothing of the old bookmark remains in the UI.

This was only a problem if the user did not refresh the app completely inbetween setting the reminder and receiving the notification.
2020-07-10 14:35:53 +10:00
Kris 706f1a6294
DEV: Remove text-ellipsis component and use CSS line-clamp instead (#10196) 2020-07-09 20:51:43 -04:00
Mark VanLandingham bfde665e76
DEV: Classes and plugin-outlet in admin user-list nav (#10204) 2020-07-09 15:10:25 -05:00
Mark VanLandingham 52f8eecbb9
FIX: Incorrect fix for invites breaking when no group is selected (#10202) 2020-07-09 11:58:29 -05:00
Mark VanLandingham 9d74cf6a63
FIX: Invites when no group is selected (#10201) 2020-07-09 11:41:17 -05:00
Jarek Radosz 32ee9fae40
FIX: Short URL resolution in cook-text (#10200)
Regressed in 3b51e05de2. Thanks to @romanrizzi for reporting!
2020-07-09 14:39:13 +02:00
Jordan Vidrine 9eedc83e00
UI: Markdown Code Wrapping (#10195) 2020-07-08 20:50:42 -04:00
Penar Musaraj bd511c004c
UX: Fix missing icon when merging selected posts 2020-07-08 13:57:05 -04:00
Mark VanLandingham 90512d723c
UX: Use group-chooser in invite modal (#10186) 2020-07-08 12:02:26 -05:00
Robin Ward f3ff9d5625 FIX: `getURL` deprecation 2020-07-08 11:40:53 -04:00
marielaSAG e45307a105
DEV: Added before-create-topic-button plugin-outlet (#10109) 2020-07-08 18:21:30 +10:00
Mark VanLandingham a9292086f4
DEV: Add classes to quick-access-profile items (#10185) 2020-07-08 17:30:12 +10:00
Martin Brennan 6be7a66ba7
FIX: Cap bookmark name at 100 chars and truncate existing names (#10189)
We have a couple of examples of enormous amounts of text being entered in the name column of bookmarks. This is not desirable...it is just meant to be a short note / reminder of why you bookmarked this.

This PR caps the column at 100 characters and truncates existing names in the database to 100 characters.
2020-07-08 17:19:01 +10:00
Mark VanLandingham 81fe8a50d4
DEV: Plugin API function to add items to quick access profile (#10182) 2020-07-07 13:53:40 -05:00
Kris d09a953f53 UX: Fix layout for long bookmark notes 2020-07-07 13:42:51 -04:00
Kris 66257ca8b6 FEATURE: Add "smallest" option to user text size preferences 2020-07-07 13:08:19 -04:00
Mark VanLandingham d2e320d4f7
FIX: Bookmarks shortcut goes to new bookmarks with reminders (#10181) 2020-07-07 11:12:41 -05:00
Bianca Nenciu 4a90464619
FIX: Do not highlight large code blocks (#10125) 2020-07-07 18:51:19 +03:00
Bianca Nenciu 6705c45156
FEATURE: Add reply_as_new_group_message composer action (#10168) 2020-07-07 18:30:48 +03:00
jjaffeux f92116d695 Revert "DEV: flexify post actions (#9926)"
This reverts commit 6ef0e98f4e.
2020-07-07 12:42:49 +02:00
Joffrey JAFFEUX 56475f57c5
UX: simplifies editing email templates by always having a default (#10179) 2020-07-07 11:44:13 +02:00
Joffrey JAFFEUX 9b7000dbf1
FIX: ensures category order keeps consistent (#10165)
Before this change:
- first full page load would get category defaults defined un cateory settings
- a navigation to a topic and then back to categories list would reset defaut to the ones defined in discovery/topics
2020-07-07 09:56:38 +02:00
Krzysztof Kotlarek 72861f4e1c
FIX: add table CSS rules to normalize (#10176)
* FIX: add table CSS rules to normalize

In the new version of normalize - 8.0.1 `  `table` and `td` CSS rules are missing
https://github.com/necolas/normalize.css/blob/master/normalize.css

They existed in version `3.0.1` https://github.com/necolas/normalize.css/blob/3.0.1/normalize.css#L417

Also, extracted custom rules to new file
2020-07-07 16:47:03 +10:00
Martin Brennan 280cd99c62
DEV: Add extra appEvents to composer workflow
* add composer:saved, composer:created-post, and composer:edited-post
  appEvents inside the composer controller, to make it easier to detect
  these events in plugins
2020-07-07 14:13:45 +10:00
Dan Ungureanu 556f7dc9c0
FIX: Fix race condition when resolving tag and category hashtags (#10153)
* FIX: Fix race condition when resolving tag and category hashtags

If the category hashtags were resolved first and then tag hashtags, then
the tags would overwrite the categories. Similarly, if the category
hashtags were resolved last it would overwrite even hashtags which ended
with '::tag'.

* DEV: Add test

* DEV: Fix test
2020-07-07 10:20:51 +10:00
Bianca Nenciu b9e3db6387
UX: Add link to user email preferences in admin view (#10169) 2020-07-07 10:20:14 +10:00
Joffrey JAFFEUX 6ef0e98f4e
DEV: flexify post actions (#9926)
* DEV: flexify post actions

* more tweaks
2020-07-07 10:18:01 +10:00
Kris 1f5cecaf28 Minor follow up fix to 4f12768 for mobile 2020-07-06 19:17:30 -04:00
Kris 4f12768d10 UX: Remove extra space added by img resize controls in composer preview 2020-07-06 19:11:58 -04:00
Jarek Radosz 194c962124
FIX: Do not rerender widget-dropdown on all clicks (#10100)
Because of how the dropdown was structured, as long it was in the DOM, all clicks outside the widget would rerender it.

This commit introduces `widget-dropdown-body` that handles the `clickOutside` callback and is rendered conditionally, so it won't get called when the dropdown is closed.
2020-07-06 17:04:16 +02:00
Jarek Radosz 3b51e05de2
FIX: CookText may be gone before promise resolves (#10097)
* FIX: CookText may be gone before promise resolves

Bug introduced in 293467a37a.

* DEV: Drop the window.requireModule in cook-text

It was introduced in 2017 in 232311aa8c but doesn't seem to be necessary anymore.
2020-07-06 17:03:27 +02:00
Mark VanLandingham 3792ffa556
DEV: Update method documentation in lib/computed.js (#10172) 2020-07-06 09:26:21 -05:00
Joe 6e341f1839 UX: restore table borders
Newer versions of Normalize remove the `border-collapse: collapse;` property and fallback to browser defaults. This commit restores that property because we're using it in quite a few places.
2020-07-06 21:25:41 +08:00
David Taylor 98786cb037
DEV: Refactor basic-topic-list to use topic-list-item on mobile (#10105)
Previously, basic-topic-list had its own implementation of topic-list-item on mobile, which made it more difficult to maintain and extend. The visible difference was that the basic-topic-list implementation had no large avatar on the left. This commit adds a new hideMobileAvatar parameter to topic-list-item and topic-list, and sets it to `true` for the basic-topic-list component.
2020-07-06 13:58:57 +01:00
Régis Hanol 525a2174b3
Restore 'pointer' cursor on buttons
Normalize removed their opinionated cursor styling of buttons in [4.0.1](170455d6f6).

Follow-up-to: 1fd3a30a59
2020-07-06 13:15:31 +02:00
David Taylor 5284d41a8e
FEATURE: Optionally skip the create account popup for external auth 2020-07-06 10:18:57 +01:00
David Taylor 041d28295f
UX: Hide login button during externally authenticated account creation
Also switch to use the new d-button loading property for the create account button
2020-07-06 10:18:49 +01:00
David Taylor 977766e7a8
FEATURE: sso_overrides_(email|username|name) for all auth methods
These settings previously applied only to discourse-sso. Now they work for all external authentication methods.
2020-07-06 10:18:45 +01:00
Joffrey JAFFEUX 789a15a897
DEV: allows autocomplete to be debounced (#10166)
Usage:

```
$(".foo").autocomplete({debounced: true});
```
2020-07-06 09:28:57 +02:00
Krzysztof Kotlarek 1fd3a30a59
FIX: update normalize css from 3.0.1 to 8.0.1 (#10141)
It is a second attempt to this update. First one was reverted here https://github.com/discourse/discourse/pull/8618

We noticed a problem that `like` counter had incorrect colour on mobile.

I added a missing rule to the bottom of the file (that rule existed in normalize-3 and was removed in normalize-8)

```
button,
input,
optgroup,
select,
textarea {
  color: inherit;
}
```
2020-07-06 09:09:30 +10:00
Sam Saffron a9c703c230
FIX: emoji autocomplete not triggering correctly
08044b4f regressed emoji auto complete logic since we (I) forgot to add the
space into the not capturing group at the beginning.

This meant that

`hello 👍t` would not trigger an autocomplete to pick skin tone.
2020-07-03 16:56:11 +10:00
Ahmed Gagan 04d7693355
FIX: Filter read/unread notifications on the server side (#10152)
https://meta.discourse.org/t/notifications-unread-only-filter/37621/32
2020-07-02 11:06:00 +01:00
David Taylor 95153356ea
PERF: Refactor lightbox decorator to use querySelectorAll (#10158)
Previously we were using `$elem.find(...).not($elem.find(...))`. This took approximately 2ms on my machine with a test post.

This commit switches to using a native querySelectorAll method, which takes less than 0.5ms on the same test post.
2020-07-02 11:04:19 +01:00
Kris 490939a1c9 UX: Truncate long badge names in the mobile usercard 2020-07-01 21:39:40 -04:00
Robin Ward 8bc61e84a7 FIX: Support root paths that omit the trailing slash and have QPs 2020-07-01 14:55:20 -04:00
David Taylor 76d5e54aab
PERF: Check for modal visibility in a more efficient way
This code runs on every keyup event in the application, so it needs to be efficient. Previously we were iterating over the whole document using the JQuery :visible selector. Per the JQuery docs at https://api.jquery.com/visible-selector/

> Using this selector heavily can have performance implications, as it may force the browser to re-render the page before it can determine visibility. Tracking the visibility of elements via other methods, using a class for example, can provide better performance.

We already had a `hidden` class on the modal element which we can check, so we can check that instead.
2020-07-01 17:49:23 +01:00
Mark VanLandingham 57a8b3b964
DEV: Add group name as class to group-box (#10150) 2020-06-30 10:49:31 -05:00
David Taylor 4db9f7bb73
FIX: Hide publish_read_state option from non-admin users (#10148) 2020-06-30 16:49:04 +01:00
Sam Saffron 67a310db02
FIX: emoji_autocomplete_min_chars failing when not 0
autocomplete resolving to [] was causing it to stop working.
Instead we have a special const (SKIP) which ensures it will
continue to be evaluated and only this instance is skipped.
2020-06-30 17:39:52 +10:00
Roman Rizzi 7ddd83dfcf
FIX: Uploads cannot be mapped due to the cook-text's element attr being null (#10136) 2020-06-29 15:37:40 -03:00
Joffrey JAFFEUX df1f804400
FIX: ensures moderation history is accessible from topic/post admin menu (#10118) 2020-06-24 10:49:47 +02:00
Bianca Nenciu 42226e12ee
FEATURE: Add after-user-name plugin outlet (#10113) 2020-06-24 15:45:11 +10:00
Jarek Radosz 13087cab54 FIX: Prevent typing "#" when showing "Jump to…"
Closes https://meta.discourse.org/t/the-shortcut-behaves-wrong-in-some-browsers/155531
2020-06-24 00:25:54 +02:00
Bianca Nenciu aff9bfd5bc
FIX: Fix select kit size (#10094) 2020-06-22 16:48:00 +03:00
Martin Brennan 516a03be09
FIX: Improve admin permalink UX (#10101)
The admin permalink list was a little tricky to use because the URLs are easily reduced with a ... if they are too long. This adds a copy to clipboard button for the URL and a title on hover so the full text of the URL can be seen.
2020-06-22 13:14:16 +10:00
Kris 02d3bf304a remove inaccurate comment, follow up to c028936 2020-06-19 16:49:56 -04:00
Kris c0289362f7 Safari icon fix, follow up to 5cc0369 2020-06-19 16:44:34 -04:00
Mark VanLandingham 0b58414de2
DEV: Add classes to admin customize nav items (#10092) 2020-06-19 10:51:53 -05:00
Robin Ward 4a2871f7f6
FEATURE: Don't display muted/ignored users under "who liked" (#10084)
* FEATURE: Don't display muted/ignored users under "who liked"

Previously, if you clicked on the heart icon below a post
it would show you the avatar for a user even if you ignored or muted
them.

This commit will instead display a (?) icon. The count of likes will
remain correct, but you needn't be reminded of the person you
preferred not to see.

* Use a circle instead of (?) for unknown user
2020-06-19 10:44:21 -04:00
Martin Brennan b5495b8e9c
FIX: Do not incorrectly add topic bookmark on Escape (#10088)
* The first post was showing as bookmarked incorrectly after pressing f to open the topic modal then pressing escape to cancel without saving, because the closeWithoutSaving option was not being respected.
* Also re-introduce the enter shortcut when the name input is focused to saveAndClose the bookmark modal by pressing enter.
2020-06-19 11:17:18 +10:00
Kris 5faf074e61 minor fix to post admin menu button class 2020-06-18 19:18:00 -04:00
Robin Ward 6cb6faff29 UX: Ignore modal margin was too tight 2020-06-18 13:26:25 -04:00
Joffrey JAFFEUX b8c676e727
FEATURE: allows to ignore a user forever (#10074) 2020-06-18 11:24:07 -04:00
Mark VanLandingham ec794c7f29
DEV: Plugin outlet after user-info (#10072) 2020-06-18 10:18:34 -05:00
Dan Ungureanu 62faa0f5fe
FIX: Do not show Add or Change buttons if email is not editable (#10068) 2020-06-18 11:15:44 +03:00
Penar Musaraj d72ed8c5a8
UX: Include category name in hyperlink modal results on mobile 2020-06-17 14:46:01 -04:00
Dan Ungureanu a60a67c431
FIX: Show unconfirmed emails too when checking emails (#10062)
When checking emails through user preferences, it did not display the
unconfirmed emails.
2020-06-17 21:41:01 +03:00
Jeff Wong 81a3129ffb
ARIA - add aria-label on topic input and post textarea (#10057)
Add reply form role with label as create/reply, and aria-labels on text inputs
2020-06-17 08:55:19 -07:00
Joffrey JAFFEUX 9da3a7f436
FEATURE: allows published pages to be public (#10053) 2020-06-17 12:42:20 +02:00
Jarek Radosz 7d289a4f3e
UX: Style video elements, show descriptions (#10040)
It's a stop gap – ideally we would generate a thumbnail for uploaded videos. For now, a bit of intentionality in the style and a pinch of context should do.
2020-06-17 12:38:00 +02:00
Jarek Radosz a859d507e7
FIX: Prevent producing "undefined" strings (#10042)
Fixes a bug in search-menu-results (type: "group"), where:

```javascript
const fullName = escapeExpression(group.fullName);
const name = escapeExpression(group.name);
const groupNames = [h("span.name", fullName || name)];
```

`groupNames` could end up having value "undefined" if a group doesn't have a `fullName`.
2020-06-17 12:37:06 +02:00
Faizaan Gagan d66ccabdb1
DEV: Added topic-list-after-title outlet in the mobile template (#10059) 2020-06-17 10:05:37 +01:00
Guo Xiang Tan 52580605d8 FIX: select-kit components not being hidden. 2020-06-17 09:39:51 +08:00
tshenry a3e812453e
FEATURE: new category-list-above-each-category plugin outlet (#10037) 2020-06-16 11:53:36 -07:00
Jarek Radosz df0e3b4ed4
FIX: Allow opening FAQ in a new tab (#10039) 2020-06-16 17:35:04 +02:00
Samuel Carvalho Santos ce37561e10
UX: Improve revert label in post history modal (#10038) 2020-06-16 11:31:25 -04:00
spirobel 4b4f568ec0
add showPreview to composer fields plugin outlet (#10019)
showPreview is necessary because we need to add 50% width class similar to: class="title-and-category with-preview" on the category and title div if the preview is shown.
2020-06-16 10:50:55 -04:00
Krzysztof Kotlarek 6258406419
FIX: secondary_emails, unconfirmed_emails, group_users are private fields
Those fields should be only visible to the user.
2020-06-16 12:46:27 +03:00
Penar Musaraj 298393a5bc
FIX: Keep onebox styling in edit history 2020-06-15 15:23:14 -04:00
Arpit Jalan 6780d4d70c FIX: process /invites/ route from server side only 2020-06-15 12:31:27 +05:30
Martin Brennan 35a157619a
FEATURE: Add "Now" as an option (default hidden) to the future date input selector (#10047)
Sometimes you need to schedule things from now onward. "Now" in this case is now + 1 minute. this option is hidden by default.
2020-06-15 14:06:03 +10:00
Kris 7429512ced FIX: Get correct right/left offset for topic progress bar on compose 2020-06-12 18:44:42 -04:00
Kris 16b41aa485 Save button alignment fixes for admin badge page 2020-06-12 17:15:59 -04:00
Kris 2adad96d05 Center align items in select kit headers 2020-06-12 17:07:50 -04:00
Kris d0a7f15764 Usercard buttons on mobile should utilize full width 2020-06-12 16:24:25 -04:00
Bianca Nenciu ff6811ceb8
Allow multiple groups which can vote when creating a poll (#10015)
* FEATURE: Allow multiple groups which can vote when creating a poll

* DEV: Fix select-kit deprecations

* DEV: Fix lint
2020-06-12 14:52:32 +03:00
Bianca Nenciu 60196cc192
FIX: Hide bootbox after a negative answer (#10028)
Starting to reply and then editing a post was not possible because of a
bootbox which kept showing up.
2020-06-12 13:48:45 +02:00
Penar Musaraj f57ecf22e0
UX: Send background color to iPad app too
Previously, we were only updating mobile devices.
2020-06-11 23:20:25 -04:00
Guo Xiang Tan 62ad473716
FIX: Preload readonly mode attribute seperately.
There are two problems I'm trying to tackle here.

1. The site json is cached for anonymous users so readonly mode can be
cached for up to 30 minutes which makes it confusing.

2. We've already checked for readonly mode in the controller so having
to check for readonly mode again in `SiteSerializer` is adding an extra
Redis query on every request.
2020-06-12 09:54:05 +08:00
Bianca Nenciu dd85d44dda
FIX: Show tag count for existing tags (#9892)
* FIX: Show tag count for existing tags

* Add test
2020-06-11 14:13:48 +03:00
Joffrey JAFFEUX 6fa990f05d
FIX: prevents emoji in links to appear as large emojis (#10027) 2020-06-11 12:27:48 +02:00
Sam Saffron a26b490047
FIX: present correct new/unread counts when filtered by tag
Previously we would incorrectly ignore tags.

This ensures tracking state is properly shipped to client if
show_filter_by_tag is enabled.
2020-06-11 16:47:57 +10:00
Mark VanLandingham b8acb36532
DEV: Plugin outlet at top of user preference interface (#10020) 2020-06-10 13:36:50 -05:00
Dan Ungureanu 5bfe1ee4f1
FEATURE: Improve UX support for multiple email addresses (#9691) 2020-06-10 19:11:49 +03:00
Dan Ungureanu 3a7ca97c36
FIX: Use include-subcategories filter in report export (#10007)
Some filters were renamed and the conversion of the filter names and arguments
was removed.
2020-06-10 18:57:39 +03:00
Joffrey JAFFEUX 8fe074430b
REVERT: partly revert change to ensure context is the same (#10012) 2020-06-10 11:10:39 +02:00
David Taylor 9e98c02dd7
FIX: Don't call cooked decorators in composer if cooked is unchanged
If cooked is unchanged, ember will not re-render the preview area, so we should not re-run the post-processing decorators. This can cause issues when decorateCooked functions are not idempotent.
2020-06-09 23:01:07 +01:00
Vinoth Kannan f67e7d2fad FIX: add attributes of `params` to topic `findOpts`.
If `params` is ignored then `findTopicList` won't get the `no_subcategories` attribute.

d27b877a40
2020-06-10 01:33:58 +05:30
Joffrey JAFFEUX 43e17f92e0
DEV: allows to call a widget function without re-rendering the widget (#10004) 2020-06-09 19:58:17 +02:00
Joffrey JAFFEUX 84d767716f
linting (#10008) 2020-06-09 19:54:06 +02:00
Joffrey JAFFEUX a3cf1cf6ff
DEV: allows to prepend widgets to post nav controls (#10005)
Co-authored-by: Régis Hanol <regis@hanol.fr>
2020-06-09 19:37:06 +02:00
Joffrey JAFFEUX 23ed16339f
DEV: adds mouse{Over,Out} and touch{Start,End} to widgets (#10003) 2020-06-09 19:36:28 +02:00
Joe 415c1bb9e1 FIX: don't show create topic suggestion to users who can't
Users with TL below the "min trust to create topic" setting used to see a prompt to create new topics in the footer message below the topic list. Those topics would never be submitted because those users don't meet the TL requirements to create a new topic (based on that site setting). This PR removes that prompt for those users.
2020-06-10 00:02:11 +08:00
Arpit Jalan 3094459cd9
FEATURE: multiple use invite links (#9813) 2020-06-09 20:49:32 +05:30
David Taylor f1fc6cd40d
DEV: Add user-card-additional-buttons plugin outlet
The user-card-additional-controls outlet is outside the `<li>` element, which makes styling difficult. Placing an outlet inside the button list means that themes/plugins can easily reuse core styling.
2020-06-09 14:33:24 +01:00
Sam Saffron 08044b4f94
FIX: emoji autocomplete triggering incorrectly
Previous to this fix the we were checking for non letters.

This was mismatching what pretty-text/addon/emoji.js was doing.

`ù:su`

and

`1:su`

Would lead to an emoji autocomplete popup in the composer.
2020-06-09 17:22:51 +10:00
Martin Brennan 3e210b76d9 FIX: Change bookmark name "name" attr to disable autocomplete 2020-06-09 14:47:30 +10:00
Kris d09bf892c7 UX: Improve layout of topic pin admin modal 2020-06-08 23:58:53 -04:00
Penar Musaraj c5b1f028ed
FIX: update minimum required tag when switching categories in composer 2020-06-08 17:10:26 -04:00
Kris fbeaba4acf FIX: don't override category text color in dropdown 2020-06-08 16:45:30 -04:00
Penar Musaraj bdba17cdf7
FIX: Restore stream position in safari (#9993)
Safari uses an aggressive back/forward cache, which means the app loads
very quickly when hitting Back. But, in topics with > 30 posts, hitting
Back runs post stream calculations too early, which means that users
get taken back to an earlier point in the stream, consistently.

Using `onpageshow`, we can restore the correct location before the post
stream calculations take place.
2020-06-08 10:13:46 -04:00
Joffrey JAFFEUX cb13152a43
FIX: ensures edit-category-setting is correctly casting boolean (#9999) 2020-06-08 15:16:42 +02:00
David Taylor 833b5d89e0
PERF: Cache PrettyText instance for rendering composer preview (#9987)
Previously we were building pretty-text from scratch on every keypress
2020-06-08 10:42:59 +01:00
David Taylor 293467a37a
REFACTOR: Remove jquery usage from resolveAllShortUrls, and fix debounce
- This function now requires an explicit scope. It will never run on the entire document.

- Previously debounce was being used with an anonymous function, which means it was having no effect.
2020-06-05 17:15:14 +01:00