Commit Graph

22697 Commits

Author SHA1 Message Date
David Taylor 4db9f7bb73
FIX: Hide publish_read_state option from non-admin users (#10148) 2020-06-30 16:49:04 +01:00
Sam Saffron 67a310db02
FIX: emoji_autocomplete_min_chars failing when not 0
autocomplete resolving to [] was causing it to stop working.
Instead we have a special const (SKIP) which ensures it will
continue to be evaluated and only this instance is skipped.
2020-06-30 17:39:52 +10:00
Mark VanLandingham d00e83eab1
FIX: update theme fields when updating from ThemesInstallTask (#10143) 2020-06-29 13:49:02 -05:00
Roman Rizzi 7ddd83dfcf
FIX: Uploads cannot be mapped due to the cook-text's element attr being null (#10136) 2020-06-29 15:37:40 -03:00
Mark VanLandingham cd5cfc1496
FEATURE: Site setting to always show category definitions (#10124) 2020-06-29 13:22:02 -05:00
Régis Hanol 860deeb072 FIX: identify slug-less topic urls everywhere
In 91c89df6, I fixed the onebox to support local topics with a slug-less URL.
This commit fixes all the other spots (search, topic links and user badges) where we look up for a local topic.

Follow-up-to: 91c89df6
2020-06-29 12:31:20 +02:00
Dan Ungureanu 4efc126635
FIX: Serialize an empty array if no suggested topics exist (#10134)
It used to return nil, which was ambiguous (empty vs absent
result).
2020-06-26 22:25:38 +03:00
tshenry d5a063993d
FIX: published-page-header should be a sibling to published-page-body not a parent (#10126) 2020-06-25 14:47:05 -07:00
Neil Lalonde 8c9cc5b772
DEV: add class to body of no_ember layout so it can targeted in CSS 2020-06-25 16:17:19 -04:00
Joshua Rosenfeld b52143feff
FIX: Remove paths from robots.txt in favor of noindex header
Google no longer supports the use of robots.txt to block indexing.
See https://support.google.com/webmasters/answer/6062608 and
https://support.google.com/webmasters/answer/93710

Previous commits have added the `noindex` header to appropriate pages,
now we need to remove the paths from robots.txt so the pages can be
crawled.

Follow up to:
13f229808a
b6765aac4b
676be3a853
07b728c5e5
c94e6a9a66
2020-06-25 13:55:06 -04:00
Sam Saffron 88459e08c9
FEATURE: allow disabling of extra term injection in search
There is a feature in search where we take over from the tokenizer
in postgres and attempt to inject more words into search.

So for example: sam.i.am will inject the words i and am.

This is not ideal cause there are many edge cases and this can
cause extreme index bloat.

This is an opening move commit to make it configurable, over the
next few weeks we will evaluate and decide if we disable this by
default or simply remove.
2020-06-25 13:36:52 +10:00
Guo Xiang Tan 9c7d3b2dc0
FIX: Avoid marking notifications as seen in readonly mode. 2020-06-25 10:14:07 +08:00
Régis Hanol 7109d94ee7 FIX: properly invalidate inline oneboxes when rebaking
When rebaking a post we were invalidating _regular_ oneboxes but not inline oneboxes.

DEV: also renamed 'InlineOneboxer.purge' to 'InlineOneboxer.invalidate' to keep
the API consistent with 'Oneboxer.invalidate'
2020-06-24 11:54:54 +02:00
Joffrey JAFFEUX df1f804400
FIX: ensures moderation history is accessible from topic/post admin menu (#10118) 2020-06-24 10:49:47 +02:00
Bianca Nenciu 75151f0457
FIX: Use correct URL for unsubscribe (#10077) 2020-06-24 09:31:20 +02:00
Sam Saffron 9ffc022cf4
DEV: improve verbose mode for reindexer
This makes the verbose mode provide a bit of progress notification
while reindexing as it can take many hours to do a giant site
2020-06-24 17:29:45 +10:00
Sam Saffron 2987901043
FIX: skip category notification_level unless scoped
#b19dcac2 improved the serializer so it sends default notification
levels to users to work around cases where a category edit would
would result in clients being left with invalid notification state

Unfortunately this did not address the root issue.

When we edit categories we publish state to multiple users this
means that the serializer is executed unscoped with no user.

The client already handles this case per:

dcad720a4c/app/assets/javascripts/discourse/app/models/site.js (L119-L119)

If a property is not shipped to it, it will leave it alone on the
existing category.


This fix ensures that these wide category info updates do not
include notification state to avoid corruption of local state.
2020-06-24 17:08:12 +10:00
Kane York 52278ce6fd
FIX: Use Discourse.system_user when we need a placeholder admin (#9781) 2020-06-24 15:51:30 +10:00
Bianca Nenciu 42226e12ee
FEATURE: Add after-user-name plugin outlet (#10113) 2020-06-24 15:45:11 +10:00
Sam Saffron dcad720a4c
DEV: add optional verbose logging to re-index job
This verbose logging can be useful when executing the job by hand
for debugging purposes

In general people will not use this
2020-06-24 15:37:08 +10:00
Jarek Radosz 13087cab54 FIX: Prevent typing "#" when showing "Jump to…"
Closes https://meta.discourse.org/t/the-shortcut-behaves-wrong-in-some-browsers/155531
2020-06-24 00:25:54 +02:00
David Taylor d473ddd02c
FIX: Use raw content when checking for watched words to flag (#10104)
This makes flagged watched words match the behavior of censor, requires_approval and blocked watched words.
2020-06-22 19:48:06 +01:00
Bianca Nenciu 685646540a
FIX: Hide PM tags if the site setting is disabled (#10089)
* FIX: Hide PM tags if the site setting is disabled

* Apply code suggestions
2020-06-22 16:48:24 +03:00
Bianca Nenciu aff9bfd5bc
FIX: Fix select kit size (#10094) 2020-06-22 16:48:00 +03:00
Guo Xiang Tan 3370ef188e
FEATURE: Remove deprecated uploads url site settings.
The site settings have been replaced with direct image upload since
Discourse 2.3.
2020-06-22 14:32:29 +08:00
Martin Brennan 516a03be09
FIX: Improve admin permalink UX (#10101)
The admin permalink list was a little tricky to use because the URLs are easily reduced with a ... if they are too long. This adds a copy to clipboard button for the URL and a title on hover so the full text of the URL can be seen.
2020-06-22 13:14:16 +10:00
Kris 02d3bf304a remove inaccurate comment, follow up to c028936 2020-06-19 16:49:56 -04:00
Kris c0289362f7 Safari icon fix, follow up to 5cc0369 2020-06-19 16:44:34 -04:00
David Taylor 17c4f76eac
FIX: Do not attempt to pull_hotlinked on emoji images when CDN enabled (#10091) 2020-06-19 20:21:05 +01:00
Jarek Radosz f28ea4751b FIX: A variable name typo
Not that this whole method is used much anymore.
2020-06-19 19:29:19 +02:00
Mark VanLandingham 0b58414de2
DEV: Add classes to admin customize nav items (#10092) 2020-06-19 10:51:53 -05:00
Jarek Radosz 58a5293d9b
FIX: Delete PostUploads on Post deletion (#10090)
Related uploads will then be removed by Jobs::CleanUpUploads
2020-06-19 17:45:08 +02:00
Robin Ward 4a2871f7f6
FEATURE: Don't display muted/ignored users under "who liked" (#10084)
* FEATURE: Don't display muted/ignored users under "who liked"

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

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

* Use a circle instead of (?) for unknown user
2020-06-19 10:44:21 -04:00
David Taylor a99bb0ded4
Revert "FIX: Do not attempt to pull_hotlinked on emoji images when CDN enabled"
This changed cause plugin spec failures and needs further investigation

This reverts commit 78626d2832.
2020-06-19 14:39:16 +01:00
David Taylor 9f2e7e4651
FIX: Handle invalid URLs gracefully when pulling hotlinked images 2020-06-19 12:52:51 +01:00
David Taylor 78626d2832
FIX: Do not attempt to pull_hotlinked on emoji images when CDN enabled 2020-06-19 12:45:06 +01:00
Joffrey JAFFEUX 3e161e372a
FEATURE: allows to have header/footer in publshed pages (#10067)
Usage: fill Header/Footer sections of your theme.
2020-06-19 09:51:03 +02:00
Martin Brennan b5495b8e9c
FIX: Do not incorrectly add topic bookmark on Escape (#10088)
* The first post was showing as bookmarked incorrectly after pressing f to open the topic modal then pressing escape to cancel without saving, because the closeWithoutSaving option was not being respected.
* Also re-introduce the enter shortcut when the name input is focused to saveAndClose the bookmark modal by pressing enter.
2020-06-19 11:17:18 +10:00
Kris 5faf074e61 minor fix to post admin menu button class 2020-06-18 19:18:00 -04:00
Vinoth Kannan ae47bcb269
DEV: move user references deletion code to `before_destroy`. (#10085)
Moving the `delete_source_user_references` method code from user merger service to user model.
2020-06-18 17:42:39 -04:00
Bianca Nenciu a1df68d4c4
FIX: Do not change tracked categories for staged users (#10076) 2020-06-18 21:09:54 +03:00
Cassius d13d5e2b99
FIX: Allow multiple hyphens in host (#10078)
* FIX: Allow multiple hyphens in host

* FIX: added spec for multiple hyphens
2020-06-18 13:58:47 -04:00
Robin Ward 494a27dc27 FIX: A much nicer error message if you can't ignore/mute a user 2020-06-18 13:41:27 -04:00
Robin Ward 6cb6faff29 UX: Ignore modal margin was too tight 2020-06-18 13:26:25 -04:00
Joffrey JAFFEUX b8c676e727
FEATURE: allows to ignore a user forever (#10074) 2020-06-18 11:24:07 -04:00
Bernhard Suttner e31471585a
DEV: allow to have duplicate topic titles if categegory is different (#10034)
Co-authored-by: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-06-18 11:19:47 -04:00
Mark VanLandingham ec794c7f29
DEV: Plugin outlet after user-info (#10072) 2020-06-18 10:18:34 -05:00
Dan Ungureanu d21a08c284
DEV: Deprecate Category#url_with_id in favor of Category#url (#9972) 2020-06-18 11:32:14 +03:00
Dan Ungureanu 62faa0f5fe
FIX: Do not show Add or Change buttons if email is not editable (#10068) 2020-06-18 11:15:44 +03:00
Penar Musaraj d72ed8c5a8
UX: Include category name in hyperlink modal results on mobile 2020-06-17 14:46:01 -04:00
Dan Ungureanu a60a67c431
FIX: Show unconfirmed emails too when checking emails (#10062)
When checking emails through user preferences, it did not display the
unconfirmed emails.
2020-06-17 21:41:01 +03:00
Jeff Wong 81a3129ffb
ARIA - add aria-label on topic input and post textarea (#10057)
Add reply form role with label as create/reply, and aria-labels on text inputs
2020-06-17 08:55:19 -07:00
Penar Musaraj 76b05ef8ad
DEV: Use short_date helper for email post template (#10063) 2020-06-17 11:29:37 -04:00
David Taylor 6caad5c083
FIX: Do not send staff welcome message if user already has role 2020-06-17 12:12:55 +01:00
Joffrey JAFFEUX 9da3a7f436
FEATURE: allows published pages to be public (#10053) 2020-06-17 12:42:20 +02:00
Jarek Radosz 7d289a4f3e
UX: Style video elements, show descriptions (#10040)
It's a stop gap – ideally we would generate a thumbnail for uploaded videos. For now, a bit of intentionality in the style and a pinch of context should do.
2020-06-17 12:38:00 +02:00
Jarek Radosz a859d507e7
FIX: Prevent producing "undefined" strings (#10042)
Fixes a bug in search-menu-results (type: "group"), where:

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

`groupNames` could end up having value "undefined" if a group doesn't have a `fullName`.
2020-06-17 12:37:06 +02:00
Faizaan Gagan d66ccabdb1
DEV: Added topic-list-after-title outlet in the mobile template (#10059) 2020-06-17 10:05:37 +01:00
Guo Xiang Tan 52580605d8 FIX: select-kit components not being hidden. 2020-06-17 09:39:51 +08:00
tshenry a3e812453e
FEATURE: new category-list-above-each-category plugin outlet (#10037) 2020-06-16 11:53:36 -07:00
Jarek Radosz df0e3b4ed4
FIX: Allow opening FAQ in a new tab (#10039) 2020-06-16 17:35:04 +02:00
Samuel Carvalho Santos ce37561e10
UX: Improve revert label in post history modal (#10038) 2020-06-16 11:31:25 -04:00
spirobel 4b4f568ec0
add showPreview to composer fields plugin outlet (#10019)
showPreview is necessary because we need to add 50% width class similar to: class="title-and-category with-preview" on the category and title div if the preview is shown.
2020-06-16 10:50:55 -04:00
Dan Ungureanu f1b97202d4
FIX: Ensure users can confirm new emails using security keys 2020-06-16 14:19:21 +03:00
Dan Ungureanu 84dfaad137
FIX: Fill acting_user field instead of target_user in history 2020-06-16 13:30:58 +03:00
Dan Ungureanu 219bb0b6a7
DEV: Fix build
Follow-up to 6258406419.
2020-06-16 13:00:09 +03:00
Krzysztof Kotlarek 6258406419
FIX: secondary_emails, unconfirmed_emails, group_users are private fields
Those fields should be only visible to the user.
2020-06-16 12:46:27 +03:00
David Taylor a2f80670e1
FIX: Do not count youtube thumbnail when counting post images (#10049) 2020-06-15 20:25:30 +01:00
Penar Musaraj 298393a5bc
FIX: Keep onebox styling in edit history 2020-06-15 15:23:14 -04:00
Arpit Jalan a94387c088 FIX: check for inviter group permissions at the time of redeeming invite 2020-06-15 14:44:35 +05:30
Guo Xiang Tan 402b80f306
DEV: Make rails_failover compatible with `SKIP_DB_AND_REDIS` env. 2020-06-15 16:23:24 +08:00
Guo Xiang Tan 58e52c0e4f
DEV: Use rails_failover gem for ActiveRecord and Redis failover handling 2020-06-15 15:47:07 +08:00
Arpit Jalan 6780d4d70c FIX: process /invites/ route from server side only 2020-06-15 12:31:27 +05:30
Guo Xiang Tan d8cd912769
DEV: Switch to db config to disable advisory locks. 2020-06-15 14:33:41 +08:00
Martin Brennan 35a157619a
FEATURE: Add "Now" as an option (default hidden) to the future date input selector (#10047)
Sometimes you need to schedule things from now onward. "Now" in this case is now + 1 minute. this option is hidden by default.
2020-06-15 14:06:03 +10:00
Kris 7429512ced FIX: Get correct right/left offset for topic progress bar on compose 2020-06-12 18:44:42 -04:00
Kris 16b41aa485 Save button alignment fixes for admin badge page 2020-06-12 17:15:59 -04:00
Kris 2adad96d05 Center align items in select kit headers 2020-06-12 17:07:50 -04:00
Kris d0a7f15764 Usercard buttons on mobile should utilize full width 2020-06-12 16:24:25 -04:00
Bianca Nenciu ff6811ceb8
Allow multiple groups which can vote when creating a poll (#10015)
* FEATURE: Allow multiple groups which can vote when creating a poll

* DEV: Fix select-kit deprecations

* DEV: Fix lint
2020-06-12 14:52:32 +03:00
Dan Ungureanu 111877db1f
FIX: Load I18n first in show_confirm_new_email page 2020-06-12 14:49:16 +03:00
Bianca Nenciu 60196cc192
FIX: Hide bootbox after a negative answer (#10028)
Starting to reply and then editing a post was not possible because of a
bootbox which kept showing up.
2020-06-12 13:48:45 +02:00
Sam Saffron 7211394e4d
FEATURE: include tags in unread/new messages
We need this information to maintain counts on tracked/watched
tags.
2020-06-12 16:20:30 +10:00
Penar Musaraj f57ecf22e0
UX: Send background color to iPad app too
Previously, we were only updating mobile devices.
2020-06-11 23:20:25 -04:00
Guo Xiang Tan 2fbd4eb11f
DEV: Remove double query in `Group#remove_review_group`.
Probably a mistake during commit.
2020-06-12 10:14:45 +08:00
Guo Xiang Tan 62ad473716
FIX: Preload readonly mode attribute seperately.
There are two problems I'm trying to tackle here.

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

2. We've already checked for readonly mode in the controller so having
to check for readonly mode again in `SiteSerializer` is adding an extra
Redis query on every request.
2020-06-12 09:54:05 +08:00
Dan Ungureanu b7e70850e4
FIX: Allow users to add emails which were deleted before 2020-06-11 14:54:11 +03:00
Bianca Nenciu dd85d44dda
FIX: Show tag count for existing tags (#9892)
* FIX: Show tag count for existing tags

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

This ensures tracking state is properly shipped to client if
show_filter_by_tag is enabled.
2020-06-11 16:47:57 +10:00
Mark VanLandingham b8acb36532
DEV: Plugin outlet at top of user preference interface (#10020) 2020-06-10 13:36:50 -05:00
Blake Erickson 1ce6ff0a55 DEV: Include raw in post webhook serializer
This came in as a request on meta to include the raw field in the post
webhook serializer.

 https://meta.discourse.org/t/-/49045/55?u=blake

 Including this field can prevent needing to make a 2nd API request to
 get the raw field of a post.

 It would be handy down the road if we updated the webhook ui to specify
 fields or arguments that you wanted to be included in the serialized
 data, but most requests I've seen to update the serializers have been
 valid requests that are good to add anyways, so I don't think we have
 reached that point yet.
2020-06-10 11:56:39 -06:00
Dan Ungureanu 5bfe1ee4f1
FEATURE: Improve UX support for multiple email addresses (#9691) 2020-06-10 19:11:49 +03:00
Dan Ungureanu 3a7ca97c36
FIX: Use include-subcategories filter in report export (#10007)
Some filters were renamed and the conversion of the filter names and arguments
was removed.
2020-06-10 18:57:39 +03:00
Joffrey JAFFEUX 8fe074430b
REVERT: partly revert change to ensure context is the same (#10012) 2020-06-10 11:10:39 +02:00
Guo Xiang Tan 31a527a293
FIX: Return 400 when invalid topic_id is provided when creating invite. 2020-06-10 09:29:28 +08:00
Guo Xiang Tan 45fd668dc5
DEV: Render a proper response that can be handled on the client side. 2020-06-10 09:25:58 +08:00
Krzysztof Kotlarek f993d8a197
FIX: flaky post_alerter_spec.rb because of missing order (#10000) 2020-06-10 08:28:54 +10:00
David Taylor 9e98c02dd7
FIX: Don't call cooked decorators in composer if cooked is unchanged
If cooked is unchanged, ember will not re-render the preview area, so we should not re-run the post-processing decorators. This can cause issues when decorateCooked functions are not idempotent.
2020-06-09 23:01:07 +01:00
Vinoth Kannan f67e7d2fad FIX: add attributes of `params` to topic `findOpts`.
If `params` is ignored then `findTopicList` won't get the `no_subcategories` attribute.

d27b877a40
2020-06-10 01:33:58 +05:30