Commit Graph

14715 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
d827430ea6
FIX: prevents expand post to trigger page routing (#8982) 2020-02-17 10:06:38 +01:00
Kris
cd5b7109d0 UX: Cap height of user fields on mobile user-cards, add line-clamp mixin 2020-02-14 16:19:11 -05:00
Kris
f81bebf93f UX: Cap staff action detail height 2020-02-14 14:23:31 -05:00
Kris
103af2dcce FIX: Toolbar menu specificity 2020-02-14 13:44:38 -05:00
Roman Rizzi
99305511bc
DEV: Remove unused BreakString class (#8942) 2020-02-14 15:32:59 -03:00
Robin Ward
92bb7b9269 FIX: Username mentions lost styling 2020-02-14 13:02:56 -05:00
Robin Ward
d51107e2c9 FIX: If a group is unmentionable, don't render it as mentionable
Now if a group is visible but unmentionable, users can search for it
when composing by typing with `@`, but it will be rendered without the
grey background color.

It will also no longer pop up a JIT warning saying "You are about to
mention X people" because the group will not be mentioned.
2020-02-14 12:29:56 -05:00
Penar Musaraj
ea0f20e331 DEV: Concatenate value-list choices array
Followup to 89d9704194
2020-02-14 11:33:17 -05:00
Penar Musaraj
89d9704194 FIX: value-list choices when removing a value
Fixes an issue where choices were broken when removing an item from the value-list component.

Adds test case for this scenario.
2020-02-14 11:21:06 -05:00
Joffrey JAFFEUX
7d94de6439
FIX: brings back castInteger as a safer migration path for sk2 (#8966) 2020-02-14 10:00:39 +01:00
Vinoth Kannan
38dd184a16 FIX: update Site.top_tags in "categories" route if topic list available.
Else it is not updating the tags dropdown while navigate between the category pages.
2020-02-14 09:53:41 +05:30
Joffrey JAFFEUX
149196b9ce
FIX: displays selection text when no default_notification_level is set (#8962) 2020-02-13 23:45:03 +01:00
Joffrey JAFFEUX
6405159484
FEATURE: adds a new plugin api to decorate plugin outlets (#8937)
```
api.decoratePluginOutlet(
  "discovery-list-container-top",
  elem => {
    if (elem.classList.contains("foo")) {
      elem.style.backgroundColor = "yellow";
    }
  }
);
```
2020-02-13 23:44:34 +01:00
Gerhard Schlager
a7efca1fa9 DEV: Remove unused "search help" 2020-02-13 18:31:21 +01:00
David Taylor
8d50f092b5
DEV: Use classes for styling user and group cards (#8913)
Styling based on element-ids, it is impossible for themes/plugins to display multiple cards on a single page. Using classes is a more flexible approach. The element-ids are maintained for backwards compatibility with existing plugins/themes.
2020-02-13 09:58:17 +00:00
Joffrey JAFFEUX
3875785dcc
FIX: ensures shortcuts work correctly with topic-notifications-button (#8956) 2020-02-13 10:01:28 +01:00
Joffrey JAFFEUX
42bda52486
FIX: ensures select-kit can select a row with 0 as value (#8955) 2020-02-13 09:04:32 +01:00
Martin Brennan
e1e74abd4f
FEATURE: Improving bookmarks part 2 -- Topic Bookmarking (#8954)
### UI Changes

If `SiteSetting.enable_bookmarks_with_reminders` is enabled:

* Clicking "Bookmark" on a topic will create a new Bookmark record instead of a post + user action
* Clicking "Clear Bookmarks" on a topic will delete all the new Bookmark records on a topic
* The topic bookmark buttons control the post bookmark flags correctly and vice-versa
Disabled selecting the "reminder type" for bookmarks in the UI because the backend functionality is not done yet (of sending users notifications etc.)

### Other Changes

* Added delete bookmark route (but no UI yet)
* Added a rake task to sync the old PostAction bookmarks to the new Bookmark table, which can be run as many times as we want for a site (it will not create duplicates).
2020-02-13 16:26:02 +10:00
Kris
e7c4ebc6d5 Fix styling for topic count in category chooser 2020-02-12 22:19:00 -05:00
Penar Musaraj
efa9ba4975
UX: Prevent category-drop topic count from wrapping to new line (#8943) 2020-02-12 14:34:16 -05:00
Artem Vasiliev
c36ae17260
FEATURE: export defaultRenderTag function (#8941)
* FEATURE: export defaultRenderTag function

This can be helpful for plugins e.g. when combined with replaceTagRenderer: a plugin may want to customize rendering for some tags and let others be rendered with default code

* refactor: don't change version

..as per review comment, https://github.com/discourse/discourse/pull/8941#discussion_r378406809
2020-02-12 14:26:04 -05:00
Penar Musaraj
a791b67e66 UX: Use border-box sizing on SK2 dropdowns 2020-02-12 14:14:36 -05:00
Arpit Jalan
3bcd1485f7 UX: show all parent categories for destination topic 2020-02-13 00:34:02 +05:30
Vinoth Kannan
9c96511ec4 FIX: use plain text if available instead of image upload.
Previously, while pasting from Excel 365 it uploaded a table image instead of markdown table.
2020-02-12 23:13:51 +05:30
Penar Musaraj
52fe5b938c FIX: Regression with wizard canvas elements 2020-02-12 12:31:15 -05:00
Dan Ungureanu
67c9940d72
FIX: Avoid highlight mention to groups that are not public.
Follow-up to 3f50481188.
2020-02-12 13:04:40 +02:00
Dan Ungureanu
ec40242b5c
FIX: Make inline oneboxes work with secured topics in secured contexts (#8895) 2020-02-12 12:11:28 +02:00
David Taylor
d7d4612b2d
FIX: Subfolder sites rewriting URLs to root domain on initial load (#8932)
The `DiscourseLocation.initState` function was accidently renamed in 0431942f (select-kit-2) to `initOptions`. This means that the ember router does not automatically call the function after the router is initialized.

For a long time, we have been calling the `initState` function in the `init` function of discourse-location, which caused an imperceptible URL change to the the root domain, before switching back to the correct subfolder URL when ember called `initState`. This commit removes that call from the initializer, so `initState` is only called once (by ember).

Relevant ember code: https://github.com/emberjs/ember.js/blob/v3.12.2/packages/@ember/-internals/routing/lib/system/router.ts#L695-L699
2020-02-12 09:36:46 +00:00
Joffrey JAFFEUX
47f255f62c
FIX: date was not mutated when changing it in change-timestamp modal (#8935) 2020-02-12 09:12:36 +01:00
Dan Ungureanu
3f50481188
Improvements to group mentions (#8927)
* FIX: Avoid highlight mention to groups that are not public
* UX: Composer autocomplete will suggest all visible group names
2020-02-12 10:11:10 +02:00
Joffrey JAFFEUX
fc3d547268
UX: do not enlarge emojis in polls (#8934) 2020-02-12 08:37:32 +01:00
Arpit Jalan
7ef754759e UX: show destination topic status when moving post(s) to an existing topic 2020-02-12 11:32:40 +05:30
Kris
d73e94bbeb UX: Update mobile site setting slide-out nav for RTL 2020-02-11 15:23:12 -05:00
Joffrey JAFFEUX
adbff5835d
FIX: correctly excludes current user in user-chooser (#8928) 2020-02-11 20:41:18 +01:00
Mark VanLandingham
3e89774908
DEV: Use .hbr for raw template file extension (#8883) 2020-02-11 13:38:12 -06:00
Joffrey JAFFEUX
78a0ca53bf
FIX: makes user-selector use real booleans (#8909) 2020-02-11 20:20:12 +01:00
Kris
567b7263fd UX: mobile layout fix for claimable reviewables 2020-02-11 14:18:42 -05:00
Penar Musaraj
30b7006ca2 DEV: Eliminate "post bounce" after creating a post
Fix has two parts:
a) skips jumping to post if post is in view
b) debounces layout calculation when composer changes state
2020-02-11 14:04:46 -05:00
Dan Ungureanu
ecaf2c2f4e
FIX: Make category slug validation less strict (#8915)
This was changed recently and caused issues saving old categories which
already had digits at the beginning of the slug (for example, '30-days').
2020-02-11 17:01:12 +02:00
Joffrey JAFFEUX
902d0e1e3a
DEV: enforces no-invalid-interactive linting rule (#8907) 2020-02-11 15:55:16 +01:00
Joffrey JAFFEUX
9d50e1b40f
DEV: introducing user-chooser (#8910) 2020-02-11 15:54:56 +01:00
Martin Brennan
7ff58f1787
FIX: Disable preloading audio + video when secure media enabled (#8922)
Meta topic: https://meta.discourse.org/t/secure-media-uploads-expire/140894

This fixes the issue where if secure media was enabled, audio
and video files would do an initial load using the presigned
URL for the media to get metadata information e.g. duration of
track/video. However this started the expiry countdown for the
URL, so when a user pressed play on the media after 15 seconds
the media would be expired and AWS would return a 403 error.

We do not preload media if secure media is enabled. Otherwise
we just set the preload type to "metadata" which is the browser
default anyway.
2020-02-11 11:49:58 +10:00
Kris
c60182cdb2 UX: Prevent new badge from being orphaned on mobile 2020-02-10 13:48:47 -05:00
Penar Musaraj
8009d7bda2
FEATURE: Support video caption tags/attributes (#8914) 2020-02-10 13:37:32 -05:00
Kris
38011c1d2d login/signup table shouldn't have border on tbody 2020-02-10 11:16:03 -05:00
Joffrey JAFFEUX
0d6578dc4d FIX: makes tag-{info,list} more specific to avoid styling other elements (#8902) 2020-02-10 08:41:38 +01:00
Joffrey JAFFEUX
0d9b99582d DEV: enforces table-groups linting rule (#8903) 2020-02-10 08:14:26 +01:00
Joffrey JAFFEUX
99ad2e408a DEV: enforces style-concatenation linting rule (#8888) 2020-02-10 08:13:50 +01:00
Joffrey JAFFEUX
f5f4ce90c1 DEV: adds afterRender decorator (#8864) 2020-02-10 08:13:13 +01:00
Jordan Vidrine
e3c3c88ab5 REFACOR: Closing Tag Changes
- a,td, and if closing tag locations for ShowLikes / ShowOpLikes
2020-02-07 10:54:45 -06:00
Bianca Nenciu
88a4d5a2c1
FIX: Properly convert quotes to Markdown (#8808)
* FIX: Properly convert quotes to Markdown

When quoting a quote it used to convert the quote header, including the
user avatar and username, into a image and some text and then the
contents. This also caused issues when quoting full paragraphs (or when
selecting paragraphs by triple-clicking) because the user avatar and
name from the following quote would also be included.

This commit implements the support necessary to convert
<aside class="quote"> elements to proper Discourse quotes.
2020-02-07 16:25:23 +01:00
David Taylor
6f3952e7f1 DEV: Include the authOptions variable in create-account outlet 2020-02-07 14:01:04 +00:00
David Taylor
bc1977ef93 UX: Always disable create account button when user fields are invalid
Previously the button would never be disabled when an external authenticator was being used. The validation error would only appear after submit
2020-02-07 13:20:50 +00:00
Joffrey JAFFEUX
252989e261
DEV: better detection of new item (#8889) 2020-02-07 14:12:17 +01:00
Joffrey JAFFEUX
a0bf2ac313
DEV: applies valueAttribute deprecation when null (#8887) 2020-02-07 10:39:39 +01:00
Joffrey JAFFEUX
d86ed028c7
FIX: ensure s2 is working with wizard (#8886) 2020-02-07 10:00:39 +01:00
Joffrey JAFFEUX
928e011140
FIX: prevents ac wrap to overflow on group-add-member modal (#8882) 2020-02-06 20:47:53 +01:00
Joffrey JAFFEUX
20944e69e4
FEATURE: adds trust_level_growth report (#8878) 2020-02-06 19:44:30 +01:00
Joffrey JAFFEUX
dafd3c3b47
DEV: enforces no self-closing-void-elements (#8879) 2020-02-06 17:26:06 +01:00
Dan Ungureanu
2a884e25be
DEV: Make image resize controls more resilient (#8867)
Commit aa24be1 made it possible to build data attributes from image's
Markdown and this changes ensure that the resize controls still work
when data attributes are present.
2020-02-06 17:19:24 +02:00
Joffrey JAFFEUX
f25e787ae2
FIX: ensures we have a proper component name (#8876) 2020-02-06 11:30:38 +01:00
Joffrey JAFFEUX
8ca9ad887d
FIX: replaces fake null value by clearable option (#8875) 2020-02-06 08:30:26 +01:00
Dan Ungureanu
2240b1681b
FIX: Show detailed error messages for category pages. (#8832) 2020-02-06 15:32:12 +11:00
Martin Brennan
697d4720df
DEV: Add DEBUG_PRELOADED_APP_DATA to log pre-loaded JSON in development (#8873)
Extracted from #8772

This will allow developers (in rails development mode only) to log pre-loaded JSON app data to the browser console for inspection.
2020-02-06 13:14:33 +10:00
Neil Lalonde
542e62ccf0 FIX: tag info misleading message saying it's not restricted
When a tag is restricted to a secured category that the user can't see,
the message was saying that it wasn't restricted to any categories.
Now it will say it's restricted to categories you can't access.
2020-02-05 15:23:39 -05:00
Osama Sayegh
6f52bbefb8
DEV: Use scheduleOnce correctly (#8865)
* DEV: Use scheduleOnce correctly

* remove jquery usage here
2020-02-05 21:21:00 +03:00
Mark VanLandingham
49c750ca78
FIX: Opening new topic draft never creates post (#8828) 2020-02-05 11:17:58 -06:00
Joffrey JAFFEUX
6bee972a5c
FIX: corrects min/max logic for mini-tag-chooser (#8871) 2020-02-05 17:47:20 +01:00
Penar Musaraj
6253ddc74e DEV: Do not trigger missing icon warning in icon picker 2020-02-05 11:39:46 -05:00
Mark VanLandingham
499b57a9ed
DEV: Ember linting - disallow Ember.* variable usage (#8782) 2020-02-05 10:14:42 -06:00
Joffrey JAFFEUX
98303ee645
FIX: simplify maximum/minimum logic in sk2 to avoid chicken/egg (#8868) 2020-02-05 16:01:58 +01:00
Jarek Radosz
be42b87338
FIX: Allow submitting various forms via keyboard (#8866) 2020-02-05 15:23:35 +01:00
Jarek Radosz
53529a3427
DEV: Upgrade Ember to version 3.12.2 (#8753)
* DEV: Use Ember 3.12.2
* Add Ember version to ThemeField's DEPENDENT_CONSTANTS
* DEV: Use `id` instead of `elementId` (See: https://github.com/emberjs/ember.js/issues/18147)
* FIX: Don't leak event listeners (bug introduced in 999e2ff)
2020-02-05 14:51:00 +01:00
Joffrey JAFFEUX
d7dffbb13c
UX: caches icon picker full icon's list (#8862) 2020-02-05 09:22:11 +01:00
Joffrey JAFFEUX
a9f1652131
REFACTOR: querySelector instead of querySelectorAll to get first node (#8861) 2020-02-05 08:49:02 +01:00
Osama Sayegh
a6da0bb1ef
UX: Remove subtle render delay with timeline notification button (#8860) 2020-02-05 18:35:47 +11:00
Sam Saffron
0d6839e8a8 UX: adjust algorithm for picking notification count
Our current algorithm for picking the number of notifications to display
when expanding the notifications relies on magic numbers.

Previously we only allowed for header and an estimate of maximum height of
notification container, this is not ideal as there is padding at the bottom
and top of the notification container

This adds a special number for padding.

The longer term fix though is to render the notification panel off screen
then grab the correct count, finally adding it back into view with.

This would allow for large fonts, small fonts, custom themes and much more.
2020-02-05 16:03:44 +11:00
Sam Saffron
15b27f28aa UX: Topic progress bar should not flash on desktop
Followup on 78725f50

This makes the change a bit safer in case .d-header is not to be found due
to a customization.
2020-02-05 15:36:39 +11:00
Sam Saffron
78725f5081 Revert "FIX: Topic progress bar shouldn't show up on desktop (#8854)"
This reverts commit 7133fd8c89.

Unfortunately performCheckSize may have certain situations in topic
navigation where it is unsafe to call.

We need to add som more safety here prior to merging.
2020-02-05 15:22:44 +11:00
Osama Sayegh
7133fd8c89
FIX: Topic progress bar shouldn't show up on desktop (#8854) 2020-02-05 15:19:20 +11:00
Joffrey JAFFEUX
f0fe2ba9ac
UX: introduces icon-picker component for badges (#8844) 2020-02-05 00:41:10 +01:00
Joffrey JAFFEUX
666a4be888
UX: prevents mini tag chooser header to wrap (#8858) 2020-02-04 23:55:50 +01:00
Joffrey JAFFEUX
7fd5a8db72
UX: adds arrow navigation support to mini-tag-chooser (#8857) 2020-02-04 23:54:59 +01:00
Joffrey JAFFEUX
9252bbbd7d
FIX: prevents firefox to generate a click event on space (#8856) 2020-02-04 23:41:40 +01:00
Kris
7ac81a6019 UX: Center titles in docked header when there aren't two rows 2020-02-04 13:40:28 -05:00
Joffrey JAFFEUX
2c2ab474a4
FIX: ensures tags-admin-dropdown is working correctly with sk2 (#8852) 2020-02-04 19:23:44 +01:00
Kris
35a1912e2d FIX: Links in category box descriptions should be clickable 2020-02-04 13:02:55 -05:00
David Taylor
fec1c0f097
DEV: Handle null notification level when generating data attribute (#8851)
This happens in tests, but handling it properly will make the production code more robust. Followup to ebdebf152d
2020-02-04 17:05:49 +00:00
Penar Musaraj
095e3d8946 DEV: Autofilter combo boxes on 10+ dropdown items by default 2020-02-04 11:23:15 -05:00
David Taylor
ebdebf152d DEV: Use a string for category data-notification-level, not an integer
This makes writing CSS to target specific notification levels more intuitive. Follow-up to 7640914552
2020-02-04 16:05:45 +00:00
Vinoth Kannan
dabba87954 DEV: introduce diffLocalChangesUrl attribute to theme model. 2020-02-04 21:33:19 +05:30
Mark VanLandingham
c8a02161dd
FIX: Warn users of overwriting new topic draft (#8841) 2020-02-04 09:59:56 -06:00
Mark VanLandingham
91b70f8ffc
FIX: Featured topic title on profile HTML parsed (#8850) 2020-02-04 09:33:46 -06:00
Joffrey JAFFEUX
14126e9a38
UX: do not display pinned option description on mobile (#8846) 2020-02-04 15:34:56 +01:00
Joffrey JAFFEUX
ca63502ce6
UX: ensures pinned options icon is not on a new line (#8845) 2020-02-04 15:34:37 +01:00
Joffrey JAFFEUX
1d54e78311
FIX: prevents exception on /admin/badges page when model is not set (#8849)
Exception:

TypeError: Cannot read property 'badge_type_id' of null
2020-02-04 15:34:19 +01:00
Joffrey JAFFEUX
5d31f353f4
remove duplicated }} (#8848) 2020-02-04 15:02:40 +01:00
Jarek Radosz
67d5ce8ed1
FIX: Sort out the route navigation in admin/email-style (#8837)
Previously it would go to the "html" page when refreshing on the "css" page, and would open an invalid empty-state page when trying to go to the "email style" tab when already on it.
2020-02-04 11:42:43 +01:00
Jarek Radosz
4ab696dd2f
DEV: Add the @action decorator (#8836)
This also enables`@action` use in plugin connectors.

Setting `actions` earlier allows `setupComponents` to use them, for example, when setting up event listeners.
2020-02-04 11:42:25 +01:00
Jarek Radosz
9a52a44d09
DEV: Add outlet args to editor-preview outlet (#8835)
Those are the same arguments that are passed into `after-d-editor` outlet. This will enable plugins that attach to editor preview to be conditionally enabled, usually only for the composer.
Plugins that will use this: discourse-canned-responses, discourse-zoom.
2020-02-04 11:41:45 +01:00
Vinoth Kannan
e4f3244141 DEV: introduce updateUrl attribute to theme-setting-editor component. 2020-02-04 15:19:17 +05:30
Robin Ward
ee17138c0f FIX: Better error messages when name is too long
Previously you'd get a server side generic error due to a password check
failing. Now the input element has a maxlength attribute and the server
side will respond with a nicer error message if the value is too long.
2020-02-03 14:14:32 -05:00
Penar Musaraj
375f4c09ce FIX: Restore up/down icons in period-chooser 2020-02-03 13:56:58 -05:00
David Taylor
7640914552
UX: Include muted categories on the category page by default (#8842)
* DEV: Add data-notification-level attribute to category UI

* Show muted categories on the category page by default

This reverts commit ed9c21e42c.

* Remove redundant spec - muted categories are now visible by default
2020-02-03 10:40:02 -08:00
Penar Musaraj
6301477b4c FIX: Make dropdown custom user fields compatible with select-kit 2 2020-02-03 13:19:38 -05:00
Penar Musaraj
231617ff70 DEV: Rename deprecated "warning" icon to "exclamation-triangle" 2020-02-03 10:43:05 -05:00
Joffrey JAFFEUX
0431942f3d
DEV: select-kit 2 (#7998)
This new iteration of select-kit focuses on following best principales and disallowing mutations inside select-kit components. A best effort has been made to avoid breaking changes, however if you content was a flat array, eg: ["foo", "bar"] You will need to set valueProperty=null and nameProperty=null on the component.

Also almost every component should have an `onChange` handler now to decide what to do with the updated data. **select-kit will not mutate your data by itself anymore**
2020-02-03 14:22:14 +01:00
Arpit Jalan
0e2cbee339 UX: add icon for Google Map onebox. 2020-02-03 18:12:42 +05:30
Penar Musaraj
999e2ff514
UX: Show vertical topic timeline while composing (#8813)
Keeps topic timeline visible if space permits when composing, and adjusts its height dynamically.
2020-01-30 13:52:48 -05:00
Dan Ungureanu
e470b27b41
FIX: Ensure 'unless' helper resolves variable name once (#8820)
This fixes a bug which caused '{{#unless var}}' to act the same as
'{{#if true}}' because 'unless' was transforming the conditional value
to 'undefined'.
2020-01-30 18:41:39 +02:00
Rafael dos Santos Silva
f15264e977 FEATURE: Add Tactile feedback on likes 2020-01-30 12:01:52 -03:00
Roman Rizzi
2ee6a615b7
FEATURE: Send suspect users to the review queue (#8811) 2020-01-29 15:38:27 -03:00
Kris
d24d47b2ee
FIX: set showFooter to true on group topic list (#8795)
If using {{#if showFooter}} in a template, showFooter is never set to true on a group's g/groupname/activity/topics route (it's correctly set on other group routes like group-activity-posts)
2020-01-29 12:12:38 -05:00
Joffrey JAFFEUX
e19459185a
DEV: new widget hooks mousemove/mouseup/mousedown/doubleclick (#8807) 2020-01-29 17:19:12 +01:00
Mark VanLandingham
e29fef9e99
FEATURE: Users can feature any public topic on his/her profile (#8809) 2020-01-29 10:10:23 -06:00
Martin Brennan
397adfd128
FIX: Wrap markdown videos with video-container class to stop post height jumping (#8806)
This will lock video aspect ratio to 16:9 and stop them from making posts jump around on load.

See also discourse/onebox@6f58545 and fe20cb4.
2020-01-29 15:52:02 +10:00
David Taylor
25fd2b544a
PERF: Use a separate route for user cards, and split user serializer (#8789)
Adds a new route `/u/{username}/card.json`, which has a reduced number of fields. This change is behind a hidden site setting, so we can test compatibility before rolling out.
2020-01-28 11:55:46 +00:00
Mark VanLandingham
9fa2016d2a
DEV: Plugin outlet for admin backup view (#8793) 2020-01-27 12:31:08 -06:00
David Taylor
fe0d912b97
FIX: getURL on a subfolder site should ignore prefix in middle of URL (#8794) 2020-01-27 17:51:46 +00:00
Rafael dos Santos Silva
ce83fd93bb FEATURE: Use Contact Picker API for invites 2020-01-27 11:07:28 -03:00
Jarek Radosz
8a82ceb3bc
FIX: Improve downsize_uploads (#8409)
With this change the script:
* Actually removes original large-sized images
* Doesn't save processed files if their size has increased
* Prevents inconsistent state
2020-01-27 03:31:11 +01:00
Jarek Radosz
b843aa7b05
FIX: Adjust the broken image placeholder border (#8781)
* DEV: Remove `.large-image` selector

This selector is no longer used in core and there's no reference to it in any of `all-the-plugins`.

* FIX: Adjust the broken image placeholder border
2020-01-27 02:39:05 +01:00
Vinoth Kannan
e4b8121650 Fix the build.
Make prettier happy.
2020-01-24 04:39:07 +05:30
Vinoth Kannan
26186ee6af FIX: topics sorting in tag pages is broken. 2020-01-24 04:26:14 +05:30
Roman Rizzi
9eb622985a
FEATURE: Replace existing badge owners when using the bulk award feature (#8770)
* FEATURE: Replace existing badge owners when using the bulk award feature

* Use ActiveRecord to sanitize title update query, Change replace checkbox text

Co-Authored-By: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-01-23 14:14:58 -03:00
Dan Ungureanu
6279d0e8b5 UX: Use '-' as default category slug (#8607)
This replaces the default slug from 'ID-category' to '-'.
2020-01-23 15:44:29 +01:00
Martin Brennan
65481858c2
FEATURE: Use upload:// short URL for videos and audio in composer (#8760)
For consistency this PR introduces using custom markdown and short upload:// URLs for video and audio uploads, rather than just treating them as links and relying on the oneboxer. The markdown syntax for videos is ![file text|video](upload://123456.mp4) and for audio it is ![file text|audio](upload://123456.mp3).

This is achieved in discourse-markdown-it by modifying the rules for images in mardown-it via md.renderer.rules.image. We return HTML instead of the token when we encounter audio or video after | and the preview renders that HTML. Also when uploading an audio or video file we insert the relevant markdown into the composer.
2020-01-23 09:41:39 +10:00
Mark VanLandingham
c5eec19368
FIX: Featuring topic on other users profile shows their topics (#8769) 2020-01-22 14:16:17 -06:00
Dan Ungureanu
c7a8bbd6a5
FIX: Show category list on subcategory page if it has subcategories too (#8768)
The category list was displayed only for top level categories, which
had no parent.
2020-01-22 20:27:30 +02:00
Neil Lalonde
b63d146128 UX: add confirmation when adding tag synonyms
The new confirmation modal explains that adding a tag as a synonym to
another tag will change all topics to replace the synonyms with the
base tag.
2020-01-22 12:35:42 -05:00
Dan Ungureanu
b25d9e96c1
FIX: Show all parent categories on topic page (#8767) 2020-01-22 17:39:50 +02:00
Bianca Nenciu
7b7e1717f2
FIX: Quoting a quote preserves the original post information (#8746)
Let's say post #2 quotes post number #1. If a user decides to quote the
quote in post #2, it should keep the information of post #1
("user_1, post: 1, topic: X"), instead of replacing with current post
info ("user_2, post: 2, topic: X").
2020-01-22 16:10:23 +02:00
Dan Ungureanu
89bd7ba45f
FIX: Use new tag routes (#8683)
Commit 1fb7a62 added unambiguous routes for tags. This commit ensures
that the new routes are used.
2020-01-21 19:23:08 +02:00
Bianca Nenciu
9c628f0897
FIX: Workaround limitation in jquery.autoellipsis (#8747)
Calling $.ellipsis() on an element containing <br> elements would throw
an exception.
2020-01-21 18:44:50 +02:00
Bianca Nenciu
0a27086764
FEATURE: Export all types of reports (#8748)
There is a single stacked_chart which was not exportable
2020-01-21 18:43:19 +02:00
Kris
411512c0e3 FIX: higher z-index for usercards in the header 2020-01-21 10:57:32 -05:00
David Taylor
84a2aae77f
FIX: Allow the app to generate and accept longer backup codes (#8761)
- Increase size of textarea when displaying generated codes
- Adjust maxlength of input field in JS UI
- Adjust maxlength of input field in no_ember UI

Follow-up to bff9880d63
2020-01-21 14:28:31 +00:00
Dan Ungureanu
eeefa1177f
FIX: Make category-chooser show all parent categories (#8706) 2020-01-19 13:07:54 +02:00
Gerhard Schlager
3fc589f875 FIX: Don't override timezone on every visit of profile preferences
The timezone should only be initialized when there is no timezone stored in the DB yet. This also fixes an error that happened in dev mode whenever you switch between user preference tabs.
2020-01-17 22:34:18 +01:00
romanrizzi
0d08eac1c7 UX: Users must confirm when leaving a private group 2020-01-17 17:58:47 -03:00
Kris
4089607b40 UX: Minor adjustments to choose topic modal 2020-01-17 15:02:04 -05:00
Joffrey JAFFEUX
a7ae28ed88
REFACTOR: removes places where we never show glyph and DRY code (#8744) 2020-01-17 20:58:15 +01:00
Kris
b56ade5043 FIX: show PM icon in docked header 2020-01-17 13:30:54 -05:00
Joffrey JAFFEUX
6abc2f5072
FIX: applies correct styles to icon and attempts to dry code (#8739) 2020-01-17 18:20:23 +01:00
Joffrey JAFFEUX
56fa77c032
FIX: do not increase size of emojis in markdown tables (#8742) 2020-01-17 18:15:05 +01:00
Joffrey JAFFEUX
3b5a6c9895
REFACTOR: unify naming of only emoji (#8741) 2020-01-17 17:21:08 +01:00
Kris
af3dce4930 Hide PM glyph, follow-up to 02dbcac 2020-01-17 07:10:44 -05:00
Dan Ungureanu
7d8c33a094 FIX: Include sub-sub-categories in new/unread counts (#8710)
The count used to be less than the real one because the topics in
sub-sub-categories and deeper were not taken into account.
2020-01-17 10:02:57 +00:00
Kris
02dbcac861 UX: Improve appearance of pm title editing 2020-01-16 21:31:17 -05:00
Jarek Radosz
fe588cc7f8
DEV: Fix function prototype deprecations (#8681)
* DEV: Fix the function prototype observers deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.observes('foo') to observer('foo', function() {}). [deprecation id: function-prototype-extensions.observes] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-observes for more details.

* DEV: Fix the function prototype event listeners deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.on('foo') to on('foo', function() {}). [deprecation id: function-prototype-extensions.on] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on for more details.

* DEV: Simplify `default as` imports

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-01-16 18:56:53 +01:00
Jarek Radosz
ff5a82b614
FIX: Change rootNone behavior in category-chooser (#8692)
This breaking change was originally a deprecation fix for overriding a computed property `none`.

There are 4 uses of `rootNone` in core and "all-the-plugins":
1. in discourse-chat-integration, admin-plugins-chat-edit-rule.hbs - changed behavior, that I'd consider a fix - `rootNoneLabel` is now used regardless of `siteSettings.allow_uncategorized_topics` value, which I believe was an originally intended behavior (i.e. it most likely hasn't been tested with disabled uncategorized topics)
2. in discourse-slack-official, plugins-slack.hbs - the same as 1.
3. in core, edit-category-general.hbs (in this PR) - no change in behavior
4. in discourse-googlebooks, edit-category-general.hbs - no change in behavior (since `allowUncategorized="true"` is also passed as an argument)
2020-01-16 18:51:29 +01:00
Joffrey JAFFEUX
948bd00340
FEATURE: line with only 1 to 3 emojis will now display as large emojis 2020-01-16 09:54:26 +01:00
Martin Brennan
18bba860b5 Fix mobile topic-timeline not closing on scrolling past last post (#8730)
* when we dragged the topic-timeline handle past the last post
  in a topic we were not closing the timeline as we would if
  scrolling to a specific post
* this also fixes the issue where when scrolling past the end of
  the topic with a massive last post, none of the post could be
  seen
2020-01-16 17:23:44 +11:00
Martin Brennan
7c32411881
FEATURE: Secure media allowing duplicated uploads with category-level privacy and post-based access rules (#8664)
### General Changes and Duplication

* We now consider a post `with_secure_media?` if it is in a read-restricted category.
* When uploading we now set an upload's secure status straight away.
* When uploading if `SiteSetting.secure_media` is enabled, we do not check to see if the upload already exists using the `sha1` digest of the upload. The `sha1` column of the upload is filled with a `SecureRandom.hex(20)` value which is the same length as `Upload::SHA1_LENGTH`. The `original_sha1` column is filled with the _real_ sha1 digest of the file. 
* Whether an upload `should_be_secure?` is now determined by whether the `access_control_post` is `with_secure_media?` (if there is no access control post then we leave the secure status as is).
* When serializing the upload, we now cook the URL if the upload is secure. This is so it shows up correctly in the composer preview, because we set secure status on upload.

### Viewing Secure Media

* The secure-media-upload URL will take the post that the upload is attached to into account via `Guardian.can_see?` for access permissions
* If there is no `access_control_post` then we just deliver the media. This should be a rare occurrance and shouldn't cause issues as the `access_control_post` is set when `link_post_uploads` is called via `CookedPostProcessor`

### Removed

We no longer do any of these because we do not reuse uploads by sha1 if secure media is enabled.

* We no longer have a way to prevent cross-posting of a secure upload from a private context to a public context.
* We no longer have to set `secure: false` for uploads when uploading for a theme component.
2020-01-16 13:50:27 +10:00
Mark VanLandingham
135d09d671
FIX: Styling for feature topic on profile modal (#8727) 2020-01-15 15:20:12 -06:00
Arpit Jalan
0bc65fa60e
FIX: show error message if the topic deletion fails (#8723) 2020-01-16 00:58:03 +05:30
Roman Rizzi
2db7b3d9c7
FIX: Correctly wrap image and resize controls inside paragraph (#8718) 2020-01-15 14:01:14 -03:00
Régis Hanol
c4817e9ee9 DEV: lint 💅 2020-01-15 11:36:33 +01:00
Martin Brennan
66f2db4ea4 SECURITY: 2FA with U2F / TOTP 2020-01-15 11:27:12 +01:00
Joffrey JAFFEUX
ac865112a3
FIX: ensures group-navigation states changes when route changes (#8724) 2020-01-15 10:13:07 +01:00
Joffrey JAFFEUX
f4744193bd
FEATURE: allows to define a dissmiss duration on global notices (#8715)
This commit also adds more documentation to various options and defines a 1 week duration for IE global notice dismiss duration.
2020-01-15 09:02:28 +01:00
Joffrey JAFFEUX
ec1aeb8a55
FIX: ensures secondary menu of user notifications mobile nav reloads (#8716) 2020-01-15 09:01:44 +01:00
Kris
b1508a6f44 UX: Improve appearance of lists and user fields in mobile bios 2020-01-14 16:33:50 -05:00
Mark VanLandingham
5df0ef1e98
FIX: Update user-selector excluded usernames after insert (#8711) 2020-01-14 10:28:35 -06:00
David Taylor
12d2fe7ff6 UX: Ensure all generated backup codes are displayed on the screen 2020-01-14 15:33:27 +00:00
Joffrey JAFFEUX
f10078eab4
FIX: moves back padStart/padEnd to core polyfills (#8714)
Multiple users are on chrome 56 when this is only supported on chrome 57. Given it's only few lines of code, it makes sense to keep supporting this.
2020-01-14 10:54:39 +01:00
romanrizzi
d3091edcea UX: Return a friendlier error when the CSV is invalid. Added a cancel button to return to the /badges view 2020-01-13 15:53:41 -03:00
Robin Ward
e4a85e2a80 Minor tweaks to badge CSV upload 2020-01-13 12:44:22 -05:00
Roman Rizzi
d69c5eebcf
Feature: Mass award badge (#8694)
* UI: Mass grant a badge from the admin ui

* Send the uploaded CSV and badge ID to the backend

* Read the CSV and grant badge in batches

* UX: Communicate the result to the user

* Don't award if badge is disabled

* Create a 'send_notification' method to remove duplicated code, slightly shrink badge image. Replace router transition with href.

* Dynamically discover current route
2020-01-13 11:20:26 -03:00
Martin Brennan
9e399b42b9 DEV: Remove redundant admin_login route, share with email_login 2020-01-13 12:10:07 +10:00
Blake Erickson
1a31a403ce DEV: Remove buffered-render file
This is the last and final commit in a multi-commit refactor to remove
all uses of buffered-render.

Previous commit: fc94b6cb9e in this
series.
2020-01-10 18:19:23 -07:00
Penar Musaraj
687c79ca1c FIX: Remove padding while composer is saving
Padding on `#main-outlet` while compooser was in "saving" state was causing posts to bounce after replying.
2020-01-10 12:57:16 -05:00
Mark VanLandingham
5898afaa73
FEATURE: pass in excluded usernames to user-selector (#8695) 2020-01-10 09:02:43 -08:00
Rafael dos Santos Silva
5a70f50032
FEATURE: Use new Badging API
Now that the spec is finished use the unprefixed API, which was also moved
from window to navigator.

Still uses feature detection so it fail gracefully when not available in
the user agent.
2020-01-10 13:41:35 -03:00
Dan Ungureanu
815116f6a2
FIX: Make 'findBySlugPathWithID' when URL ends with a slash (#8699)
Make URLs such as 'https://discourse/c/foo/bar/' work the same way
'https://discourse/c/foo/bar' does.
2020-01-10 17:02:36 +02:00
Joffrey JAFFEUX
5ce602ecea FIX: prevents url of file from being pasted when pasting file on iOS (#8693) 2020-01-10 08:39:01 +05:30
Martin Brennan
cb660ef952 SECURITY: Improve second factor auth logic 2020-01-10 10:45:56 +10:00
Kris
dd52291fb7 UX: Center featured topic on mobile profiles 2020-01-09 16:35:34 -05:00
Kris
ef9828b25d UX: Remove reliance on JS for category box links 2020-01-09 16:25:41 -05:00
Régis Hanol
92a9ae6ab0
REFACTOR: isValidLink
- Reduced verbose comments
- Merged 2 `if` which had the same logic
2020-01-08 18:14:24 +01:00
David Taylor
4d5b142f1d DEV: Allow doLogin to be called with a set of parameters
This can be used for themes/plugins to specify additional URL parameters to be used when starting authentication. Example usage:

```
LoginMethod.findAll()[0].doLogin({params: {mydata: "myvalue"}});
```
2020-01-08 16:13:12 +00:00
Jarek Radosz
502f154cfc
FIX: Don't leak event listeners in user-activity-drafts (#8682) 2020-01-08 16:55:10 +01:00
Martin Brennan
bdff4561d4 FIX: Make scrolling to bottom post in topic more consistent (#8671)
* Make scrolling to bottom post in topic more consistent

* when using the slider to scroll past the bottom post,
  we now scroll to the bottom of the post/page IF the
  post height is > the window height (e.g. really long
  posts). if the post height is smaller, then we lock
  onto and jump to the top of the post
* this also removes the mobile hack that would always jump
  to the top of the last post on mobile

* Prettier lint
2020-01-08 16:37:13 +11:00
Kris
a8fbf7c128 minor subcategory box padding adjustments 2020-01-07 20:54:27 -05:00
Mark VanLandingham
c01c937151
DEV: Allow returning non-objects from addToolbarPopupMenuOptionsCallback (#8677) 2020-01-07 16:01:11 -06:00
Kris
cae60b5900 UX: Sub-sub categories in "Boxes with subcategories" + consistency 2020-01-07 16:38:17 -05:00
Robin Ward
abff3716ba
Upgrade handlebars (#8675)
* Upgrade Handlebars to 4.3.0

* Upgrade Handlebars to the latest version
2020-01-07 15:37:37 -05:00
Kris
e0539d7ffe remove log 2020-01-07 11:28:56 -05:00
Bianca Nenciu
eef21625c6
Rename 'target usernames' with 'target recipients' in Composer (#8606)
* Reapply "Rename 'target usernames' with 'target recipients' in Composer"

This reverts commit 9fe11d0fc3 which
reverted ebb288dc2c.

* DEV: Add test for replying to PM
2020-01-07 15:33:48 +02:00
Joffrey JAFFEUX
c495aed6ff
removes logging (#8673) 2020-01-07 12:01:21 +01:00
Joffrey JAFFEUX
7f00cefcac
FIX: onScroll method was not defined on mobile discovery (#8672) 2020-01-07 11:59:58 +01:00
Blake Erickson
fc94b6cb9e
DEV: Remove buffered rendering from topic-list-item (#8589)
* DEV: Remove buffered rendering from topic-list-item

This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 1c7305c0f1 in this
series.

This is just a refactor and should not change any functionality.

* apply prettier fix

* update syntax

* Use computed properties where possible

* switch to using didReceiveAttrs

* Simplify topic.pinned observer
2020-01-06 17:41:45 -07:00
Penar Musaraj
b1402d9f13 DEV: replace "warning" icons with "exclamation-triangle" 2020-01-06 12:51:44 -05:00
Penar Musaraj
f755810906 DEV: replace "trash" icons with "trash-alt" 2020-01-06 12:35:00 -05:00
Penar Musaraj
93a556d9a2 DEV: replace "eye-slash" icons with "far-eye-slash" 2020-01-06 12:27:20 -05:00
Penar Musaraj
e2e9420204 DEV: Update deprecated icon name 2020-01-06 11:43:32 -05:00
David Taylor
784da19e4c
FIX: Cached new topic data should not be deleted after dismiss new (#8660)
43ddf60cdf introduced a new method for dismissing new topics in topic-tracking-state, which works on a per-category basis.

This commit removes the old mechanism, which was to delete all 'new' topics from the local tracking state, regardless of category.
2020-01-06 16:22:40 +00:00
Joffrey JAFFEUX
ff151cb580
FIX: allows scroll on load for discovery topic list (#8661) 2020-01-06 15:43:36 +01:00
Vinoth Kannan
7dbde18f02 FIX: keep 'rb' & 'rp' tags in html to markdown conversion. 2020-01-04 17:16:23 +05:30
Sam Saffron
0d757814e5 FIX: correctly account for onebox height when lazy loading images
Page used to jitter when oneboxes loaded images lazily.

Previously we inserted the the "shadow" loading image before the "real" image.

This meant that certain styling with `firstChild` CSS selectors would apply
incorrectly to the shadow image.

Additionally we had special case code for onebox and quoted images that was
not really needed due to this fix.

We had an old fix that used computed style for image height and width in
specific scenarios, we now run it all the time.

On slow devices there was a possibility that the cache fetch after amending
src at the end of the process would cause a flash, this is avoided using a
new onload handler.
2020-01-03 15:15:42 +11:00
Joffrey JAFFEUX
ec5418fbb4
FIX: any global notice text can contain HTML (#8655) 2020-01-02 19:58:27 +01:00
David Taylor
c7a74e574f FIX: Only show admin wrench when there are actions on mobile
Corrects typo in logic from b725252cd0
2019-12-31 12:35:44 +00:00
David Taylor
a4a0d12b39 DEV: Update deprecated FA4 icon name 2019-12-31 11:21:31 +00:00
Krzysztof Kotlarek
fd8b98a55e
FIX: don't display cloak on admin tool when the right wrench is clicked (#8641) 2019-12-31 15:16:24 +11:00
Joe
b7ed50fe56
prettier 2019-12-31 10:59:38 +08:00
Joe
23a4936826
UX: TMP fix (CSS revert) until translations are ready for flex 2019-12-31 10:43:16 +08:00
Krzysztof Kotlarek
764e01b597
FIX: visual improvements to admin topic menu (#8638)
* 10 px padding from the bottom to look better on rounded phones
* dark cloak on other elements to emphasize admin menu
* slide up animation
2019-12-31 11:52:25 +11:00
Jarek Radosz
c76e22942c
FIX: Open a card on click even if the mention has extra elements (#8626)
Plugins like https://github.com/discourse/discourse-calendar add extra HTML (e.g. icons) to user/group mentions. Clicking on those extra elements used to only flash a blank card. Now, the card opens properly.
2019-12-30 19:26:23 +01:00
David Taylor
bc4c40abd4
DEV: Remove unsafe-eval from development CSP (#8569)
- Refactor source_url to avoid using eval in development
- Precompile handlebars in development
- Include template compilers when running qunit
- Remove unsafe-eval in development CSP
- Include unsafe-eval only for qunit routes in development
2019-12-30 12:17:12 +00:00
Joffrey JAFFEUX
6fa5725292
FIX: makes highlighting last viewed topic more resilient (#8624)
`highlight` was called from `didInsertElement` which technically doesn't ensure the list is rendered. By wrapping the highlighting code in `afterRender` we ensure it works more consistently.
2019-12-30 08:18:36 +01:00
Krzysztof Kotlarek
b725252cd0
FEATURE: Topic admin menu sticks to bottom on mobile. (#8620)
Our current topic admin menu is not always fully visible on a mobile
device, therefore some options are difficult to click.

To solve this issue, we can display the admin menu on the bottom of the
screen on mobile devices.
2019-12-30 08:15:46 +11:00
Joffrey JAFFEUX
041067cc21
FIX: correctly styles pwa consent banner (#8623) 2019-12-29 19:10:35 +01:00
Joffrey JAFFEUX
df465ed0be
FIX: allows global_notice site setting to contain html (#8622) 2019-12-29 18:29:41 +01:00
Joffrey JAFFEUX
2f37f446f8
FIX: correctlt styles notification-consent-banner (#8621)
TODO: this should be moved to new global notice API
2019-12-27 15:27:12 +01:00
Roman Rizzi
16d97573f9
DEV: Improve support for extending flags. (#8619)
- Ensure that the 'notify_moderators' flag is always the last flag when using custom flags.
- Support passign a custom FlagSettings object when replacing flags to reuse existing ones.
2019-12-27 08:41:50 -03:00
Joffrey JAFFEUX
c25b8abd70
FEATURE: allows plugins to add a global notice (#8552)
* FEATURE: allows plugins to add a global notice

Usage:

```
api.addGlobalNotice(id, text, options = {});
```

Options can be:

```
dismissable // Will display a button to hide the notice if true
html // will prepend html to the next if present
level // alert level, will usee css class of alert component
persistentDismiss // if true won't show notice again on reload
onDismiss // execute a custom action on dismiss
visibility // defines custom logic for notice visibility
```

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2019-12-27 09:06:36 +01:00
Gerhard Schlager
52a59b5811 FIX: English and US date/time formats 2019-12-24 12:17:25 +01:00
Arpit Jalan
2c0574010a FIX: better error message when forum is in read-only mode 2019-12-24 15:49:27 +05:30
Krzysztof Kotlarek
86fb08d04a
Revert "FIX: update normalize css from 3.0.1 to 8.0.1 (#8591)" (#8618)
This reverts commit 16f01d0ddf.
2019-12-24 10:45:42 +11:00
Krzysztof Kotlarek
16f01d0ddf
FIX: update normalize css from 3.0.1 to 8.0.1 (#8591)
Changelog is available here - https://github.com/necolas/normalize.css/blob/master/CHANGELOG.md

I decided that the easiest way to ensure it works would be checking different browsers. It looked good to me on Chrome, Firefox, Edge and IE 11. In addition, I checked 3 random themes.
2019-12-24 08:39:51 +11:00
Jeff Wong
63323bd7a8
FIX: category routes model params should decode their URL parts (#8612)
* FIX: category routes model params should decode their URL parts

Ember's route star globbing does not uri decode by default. This is
problematic for subcategory globs with encoded URL site settings enabled.

Subcategories with encoded URLs will 404 without this decode.

I found this https://github.com/tildeio/route-recognizer/pull/91
which explicitly explains that globbing does not decode automatically.
2019-12-23 10:24:41 -08:00
Jeff Wong
e36efb1edc FIX: ensure that we encode a slug only once if slug generation method is encoded
This was re-encoding the search slug each loop - if the category list was not
the first category in the list, it'd continually search with a re-encoded search
term from the previous iteration. This results in ember 404ing when navigating
to raw encoded category slugs of the form /c/encoded-slug-with-non-ascii
that have no ID attached.
2019-12-22 00:25:12 -08:00
Kris
00477d8f88 UX: Some category page style adjustments for sub-sub categories 2019-12-20 16:17:34 -05:00
Kris
f8633d5c58 FIX: Give expanded CSS/HTML editor >0 height 2019-12-20 10:37:23 -05:00
Penar Musaraj
bbe2947742 DEV: Use FA5 name for moved post icon 2019-12-20 09:50:05 -05:00
Krzysztof Kotlarek
b47b1d8af8 FIX: label helpers on sign up form are not hidden (#8603)
This commit fe9293b8b5 created a regression.

The problem is that dom changed a little bit.
Before it was
```
<tr class="instructions create-account-email">
  <td></td>
  <div id="account-email-validation" class="tip bad ember-view"></div>
  <td><label>Never shown to the public.</label></td>
</tr>
```

And after we got
```
<tr class="instructions create-account-email">
  <td></td>
  <div id="account-email-validation" class="tip bad ember-view"> </div>
  <td><label>Never shown to the public.</label></td>
</tr>
```
That small space may look like not important change.

However, now helpers are hitting that CSS rule:

```
.login-form {
  .tip {
    &:not(:empty) + td {
      display: none;
    }
}
```

To fix it, we should render template only if there is a reason - like it was before

```
if (reason) {
  buffer.push(iconHTML(this.good ? "check" : "times") + " " + reason);
}
```

* FIX: remove rerenderTriggers
2019-12-20 12:17:51 +01:00
Bianca Nenciu
9fe11d0fc3 Revert "Rename 'target usernames' with 'target recipients' in Composer (#8468)"
This reverts commit ebb288dc2c.
2019-12-20 11:56:20 +02:00
Régis Hanol
7030c93206 Revert "FIX: Show signup input tips and improve spacing"
This reverts commit d449834a28.

The signup input tips were hidden instead.
2019-12-20 09:42:11 +01:00
Bianca Nenciu
ebb288dc2c
Rename 'target usernames' with 'target recipients' in Composer (#8468) 2019-12-20 10:28:14 +02:00
Kris
d449834a28 FIX: Show signup input tips and improve spacing 2019-12-19 20:37:47 -05:00
David Taylor
7737ecd0fe FIX: Limit requests and include data when reporting deprecated icons
- Only report each icon to the server once, to avoid hitting rate limits
- Correct typo in ajax `data` parameter

Follow-up to db7d00a8dc
2019-12-19 22:11:45 +00:00
Kris
2ad40d5f71 UX: New bell icons for notification/tracking statuses 2019-12-19 14:39:29 -05:00
Hector Bustillos
87c04ebe39 FEATURE: Keyboard shortcut for opening the topic admin menu (#8568)
* Keyboard shortcut for opening the topic admin menu

* Review changes

* Attrubute and target class renaming
2019-12-19 14:18:14 -05:00
Dan Ungureanu
069bc70bd4
UX: Improve sub-sub-categories styling in categories list (#8593)
- Using h4 instead of h3 for sub-categories.
- Show category description if it does not have subcategories.
- Implemented equivalent for mobile-view.
- Include description_excerpt in basic serializer. This is needed for
  displaying second-level categories in category list.

Follow-up to 9253cb79e3.
2019-12-19 17:09:45 +02:00
Dan Ungureanu
f1c4180ff8
FEATURE: Make 'Reorder Categories' work with nested categories (#8578) 2019-12-19 12:27:01 +02:00
Dan Ungureanu
9253cb79e3
UX: Show grandchildren in categories list (#8592) 2019-12-19 12:26:11 +02:00
Kris
3a8ed4033f UX: Prevent the post admin menu from appearing under the header on OP 2019-12-18 19:57:58 -05:00
Penar Musaraj
db7d00a8dc DEV: Log deprecated FA 4.7 icon names in /logs (take 2)
Does not use utilities library, to avoid wizard qunit test failures
2019-12-18 12:52:31 -05:00
Penar Musaraj
274c22e7a2 Revert "DEV: Log deprecated FA 4.7 icon names in /logs"
This reverts commit 2dd9727c11.
2019-12-18 12:44:52 -05:00
Penar Musaraj
2dd9727c11 DEV: Log deprecated FA 4.7 icon names in /logs 2019-12-18 12:22:03 -05:00
David Taylor
fab3bbf705 FIX: IE11 compatibility for readonly check
In some situations, the xhr object is undefined in IE11
2019-12-18 16:57:20 +00:00
Kris
37c9579a01 UX: reduce opacity on hidden topic contents, but not the controls 2019-12-18 11:34:33 -05:00
Dan Ungureanu
95390e3333
FIX: Show parent and subcategories for 2nd level categories (#8579)
The maximum level used to be one, which meant that a category could be
either a parent or a child. If it was a parent, the subcategories were
shown; if it was a child then the parent selector was shown.

With multiple levels of nesting, a category can be both a parent and a
child.
2019-12-18 17:44:28 +02:00
Kris
89154308b0 UX: Minor user admin page adjustments, accomodating for long group names 2019-12-18 09:26:03 -05:00
David Taylor
96bfefac5c FIX: Prevent errors in IE11 following AJAX request
In some situations, the xhr object is undefined, so check that it's present before continuing
2019-12-18 13:38:36 +00:00
Krzysztof Kotlarek
1921538faa FIX: show new/unread button when a new topic or post is created (#8576)
There is a problem that if you read all messages, even when a new one
arrives, the button on the top is not showing.

This is because once the button got `hidden` class, a label under is
properly updated, however, the class is not removed.

Therefore, I added computed isHidden function which is recalculated when
`count` change.
2019-12-18 11:22:28 +00:00
Krzysztof Kotlarek
f59647cd55
FIX: move IE specific CSS rules to discourse-internet-explorer plugin (#8567) 2019-12-18 15:25:16 +11:00
Mark VanLandingham
e916bd7ea0
FIX: Fix choose-topic component to search by url (#8574) 2019-12-17 13:01:52 -08:00
Mark VanLandingham
d37dc14c57
REVERT: Remove feature topic on profile button from topic view (#8573) 2019-12-17 12:41:49 -08:00
Kris
62ebfbbb67 UX: Minor adjustment to give the PM recipient input more flexibility. 2019-12-17 14:56:57 -05:00
Joffrey JAFFEUX
007652ece5
DEV: allows this.get in widgets (#8571) 2019-12-17 18:39:51 +01:00
Blake Erickson
1c7305c0f1 DEV: Remove buffered rendering from topic-status
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 006e5904be in this
series.

This commit affects the icons next to the topic title that indicate if
it is closed, unlisted, pinned, etc. It is just a refactor and should
not change any functionality.

Originally I was going to continue to use the existing
topic-status-icons arrayProxy helper but this would require using
observers, so I opted instead to use computed properties and have a bit
larger hbs template.
2019-12-17 10:35:05 -07:00
Kris
ff1be40980 UX: Increase combo-box tap area for mobile 2019-12-17 11:43:11 -05:00
Dan Ungureanu
d9e7611910
FIX: Avoid String.matchAll for IE11 support 2019-12-17 18:09:29 +02:00
Krzysztof Kotlarek
84ede5867c
FIX: category id in filterCategory (#8555)
Small regression was created here: https://github.com/discourse/discourse/commit/374534f00ee#diff-4af46675500edc092f9224ca5835a7ddR106

After that change `listFilter` is including `categoryId` like `c/cat/subcat/6/l/latest` instead of `c/cat/subcat/l/latest`

Therefore, `trackIncoming` function in topic-tracking-state couldn't properly filter new messages
2019-12-17 08:33:38 +11:00
Penar Musaraj
776840c810 FIX: Ensure currentUser exists before getting ID
Otherwise this would trigger a JS error for anonymous users.
2019-12-16 14:53:43 -05:00
Mark VanLandingham
8c4ffaea1b
FEATURE: Modal for profile featured topic & admin wrench refactor (#8545) 2019-12-16 08:41:34 -08:00
Martin Brennan
b6b05d3b48
Add bookmark-clock icon (#8553)
Adds a custom bookmark-clock icon to discourse-additional.svg for use with the new bookmarks with reminder functionality.

Also add some code to correctly refresh the post-stream icon for bookmark to show the clock after save.
2019-12-16 12:37:34 +10:00
Régis Hanol
5f1e346e16 DEV: lint file 2019-12-13 22:37:19 +01:00
Régis Hanol
1309262569 UX: pluralize "likes/read this"
When expending the number of likes/reads, the text wasn't handling
proper pluralization that might be useful in locales that requires it.
2019-12-13 22:18:28 +01:00
Penar Musaraj
028d21c01e DEV: Update deprecated icon names 2019-12-13 15:23:31 -05:00
Kris
216b59d3a4 UX: Improve alignment of social login/signup buttons in Firefox 2019-12-13 14:24:59 -05:00
Kris
b76ae9e0f5 REFACTOR: Convert main button styles into a central mixin 2019-12-13 14:09:48 -05:00
Kris
3816107560 UX: Z-index of image lightbox needs to be higher than modal z-index 2019-12-13 09:38:38 -05:00
Daniel Waterworth
1fb7a6297c DEV: Add unambiguous routes for tags
The trouble with having:

/tags/:tag_id/...

and:

/tags/intersection/*tag_ids

for example, is: what happens if you want a tag called intersection?

Under this new scheme. Routes referring to a single tag are unambiguous
because they are prefixed with:

/tag/:tag_id

Routes referring to the collection of tags still start with:

/tags/

This commit just adds the new routes. It doesn't remove the old ones or
cause the new ones to be used.
2019-12-13 11:24:59 +00:00
Blake Erickson
006e5904be DEV: Remove buffered rendering from navigation-item
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: ea6326c860 in this
series.

This commit affects the top menu buttons. It is just a refactor and
should not change any functionality.
2019-12-12 15:52:33 -07:00
Penar Musaraj
ff163ae980 DEV: Prevent empty admin topic buttons from rendering
When using api.decorateWidget("topic-admin-menu:adminMenuButtons") in plugins, an empty button is added if the helper only returns attributes based on a condition (for example, if the admin action is limited to public topics.) In that case, we need to exclude the button from rendering.
2019-12-12 12:21:30 -05:00
Penar Musaraj
f62c9def33 Revert "FIX: prevents focus of input on mobile (#6251)"
This reverts commit bfcf8ed61b.
2019-12-12 11:17:40 -05:00
Blake Erickson
ea6326c860 DEV: Remove buffered rendering from topic-post-badges
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: f5cca4930d in this
series.

This commit affects the display of some of the unread, new, and unseen
badges in topic lists like when then "show subcategory list above topics
in this category" option is checked.
2019-12-12 07:04:25 -07:00
Dan Ungureanu
b6589f203b FIX: Cache short upload URL (#8541)
The code for caching was already there, but it was caching invalid data,
which automatically invalidated the cache entry.
2019-12-12 15:03:34 +01:00
David Taylor
4c9ca24ccf
FEATURE: Hash API keys in the database (#8438)
API keys are now only visible when first created. After that, only the first four characters are stored in the database for identification, along with an sha256 hash of the full key. This makes key usage easier to audit, and ensures attackers would not have access to the live site in the event of a database leak.

This makes the merge lower risk, because we have some time to revert if needed. Once the change is confirmed to be working, we will add a second commit to drop the `key` column.
2019-12-12 11:45:00 +00:00
Martin Brennan
9f4c9bafa1
FIX: Hide old bookmark button on post-menu if SiteSetting.enable_bookmarks_with_reminders
Hide old bookmark post-menu item if the site setting for the new bookmark reminders is enabled and change icon for the new bookmark functionality to the same as the old bookmark button
Fix null @topic_view error in post serializer for post_bookmark, as new posts do not have a @topic_view
2019-12-12 16:28:01 +10:00
Kris
91a5731e7b UX: Small fixes for iOS signup modal 2019-12-11 15:47:25 -05:00
Kris
9c41b66996 UX: Tag combo box styles should match tags on topics 2019-12-11 14:49:39 -05:00
Kris
2f8a25b2d5 UX: Minor style updates for tag info 2019-12-11 13:34:01 -05:00
Joffrey JAFFEUX
dc6b02f050
UX: attempts to make charts loading less laggy (#8529) 2019-12-11 15:49:17 +01:00
Robin Ward
4abe4454dd
FEATURE: Create IE Support Plugin (#8520)
This core plugin, which could be split off in the future, allows us to load IE specific code on demand.

Co-authored-by: jjaffeux <j.jaffeux@gmail.com>
2019-12-11 09:07:22 -05:00
Martin Brennan
232eb685af Fix improved bookmark toggling/deleting bug
* i was incorrectly toggling the transformed post property
  instead of the actual property in the emberjs post model
  which broke the bookmark/unbookmark functionality
2019-12-11 15:48:27 +10:00
Martin Brennan
6261339da9
Improving bookmarks part 1 (#8466)
Note: All of this functionality is hidden behind a hidden, default false, site setting called `enable_bookmarks_with_reminders`. Also, any feedback on Ember code would be greatly appreciated!

This is part 1 of the bookmark improvements. The next PR will address the backend logic to send reminder notifications for bookmarked posts to users. This PR adds the following functionality:

* We are adding a new `bookmarks` table and `Bookmark` model to make the bookmarks a first-class citizen and to allow attaching reminders to them.
* Posts now have a new button in their actions menu that has the icon of an actual book
* Clicking the button opens the new bookmark modal.
* Both name and the reminder type are optional.
* If you close the modal without doing anything, the bookmark is saved with no reminder.
* If you click the Cancel button, no bookmark is saved at all.
* All of the reminder type tiles are dynamic and the times they show will be based on your user timezone set in your profile (this should already be set for you).
* If for some reason a user does not have their timezone set they will not be able to set a reminder, but they will still be able to create a bookmark.
* A bookmark can be deleted by clicking on the book icon again which will be red if the post is bookmarked.

This PR does NOT do anything to migrate or change existing bookmarks in the form of `PostActions`, the two features live side-by-side here. Also this does nothing to the topic bookmarking.
2019-12-11 14:04:02 +10:00
Sam Saffron
7b0cbfc1f9 DEV: lint file
long story but we are sorting out our new GitHub actions so we missed this
2019-12-11 10:48:58 +11:00
Kyle Zhao
2720531750 FIX: Always add username span in quick access item (#8526)
Generate an empty `<span>` even if there is no username, because the
first `<span>` is styled differently.
2019-12-11 09:44:19 +11:00
Neil Lalonde
81a43f2c1e REFACTOR: use rest serializer for tag-info categories
But the "synonyms" can't use the TagSerializer yet. We still have some
code from the discourse-tagging plugin that uses "text" instead of
"name", "count" instead of "topic_count", etc. We should make the js
consistent with the TagSerializer and then stop using tag_counts_json.
2019-12-10 14:58:11 -05:00
Blake Erickson
f921909595 FIX: Reorder categories not working
Ember was throwing this error preventing the reorder categories feature
from working:

```
access theidproperty (of <(unknown):ember1803>). ... the object in question
is a special kind of Ember object (a proxy). Therefore, it is still necessary
to use.get('id')in this case.
```

So I updated it to use the `get` method

https://api.emberjs.com/ember/3.14/functions/@ember%2Fobject/get

Follow up to: 6e5fedb312
2019-12-10 12:36:47 -07:00
Penar Musaraj
ba8d8a4f93 FIX: alphabetical tag sorting in mini-tag-chooser 2019-12-10 12:36:49 -05:00
Krzysztof Kotlarek
81c7d6a462
FIX: Muted tags are respected by TopicTrackingState (#8467)
When the tag is muted and topic contains that tag, we should not mark that message as NEW.

There are 3 possible settings which site admin can set.
remove_muted_tags_from_latest - always
It means that if the topic got at least one muted tag, we should not mark that topic as NEW

remove_muted_tags_from_latest - only muted
Similar to above, however, if at least one tag is not muted, the topic is marked as NEW

remove_muted_tags_from_latest - never
Basically, mute tag setting is ignored and all topics are set as NEW
2019-12-10 09:50:05 +11:00
Blake Erickson
f5cca4930d DEV: Remove buffered rendering from admin backup logs
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: da66950cf5 in this
series.

This commit affects the display of the backup logs. It is just a
refactor and does not change any functionality.
2019-12-09 14:45:36 -07:00
Krzysztof Kotlarek
5e29ae3ef5
FEATURE: Warning when component is added and not assigned (#8482)
When a component is installed and not assigned to any theme and the user is changing page, we should display a warning.

If the user decides to skip warning or come back later, a warning should not be shown anymore.

Also, when the user clicks "delete" button right after installation, warning about forgotten themes should not be shown.
2019-12-10 08:43:26 +11:00
Mark VanLandingham
14cb386f1e
FEATURE: Featured topic for user profile & card (#8461) 2019-12-09 11:15:47 -08:00
Jarek Radosz
b5236591e9
FIX: Don't try to create an empty tag when updating a topic (#8481)
Fixes an issue where updates to the first post in a topic would be visible only for staff.

Before, because the empty tag would find its way to `PostRevisor`, `TopicsController#update` would create a hidden revision, and later `PostsController#update` would only update that revision.

After this change, `TopicsController` doesn't create a revision at all (unless necessary), so `PostsController` can create it (and correctly decide whether the revision should be hidden or not).
2019-12-09 19:55:08 +01:00
Dan Ungureanu
34ccd9ecbb
DEV: Export imageNameFromFileName 2019-12-09 18:19:55 +02:00
Mark VanLandingham
78d67f34f9
FIX: default draft key in openComposerWithTopicParams (#8496) 2019-12-09 07:53:05 -08:00
Dan Ungureanu
aa24be1a9a
DEV: Extend plugin API for uploads (#8440)
* DEV: Add API to alter uploads Markdown

* DEV: Extract data attributes from image / download Markdown

For example '[test|attachment|hello=world]' will generate an 'a' element
with a data attribute: 'data-hello=world'.

This commit also makes MarkdownIt to transform '|attachment' into
'class="attachment"'. This transformation used to be a part of the
process which resolves short URLs (i.e. upload://).

* DEV: Export imageNameFromFileName
2019-12-09 16:20:03 +02:00
Dan Ungureanu
f62b8990ac
FIX: Do not autocomplete categories or emojis in code blocks (#8459)
This reapplies commit b643526d9a after
being reverted in commit f65c453555.

Unlike the original commit, this does a single pass and does not take
into account unfinished code blocks.
2019-12-09 15:07:15 +02:00
Dan Ungureanu
192ada0067
UX: Remove 'show more' from upload modals (#8470) 2019-12-09 12:57:43 +02:00
Joe
e89fa7202d
UX: Removes avatar animation for mobile-user cards (#8483) 2019-12-09 18:19:37 +08:00
Blake Erickson
da66950cf5 DEV: Remove buffered rendering from backup upload progress
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 54e4559aea in this
series.

This commit affects the display of the backup upload progress bar. It is
just a refactor and does not change any functionality.
2019-12-06 17:11:25 -07:00
Neil Lalonde
d0e191a9d5 REFACTOR: changes from tag synonym feedback 2019-12-06 15:42:22 -05:00
Penar Musaraj
68124caae2 FIX: Avoid unpinning composer on iOS when invoking emojis
Specifically when invoking emoji dropdown using a colon and pressing Return.
2019-12-06 14:08:59 -05:00
Blake Erickson
6617015bb5 DEV: Remove commented out code
Forgot to remove this.

Follow up to: 54e4559aea
2019-12-05 20:32:27 -07:00
Blake Erickson
54e4559aea DEV: Remove buffered rendering from topic timers
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: f269e45978 in this
series.

This commit affects the display of topic timers. It is just a refactor
and does not change any functionality.
2019-12-05 20:28:27 -07:00
Martin Brennan
e4881290be
FIX: Image file names with dots were showing incorrectly in composer markdown (#8465)
When uploading an image file with dots in the filename we were splitting the string on dots and getting the last of the split items as the extension-less filename. However this did not work with filenames that have dots. We now  just remove the extension using substr.
2019-12-06 10:58:47 +10:00
Vinoth Kannan
da2b0b2882 UX: remove the double-encoding of user titles.
`{{}}` in handlebars are already escaping the HTML elements.
2019-12-06 04:07:47 +05:30
Gerhard Schlager
00985559e4 FIX: Login page that redirects to preferences was broken 2019-12-05 22:36:11 +01:00
Blake Erickson
f269e45978 DEV: Remove buffered rendering from popup-input-tips
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: fe9293b8b5 in this
series.

This commit affects the display of popup input tips, like in the
composer when the title is too short or too long. It is just a refactor
and does not change any functionality.
2019-12-05 10:59:36 -07:00
Vinoth Kannan
aa5d4e9f6e FIX: keep ruby & rt tags in html to markdown conversion. 2019-12-05 21:18:00 +05:30
Blake Erickson
fe9293b8b5 DEV: Remove buffered rendering from input tips
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 2290ec9e87 in this
series.

This commit affects the display of input tips. It is just a refactor and
does not change any functionality.
2019-12-04 18:11:00 -07:00
Blake Erickson
2290ec9e87 DEV: Remove buffered rendering from i18n count
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 80f4b9e227 in this
series.

This commit affects the display of translated counts that is used in
multiple places like showing how many posts are selected using the
select posts feature on a topic. It is just a refactor and does not
change any functionality.
2019-12-04 15:39:05 -07:00
Krzysztof Kotlarek
fa52ed3b16
FIX: bufferedValuesString.split is not a function (#8463)
Fix an error `bufferedValuesString.split is not a function`.
It is happening when bufferedValue is a positive boolean (checkbox value)
2019-12-05 08:25:49 +11:00
Neil Lalonde
875f0d8fd8
FEATURE: Tag synonyms
This feature adds the ability to define synonyms for tags, and the ability to merge one tag into another while keeping it as a synonym. For example, tags named "js" and "java-script" can be synonyms of "javascript". When searching and creating topics using synonyms, they will be mapped to the base tag.

Along with this change is a new UI found on each tag's page (for example, `/tags/javascript`) where more information about the tag can be shown. It will list the synonyms, which categories it's restricted to (if any), and which tag groups it belongs to (if tag group names are public on the `/tags` page by enabling the "tags listed by group" setting). Staff users will be able to manage tags in this UI, merge tags, and add/remove synonyms.
2019-12-04 13:33:51 -05:00
Joffrey JAFFEUX
c5140ef3fb
FIX: prevents multiple jumps to happen with LockOn (#8460) 2019-12-04 16:45:23 +01:00
Joffrey JAFFEUX
b74679f231
FIX: ensures the element is on the page before scroll with lockon (#8458) 2019-12-04 14:12:50 +01:00
Daniel Waterworth
2f5adbe1f4 DEV: Allow the creation of sub-sub-categories
This commits adds a new site setting (max_category_nesting), that
determines whether sub-sub-categories are allowable.
2019-12-04 12:07:05 +00:00
Daniel Waterworth
6e5fedb312 DEV: Use category ids in more URLs preferentially
This is a followup to 374534f0
2019-12-04 09:47:41 +00:00
Krzysztof Kotlarek
bb69e8942e
FEATURE: ability to add all active components to theme (#8447)
* FEATURE: ability to add all active components to theme

* FIX: add a component to all themes takes only active ones

* FIX: move select components/themes to top

* FIX: improve defaultIsAvailable

* FIX: Add filter(Boolean) and remove btn class
2019-12-04 17:13:41 +11:00
Joe
5e134400e2
UX: prevent scrollbars on initial panel load (#8456) 2019-12-04 11:40:59 +08:00
Blake Erickson
8f708bd6e1 DEV: Run prettier
Follow up to: 80f4b9e227
2019-12-03 17:39:39 -07:00
Blake Erickson
80f4b9e227 DEV: Remove buffered rendering from watched words
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: bb31e7f5b6 in the series.

This commit affects the display of the Webhooks Deliver Status column. It
is just a refactor and does not change any functionality.
2019-12-03 17:23:10 -07:00
Sam Saffron
57bb553499 DEV: nav-item should not fail when no top menu items exist
This can be called from themes where anonymous_top_menu_items is not set
cause the site requires login

Bail out cleanly if that is the case
2019-12-04 10:30:04 +11:00
Mark VanLandingham
6fe27b9e97
FEATURE: Plugin outlet adjacent to new topic btn (#8443) 2019-12-03 13:57:07 -06:00
Gerhard Schlager
9ebb69e8eb FIX: Respect enable_inline_emoji_translation setting in titles 2019-12-03 20:39:11 +01:00
Gerhard Schlager
e7c3c10829 FIX: Prepends whitespace when inserting via emoji picker 2019-12-03 20:39:11 +01:00
Daniel Waterworth
ee2473d7d5 FIX: linting 2019-12-03 16:07:55 +00:00
Daniel Waterworth
af5bcb25d5 DEV: Make bread-crumb component work with sub-sub-categories 2019-12-03 15:56:13 +00:00
Joe
98b600f1e1
UX: Adjusts wizard step margins (#8452) 2019-12-03 22:28:03 +08:00
Sam Saffron
f65c453555 Revert "FIX: Do not autocomplete categories or emojis in code blocks (#8433)"
This reverts commit b643526d9a.

Sadly this introduces a regex runaway CPU condition, we will re-work
this so it is safe.
2019-12-03 09:27:26 +11:00
Dan Ungureanu
b643526d9a
FIX: Do not autocomplete categories or emojis in code blocks (#8433)
Emojis and category autocomplete show up often when writing code
snippets, which makes it easy to insert unwanted text by mistake.
2019-12-02 18:48:40 +02:00
Robin Ward
5df719a3c2 FEATURE: Support pasting a list of usernames into a PM
This allows you to paste multiple usernames into a PM's recipient list
at once. It supports usernames separated by spaces, commas, and new lines.
2019-12-02 11:28:09 -05:00
Daniel Waterworth
712e171b34 DEV: Don't pass multiple categories to tag-drop
The tag-drop component uses the passed in categories to calculate paths,
but only the last category is relevant, since, from a category we can
calculate its ancestors.
2019-12-02 12:27:19 +00:00
Daniel Waterworth
374534f00e DEV: Use category ids in URLs preferentially 2019-12-02 09:28:15 +00:00
Daniel Waterworth
9251065768 FIX: Generate redirect URL correctly when using a subdirectory
The url property of a category contains the base_uri and so it shouldn't
be concatated into a larger URL unless it is the prefix.
2019-12-02 09:28:15 +00:00
Daniel Waterworth
c414db107c FIX: Handle none path correctly with three levels
With a path like "/c/foo/1/none", "none" was being interpreted as an id.
2019-12-02 09:28:15 +00:00
Joffrey JAFFEUX
3cf4ba5069
FIX: ensures censor has always at least an empty string to handle (#8442) 2019-12-02 10:24:07 +01:00
Vinoth Kannan
580b289861 UX: skip leading spaces in selection when adding a link. 2019-11-30 20:14:22 +05:30
Robin Ward
7fee3c61de
Support for custom messages and redirects when creating posts (#8434)
* Support for custom messages and redirects when creating posts

When a post/topic is created Discourse serializes a `NewPostResult`
object. Normally this contains a status like `created_post` or
errors describing why the post could not be created.

There are times when a plugin might want to take the inputted post
and do something in the background. In this case, the plugin
can return a custom `message` and `route_to` attribute in the
`NewPostResult`.

If present, the message will be displayed in an alert, and when "Ok" is
clicked the user will be routed to the new URL.

* Destroy the draft in parallel
2019-11-29 09:30:54 -05:00
Arpit Jalan
8237e0e001
UX: show group full name even when title is same. (#8437) 2019-11-29 13:07:24 +05:30
Daniel Waterworth
11a73b3f15 DEV: Client side routing for routes with tag and category context
This moves also moves some of the logic to Category.
2019-11-28 17:58:04 +00:00
Daniel Waterworth
4eb8d1e717 FIX: fix typo 2019-11-28 17:53:13 +00:00
Daniel Waterworth
6431daaa2e DEV: Rename dynamic segment to snake case to fit with Ember convention 2019-11-28 17:53:11 +00:00
Joffrey JAFFEUX
e92e06c3a7
FIX: adds data-topic-id to quick-access-item (#8430)
This fix will allow discourse-encrypt to decrypt messages titles of the quick-access-pannel for PMs
2019-11-28 11:27:36 +01:00
Joffrey JAFFEUX
7fc99f5e7b
UX: do not show shadow on hover images on touch devices (#8429) 2019-11-28 10:51:08 +01:00
Sam Saffron
d10f55c3e9 Revert "FIX: adds data-topic-id to quick-access-item (#8422)"
This reverts commit 700bd280e4.

Oops looks like this breaks tests:

```
Module Failed: widget:quick-access-item
  Test Failed: escapedContent attribute is not escaped
    Assertion Failed: TypeError: Cannot read property 'match' of undefined
      Expected: true, Actual: false
  Test Failed: anonymous
    Assertion Failed: failed, expected argument to be truthy, was: 0
      Expected: true, Actual: 0
    Assertion Failed: Element .enable-anonymous not found.
  Test Failed: anonymous - switch back
    Assertion Failed: failed, expected argument to be truthy, was: 0
      Expected: true, Actual: 0
    Assertion Failed: Element .disable-anonymous not found.
  Test Failed: log out
    Assertion Failed: failed, expected argument to be truthy, was: 0
      Expected: true, Actual: 0
    Assertion Failed: Element .logout not found.
  Test Failed: content attribute is escaped
    Assertion Failed: TypeError: Cannot read property 'match' of undefined
      Expected: true, Actual: false
```
2019-11-28 16:38:26 +11:00
Joffrey JAFFEUX
700bd280e4 FIX: adds data-topic-id to quick-access-item (#8422)
This fix will allow discourse-encrypt to decrypt messages titles of the quick-access-pannel for PMs
2019-11-28 16:29:17 +11:00
Krzysztof Kotlarek
b120728999
FEATURE: Ability to add components to all themes (#8404)
* FEATURE: Ability to add components to all themes

This is the first and functional step from that topic https://dev.discourse.org/t/adding-a-theme-component-is-too-much-work/15398/16

The idea here is that when a new component is added, the user can easily assign it to all themes (parents).

To achieve that, I needed to change a site-setting component to accept `setDefaultValues` action and `setDefaultValuesLabel` translated label.
Also, I needed to add `allowAny` option to disable that for theme selector.

I also refactored backend to accept both parent and child ids with one method to avoid duplication (Renamed `add_child_theme!` to more general `add_relative_theme!`)

* FIX: Improvement after code review

* FIX: Improvement after code review2

* FIX: use mapBy and filterBy directly
2019-11-28 16:19:01 +11:00
Blake Erickson
2bb36d72a3 DEV: Fix failing test on CI due to whitespace differences
I could not replicate the failure locally, but it was consistently
failing on CI with:

```
  Assertion Failed: it should escape watched words

      Expected:  <img src="x">, Actual:  <img src="x">
```

This commit removes an extra space that was added originally, but I
don't think it is really needed after double checking how it displays in
the UI. The `x` icon and the word have sufficient spacing between them.
If we need to we can tweak it in css instead.
2019-11-27 17:23:49 -07:00
Blake Erickson
83a521e8c6 DEV: Fix failing test with watched words
Follow up to: bb31e7f5b6

This commit fixes this failing test:

`Assertion Failed: it should escape watched words`

Now that we have a handlebars template we can us it for escaping because
it does that for us.
2019-11-27 16:48:01 -07:00
Vinoth Kannan
0fed417439 DEV: always trigger 'notification_created' event.
And make prettier happy.
2019-11-28 04:31:55 +05:30
Blake Erickson
bb31e7f5b6 DEV: Remove buffered rendering from watched words
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 2673cad142 in this
series.

This commit affects the display of watched words on the admin watched
word page. It is just a refactor and does not change any functionality.
2019-11-27 15:47:13 -07:00
Vinoth Kannan
481c8314f0 FEATURE: consolidate group membership request notifications. 2019-11-28 04:02:35 +05:30
David Taylor
1a6bbfd10b
FIX: Do not start the login flow when logging out from SSO/Authenticator (#8423)
This affects login_required sites which use SSO or have only one authenticator enabled. Previously, logging out would redirect to the homepage, which would then redirect to the identity provider. Now, users will be redirected to the Discourse login page. This avoids the confusing situation where a user appears to remain logged in after clicking logout.

Sites which have explicitly defined a logout_redirect url are not affected by this change.

For context, see https://meta.discourse.org/t/134138/2
2019-11-27 11:41:07 +00:00
David Taylor
13a0da8c39 DEV: Use shared logout function when revoking all sessions 2019-11-27 11:09:44 +00:00