Commit Graph

14194 Commits

Author SHA1 Message Date
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
Dan Ungureanu
2d3113e4da
FIX: Correctly resize lazy loaded images in Oneboxes 2019-11-27 11:49:32 +02:00
Joffrey JAFFEUX
0807751390
REFACTOR: poll-pie-chart widget (#8415)
This commit mostly get rid of the later() call and encapsulate all pie chart display logic inside discourse-poll-pie-canvas widget instead of sharing it between discourse-poll-pie-chart and discourse-poll-pie-canvas
2019-11-27 00:10:43 +01:00
Blake Erickson
2673cad142 DEV: Remove buffered rendering from user directory
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: e0199e8094 in this
series.

This commit affects the table header sorting on the user directory page.
It is just a refactor and should not change any functionality.
2019-11-26 15:48:43 -07:00
Kris
5f7948ace6 follow up adjustment to ff34ab6 2019-11-26 16:04:40 -05:00
Kris
ff34ab6aef UX: Show obvious message when backup restoration is disabled 2019-11-26 12:55:25 -05:00
Joffrey JAFFEUX
8ea114007f
UX: adds hover effect on lightboxed images (#8416)
* UX: adds hover effect on lightboxed images

This commits also adds two scss functions:

- is-light-color-scheme()
- is-dark-color-scheme()

This hover effect won't be added on dark color schemes, as images already standout nicely on dark backgrounds.

Co-Authored-By: David Taylor <david@taylorhq.com>
2019-11-26 15:06:30 +01:00
Daniel Waterworth
8876db874f DEV: Client side category routing changes
This commit corresponds to d84c34ad which applies the same changes to
the server-side. This changes the category routes, except for the routes
that contain tags.
2019-11-26 13:52:14 +00:00
Arpit Jalan
2dd47df6d1 FIX: show updated_at for invite sent date. 2019-11-26 13:22:48 +05:30
Sam Saffron
941162e90e FIX: draft not clearing when replying to new topic
This amends our API so we provide it with the draft key when saving a post
this means post creator can clean up the draft consistently even if we are
doing fancy stuff like replying to a new topic or new pm or whatever.

There will be some followup work to clean it up so client never calls destroy
on draft during normal operation and the #create/#update endpoints takes care of it
every time
2019-11-26 18:23:20 +11:00
Martin Brennan
d0246104ee
FIX: oneboxer.js infinitely retrying failed requests (#8414)
* setFailedCache was used like a variable object, when it was in fact a function
2019-11-26 15:49:58 +10:00
Blake Erickson
e0199e8094 DEV: Remove buffered rendering from admin-directory toggle
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: d0ad5ecc6d in this
series.

This commit affects the table header sorting on the admin directory page.
It is just a refactor and should not change any functionality.
2019-11-25 18:09:18 -07:00
Blake Erickson
d0ad5ecc6d
DEV: Remove buffered rendering from group-index-toggle (#8399)
* DEV: Remove buffered rendering from group-index-toggle

This is the first step in a refactor to remove all uses of our Buffered
Renderer:

01e2d5a670/app/assets/javascripts/discourse-common/lib/buffered-render.js.es6 (L3)

This commit affects the header sorting on the group member and the group
requests pages. It is a refactor only with no change in functionality.
2019-11-25 13:36:00 -07:00
Daniel Waterworth
720101b3ee FIX: Update site data when we receive a list of categories
When we receive a list of categories, we should store them so that we
are able to query them in the browser without a page refresh.

This removes a previous fix for the same issue that was much less
general.
2019-11-25 16:50:54 +00:00
Dan Ungureanu
d2d0937986
DEV: Add test for load-more (#8369)
Follow-up to 3650c64bca.
2019-11-25 14:42:34 +02:00
Dan Ungureanu
d5f5d9b867
FIX: Show quoted images correctly. (#8391)
This commit attempts to fix two issues that affect quoted images.

The first issue is observed while loading. The 'position: absolute' CSS
property makes 'width' and 'height' behave differently. Instead of using
the known image size, this makes it use the computed width and height of
the image, which should be the right size, as shown to the user.

The second issue is caused by 'object-fit: cover' property which trimmed
the left and right sides of wide pictures to make them fit inside the
quote.
2019-11-25 14:32:38 +02:00
Dan Ungureanu
a992caf741
DEV: Replace magic values (#8398)
Follow-up to 35942f7c7c.
2019-11-25 14:32:19 +02:00
Martin Brennan
f1cd0d6388 Remove unnecessary commented code 2019-11-25 16:40:27 +10:00
Martin Brennan
dbfe9540fa FIX: be more tactical with replacing markdown chars
* instead of using encodeURIComponent in imageNameFromFileName,
  we just replace the bad characters that we wanted to get rid
  of in the first place where we introduced encodeURIComponent.
  as per review
2019-11-25 16:38:13 +10:00
Martin Brennan
b89e634dd4
FIX: Replace %20 with space in markdown file name for uploads (#8405)
Meta: https://meta.discourse.org/t/image-name-has-20-in-file-name/134136

We were ending up with [file%20name](url) in the markdown preview, which looked weird and
affected the alt text. this is because we were calling encodeURIComponent, which has been left in place because this is a valid thing to do for some cases. (e.g. f674b9e)
2019-11-25 13:54:55 +10:00
Martin Brennan
afb5533581
FEATURE: Add timezone to core user_options (#8380)
* Add timezone to user_options table

* Also migrate existing timezone values from UserCustomField,
  which is where the discourse-calendar plugin is storing them

* Allow user to change their core timezone from Profile

* Auto guess & set timezone on login & invite accept & signup

* Serialize user_options.timezone for group members. this is so discourse-group-timezones can access the core user timezone, as it is being removed in discourse-calendar.

* Annotate user_option with timezone

* Validate timezone values
2019-11-25 10:49:27 +10:00
Krzysztof Kotlarek
43ddf60cdf
FIX: When dismissing category inform via MessageBus (#8371)
When category is dismissed, `dismiss_new` message is sent to fronted to clean state.

In addition, I noticed that when old dismiss new button is clicked, no message is sent so I decided to kill two birds with one stone.
2019-11-25 06:17:31 +11:00