Commit Graph

22507 Commits

Author SHA1 Message Date
Joffrey JAFFEUX 06e1d430c1
FIX: better cross browser topic footer buttons alignment (#9860) 2020-05-22 17:03:22 +02:00
Roman Rizzi 671f882fa3
FIX: We don't create a Post object if the queued post gets rejected. We need to count review items directly. (#9856) 2020-05-22 11:50:28 -03:00
Mark VanLandingham f9649c92b5
FIX: Live reloading of css in development (#9859) 2020-05-22 16:37:35 +02:00
Joffrey JAFFEUX 793085c703
REFACTOR: slightly cleaner topic admin button css (#9858) 2020-05-22 15:23:17 +02:00
Joffrey JAFFEUX e71f5e8951
UI: apply margin only if the menu has content (#9857) 2020-05-22 15:19:55 +02:00
Martin Brennan f9d55b4941
FEATURE: Update the topic excerpt when the OP is rebaked (#9852)
* We now have a site setting "topic_excerpt_maxlength" that is used when the OP is created or revised to generate a topic excerpt.
* However, posts created before this setting was introduced cannot benefit from this change unless they are revised, and if the topic excerpt length setting is changed that situation is also not covererd.
* This PR makes a change to rebake! to update the topic excerpt IF the post is the OP.
2020-05-22 13:04:15 +10:00
Martin Brennan c0779df99d
FIX: Remove access control post FK from uploads (#9853) 2020-05-22 11:20:25 +10:00
Robin Ward d11c462104 SECURITY: ERB execution in custom Email Style 2020-05-21 14:48:30 -04:00
Neil Lalonde 5a71c51ddd
FIX: tag input says tags are optional when they're required 2020-05-21 12:40:33 -04:00
Mark VanLandingham 1a5bcf2a64
UX: Remove live theme previewing in favor of refresh (#9798) 2020-05-21 08:32:50 -05:00
Joffrey JAFFEUX 66960563ea
FIX: ensures category chooser is case insensitive (#9850) 2020-05-21 11:16:44 +02:00
Joffrey JAFFEUX 7b6fbe9af2
FIX: adds missing tags to published page header (#9835) 2020-05-21 11:04:23 +02:00
Arpit Jalan 18959ff9da UX: user name instead username for profile link title 2020-05-21 14:02:12 +05:30
Arpit Jalan 3c9212fd88 UX: add title for user profile link 2020-05-21 13:00:05 +05:30
Martin Brennan df68d11c38
FEATURE: Add topic excerpt max length site setting (#9847)
Adds a new topic_excerpt_maxlength site setting.

* When topic excerpt is requested for a post, use the new topic_excerpt_maxlength site setting to limit the size of the excerpt
* Remove code for getting/setting Post.excerpt_size as it is not used anywhere
2020-05-21 13:19:48 +10:00
Guo Xiang Tan 68db5deaec
FIX: Badge granter was disabled by default. 2020-05-21 06:55:22 +08:00
Kris 62ecb2885f glob @import desktop and mobile scss 2020-05-20 18:05:27 -04:00
Roman Rizzi 234933c781
FIX: Show staff counters if the rejected posts count is the only value to show (#9845) 2020-05-20 19:00:35 -03:00
Kris eef47a26d9 UX: More consistent mobile banner/alert styles, css cleanup 2020-05-20 17:17:47 -04:00
Robin Ward 096eca0ee8 FIX: Requests were not being logged correctly
`enable` was defaulting to `nil` which is not what we wanted.
2020-05-20 15:09:17 -04:00
Robin Ward ba04bb7552 FIX: Path should be `addon` not `app` 2020-05-20 12:13:15 -04:00
Robin Ward 3062036f2f FIX: Allow deprecation to work with Ember CLI 2020-05-20 12:05:56 -04:00
Régis Hanol 8851b79472 DEV: less code for Category#url 2020-05-20 18:01:06 +02:00
Robin Ward 09ca75d17e FIX: select-kit was in the wrong place
`app/` means we want to merge it into our application there. `addon`
means give it its own module namespace, which is what we wanted.
2020-05-20 11:51:49 -04:00
Jordan Vidrine 8e7efb48ae
FIX: Update default_template.html 2020-05-20 10:39:04 -05:00
Robin Ward 6c9c8dfefd FIX: `guidFor` is not part of `Ember.Object` 2020-05-20 11:31:11 -04:00
Mark VanLandingham bd57ae83f1
DEV: Guardian for hiding about stats (#9841) 2020-05-20 10:26:20 -05:00
Joffrey JAFFEUX 30631a963f
UX: moves editFirstPost in taggable Pms in dropdown on mobile (#9840) 2020-05-20 14:07:00 +02:00
Bianca Nenciu fb15da43da
Remove old web hooks in favor of 'reviewable' web hook (#9776)
* FIX: Emit web hooks for flags

* FEATURE: Remove 'flag' web hook in favor of 'reviewable' web hook

* FEATURE: Remove 'queued post' web hook in favor of 'reviewable' web hook

* FIX: Do not set a default value for web hooks with no events
2020-05-20 12:07:48 +03:00
Guo Xiang Tan f7f436e536
DEV: Install `rails_failover` gem to test our Redis changes. 2020-05-20 15:40:27 +08:00
Sam Saffron e97cb20c2a
UX: strip text from PM bookmark and share buttons
Also organize priorities in an easier to reason about way and
shift bookmark topic so it is after link. (consistent with posts)
2020-05-20 16:46:49 +10:00
Guo Xiang Tan 234cd5c3e7
FIX: Switch discobot to pull avatar from gravatar. 2020-05-20 10:20:08 +08:00
Sam Saffron 6b92c78033
FIX: purge all associated data on user delete
This commit reorganises the delete dependencies on users and make sure
all are covered. We forgot some on bookmarks, security keys, anon users
and so on.
2020-05-20 11:27:57 +10:00
Kris a93d0a8fcc UX: Remove bold from category badge text 2020-05-19 21:11:49 -04:00
Roman Rizzi 52228b1fa6
DEV: These routes don't exist anymore (#9823) 2020-05-19 16:09:03 -03:00
Joffrey JAFFEUX a239900522
UI: reduces category row description margin (#9834) 2020-05-19 20:44:54 +02:00
Joffrey JAFFEUX 05d8091bd3
DEV: adds triggerOnChangeOnTab option to select-kit (#9833)
Usage:

```
options=(hash triggerOnChangeOnTab=false)
```

This will prevent to select the row when pressing tab.
2020-05-19 20:39:29 +02:00
Joffrey JAFFEUX ab6737c44a
UX: improves topic-notifications-button loading behavior (#9832) 2020-05-19 17:13:40 +02:00
Arpit Jalan f038f8f154 FIX: description for 'uncategorized' category was blank 2020-05-19 18:45:43 +05:30
Joffrey JAFFEUX 7c3663ff73
UX: adds visual feedback when changing topic notifications level (#9831) 2020-05-19 13:27:57 +02:00
Dan Ungureanu 05ca0c908f
FIX: GroupArchivedMessage belongs to Group, not User 2020-05-19 14:13:28 +03:00
David Taylor 725e38f9d7
DEV: Allow plugins to request topic thumbnail sizes (#9828)
In plugin.rb, you can register new sizes like

```
register_topic_thumbnail_size [512, 512]
```

For more information about thumbnails see 03818e642a
2020-05-19 10:38:58 +01:00
Joffrey JAFFEUX 1647ba4624
FIX: applies flex on topic-footer-main-buttons (#9829) 2020-05-19 11:29:38 +02:00
Joffrey JAFFEUX 3623a395dc
UI: refinements to topic footer buttons (#9780) 2020-05-19 09:51:34 +02:00
Guo Xiang Tan 062cb1e1cb
UX: Remove caret from notifications-button. 2020-05-19 13:41:13 +08:00
Kris 864fb45ff0 Improve mobile friendliness of crawler view 2020-05-19 00:24:17 -04:00
Gerhard Schlager 6d5e9db883 FIX: Restoring backup didn't clear cached translation overrides 2020-05-18 18:51:51 +02:00
Gerhard Schlager 27c611b1d1 FIX: Reverting multiple translation overrides didn't clear cache 2020-05-18 18:51:29 +02:00
Joffrey JAFFEUX cfad38184d
FIX: improves and fixes a regression with category-selector (#9821) 2020-05-18 17:44:47 +02:00
David Taylor 96848b7649
UX: Allow secure media URLs to be cached for a short period of time
Signed S3 URLs are valid for 15 seconds, so we can safely allow the browser to cache them for 10 seconds. This should help with large numbers of requests when composing a post with many images.
2020-05-18 15:00:41 +01:00
Joffrey JAFFEUX 1876b3cc4c
FIX: more resilient/consistent date-picker loading (#9817) 2020-05-18 15:29:24 +02:00
Joffrey JAFFEUX 48ed1b40cf
REFACTOR: ensures later is correctly canceled (#9796) 2020-05-18 14:20:23 +02:00
Joffrey JAFFEUX 9482ddff73
UX: show caret only in topic footer buttons dropdown select boxes (#9816) 2020-05-18 14:07:40 +02:00
David Taylor f968155288
FIX: Ensure no image downloads during topic thumbnail serialization
If image uploads are missing a width/height, we re-download them to update the width/height in the database. However, this takes significant resources so we don't want to run this logic during topic serialization.
2020-05-18 12:04:29 +01:00
Joffrey JAFFEUX 918bd75909
FIX: allows to remove a topic timer with delete_replies as type (#9800) 2020-05-18 11:47:08 +02:00
Guo Xiang Tan d01c336899
DEV: Clean up some Redis leaks in test env. 2020-05-18 17:27:37 +08:00
Joffrey JAFFEUX 320b21ab5b
UX: allows dropdown-select-box to display a caret (#9803)
```
selectKitOptions: {
  showCaret: true // default false
}
```
2020-05-18 10:50:33 +02:00
Joffrey JAFFEUX e5dc843185
FIX: ensures hide is called when card is destroyed (#9814) 2020-05-18 10:10:40 +02:00
Joffrey JAFFEUX e81a4048e3
REFACTOR: s/focusAfterOnchange/focusAfterOnChange (#9801) 2020-05-16 11:20:37 +02:00
Robin Ward db8e872bda
DEV: Move select kit to an addon (#9797) 2020-05-15 16:07:35 -04:00
Alan Guo Xiang Tan 7f07c513a7
FIX: Switching composer action does not refresh composer actions content (#9791) 2020-05-15 13:54:44 -04:00
Robin Ward 6b04760572 FIX: Component was still used by data explorer 2020-05-15 13:52:03 -04:00
David Taylor eee20a9814
FIX: Include plugin CSS assets when previewing themes 2020-05-15 18:12:53 +01:00
Joffrey JAFFEUX 7edd312f85
UX: focus category name when editing category (#9795) 2020-05-15 18:27:06 +02:00
Joffrey JAFFEUX b07f1bfd93
FIX: displays a title on sk header if no selected name (#9794)
none has to be defined.
2020-05-15 17:36:00 +02:00
Justin DiRose 9810ca1dbd
UX: Add copied text upon copy button click (#9793) 2020-05-15 17:08:46 +02:00
Guo Xiang Tan d1146ccb7b
Revert "FIX: Correct plugin api version bump."
This reverts commit 6a96c424b7.

False alarm. I was deploying on a docker image which was still on 0.9.0.
2020-05-15 21:22:44 +08:00
Guo Xiang Tan 6a96c424b7
FIX: Correct plugin api version bump.
It doesn't seem to be following semver.
2020-05-15 21:17:50 +08:00
David Taylor 461b4e5cc6
DEV: Add framework for filtered plugin registers (#9763)
* DEV: Add framework for filtered plugin registers

Plugins often need to add values to a list, and we need to filter those lists at runtime to ignore values from disabled plugins. This commit provides a re-usable way to do that, which should make it easier to add new registers in future, and also reduce repeated code.

Follow-up commits will migrate existing registers to use this new system

* DEV: Migrate user and group custom field APIs to plugin registry

This gives us a consistent system for checking plugin enabled state, so we are repeating less logic. API changes are backwards compatible
2020-05-15 14:04:38 +01:00
David Taylor 0495a748d0
FIX: Use CDN URLs for topic thumbnails 2020-05-15 13:35:20 +01:00
Guo Xiang Tan 162d125b83
Fix lint. 2020-05-15 20:23:17 +08:00
Guo Xiang Tan dada1fc417
UX: Better composer-action icon when creating new topic. 2020-05-15 16:40:49 +08:00
Guo Xiang Tan f9a9bd136b
FEATURE: Expose `Composer.serializeToTopic` in client side plugin api. 2020-05-15 16:16:58 +08:00
Sam Saffron 0cbaa8d813
FEATURE: extend duration allowed for download
Previously we would raise a warning in the logs if downloading
a file (from s3) takes longer than 60 seconds.

At scale this happens reasonably frequently.

1. Raised the duration to 3 minutes

2. Pulled the resizing mutex out of the downloading mutex
so we have less and clearer error logs
2020-05-15 12:45:47 +10:00
Guo Xiang Tan 165fa13c9d
FIX: Always return 0 for non-human user current DraftSequence. 2020-05-15 10:40:36 +08:00
Guo Xiang Tan e37ea4a4a1
Revert "FIX: don't compute draft for bots on categories index route"
This reverts commit 1b7f23a1bc.
2020-05-15 10:40:35 +08:00
Blake Erickson 1a2b9435b0
DEV: Standardize table sorting verbiage (#9757)
* DEV: Standardize table sorting verbiage

This commit creates a common component that tables can use to make their
headers sortable. This commit also standardizes on using `desc` as the
default and passing in the `asc=true` flag to adjust the sorting
direction.

* Add deprecation warnings

Adds deprecation warnings if using previous params and maintains
backwards compatibility. Set the default sort value for group members to
be asc.

* switch group requests to use common table-header-toggle

* update fixture
2020-05-14 20:10:59 -06:00
Rafael dos Santos Silva 11cd149122
FIX: WebAPK minting was broken due to shortcut icons
SVG support is very flaky, but this way at least minting works again
2020-05-14 21:56:35 -03:00
Kane York 869f9b20a2
PERF: Dematerialize topic_reply_count (#9769)
* PERF: Dematerialize topic_reply_count

It's only ever used for trust level promotions that run daily, or compared to 0. We don't need to track it on every post creation.

* UX: Add symbol in TL3 report if topic reply count is capped

* DEV: Drop user_stats.topic_reply_count column
2020-05-14 15:42:00 -07:00
Rafael dos Santos Silva 675c9c38c8
Revert "FIX: Workaround WebAPK server bug with images without sizes"
This reverts commit bb7fca832f.
2020-05-14 19:33:54 -03:00
Rafael dos Santos Silva bb7fca832f
FIX: Workaround WebAPK server bug with images without sizes
Google WebAPK server was returning 500 with `any` sized svgs,
which is a spec violation.

Workaround for now setting a static size.

See https://bugs.chromium.org/p/chromium/issues/detail?id=1061911
2020-05-14 18:08:51 -03:00
Penar Musaraj 5ff2a235f6 DEV: Allow 3-digit HEX color code in single icon route
Followup to aee8e62
2020-05-14 16:37:45 -04:00
Neil Lalonde 1b7f23a1bc
FIX: don't compute draft for bots on categories index route 2020-05-14 16:35:32 -04:00
Kane York e0e967ac46
FIX: Apply code quoting with no syntax highlighting (#9784) 2020-05-14 13:03:42 -07:00
Rafael dos Santos Silva 4595560537
FIX: Use proper icons for App shortcut menu
Follow up to 3b0fa9b using the new icon URL introduced in e618efe

Will automatically use icons of the primary color of the active theme
 for the user during install.
2020-05-14 16:32:53 -03:00
Penar Musaraj aee8e62e21
FEATURE: Add endpoint for individual SVG icons (#9765) 2020-05-14 14:17:19 -04:00
Mark VanLandingham bec6bace53
DEV: Allow plugins to hide user stats by new guardian method (#9772) 2020-05-14 11:57:35 -05:00
Penar Musaraj 87b9488137 UX: Limit iOS modal keyboard changes to composer
Followup to 423802fbc
2020-05-14 12:48:28 -04:00
Robin Ward aa2d040526 DEV: Update ESLint to remove I18n global
Also fixes missed imports in core.
2020-05-14 10:18:12 -04:00
Joffrey JAFFEUX 42e5a5bb39
DEV: do not append/prepend if callback returns nothing (#9778) 2020-05-14 14:38:03 +02:00
Dan Ungureanu 321879a619
FIX: Load locale first in wizard app 2020-05-14 11:48:55 +03:00
Guo Xiang Tan 9a18bacbe3
DEV: Fix lint. 2020-05-14 16:10:51 +08:00
Guo Xiang Tan a1a798ac7d
DEV: Expose `Composer.serializeOnUpdate` in client side plugin api.
Also expose `Composer.serializeOnCreate` as well.
2020-05-14 16:06:29 +08:00
Guo Xiang Tan fdea969f14
DEV: Minor follow up to d7e230c1b9 2020-05-14 16:02:54 +08:00
Guo Xiang Tan 95a80525ae
DEV: Remove erroneous code introduced in d7e230c1b9 2020-05-14 15:58:44 +08:00
Guo Xiang Tan d7e230c1b9
UX: Introduce composer-actions when editing a post. 2020-05-14 15:56:08 +08:00
Dan Ungureanu b80128a973
FEATURE: Add structured data to follow Google's guidelines (#9764)
All Schema.org properties are optional, but Google has a set of
properties which are required.
2020-05-14 10:42:01 +03:00
Vinoth Kannan c014b93854
UX: don't disable "create account" button & display error message for required fields. (#9643) 2020-05-14 12:15:33 +05:30
Sam Saffron 3d050bdaa3
DEV: correct test suite
We have no choice but to bypass recursive debouncers in test

Otherwise we overrun the stack with frames
2020-05-14 16:41:34 +10:00
Sam Saffron ce4b5b56e5
FIX: never save draft while it is saving
Previously if saving a draft took longer than 2 seconds there
could be conditions where drafts could be saved concurrently.
This meant the composer could race with itself and raise conflicts.

This is likely to happen on bad internet connections or where
latency is really high.

Additionally a throttle was added so drafts save unconditionally
every 15 seconds.

Save draft in the model now properly and consistently returns a
promise.
2020-05-14 15:36:18 +10:00
Penar Musaraj ad7c964cd1 FIX: Prevent Safari from scrolling when closing composer
Unlike other browsers, Safari maintains focus on elements even when
they are hidden. And since the composer is fixed-positioned when hidden,
closing the composer on a topic with several replies causes Safari to
scroll the window up.

Deliberately blurring the focused element fixes the issue.
2020-05-13 21:24:40 -04:00
Robin Ward eab560fe2a
DEV: import I18n instead of global usage (#9768)
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
Co-authored-by: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2020-05-13 16:23:41 -04:00
Kane York 1059557ce1
DEV: Standardize ignored_columns removal comments (#9771) 2020-05-13 13:08:15 -07:00
Mark VanLandingham 3d54f497db
DEV: add classes to li's inside user navigation (#9766) 2020-05-13 12:22:14 -05:00
Guo Xiang Tan c405b15914
DEV: Add plugin outlet `revision-user-details-after`. 2020-05-13 15:40:37 +08:00
Sam Saffron 7f841dc21f
PERF: avoid race conditions when creating topic links
Previously the code was very race condition prone leading to
odd failures in production

It was re-written in raw SQL to avoid conditions where rows
conflict on inserts

There is no clean way in ActiveRecord to do:

Insert, on conflict do nothing and return existing id.

This also increases test coverage, we were previously not testing
the code responsible for crawling external sites directly
2020-05-13 16:05:57 +10:00
Martin Brennan a64cf265fd
FIX: Change /bookmarks URL back to topic list and add bookmark poster avatars (#9759)
* Changes the /bookmarks URL to show the original "topics filtered by bookmark" list instead of redirecting to user activity bookmarks (see https://meta.discourse.org/t/domain-com-bookmarks-is-showing-domain-com-u-user-activity-bookmarks-with-reminders/149252/12)
* Add the user avatar for the user who made the post that is bookmarked
2020-05-13 14:03:24 +10:00
Kris 811bc3544f prettier 2020-05-12 23:12:46 -04:00
Guo Xiang Tan 34c39b65bb
PERF: Avoid executing the same query twice. 2020-05-13 11:10:09 +08:00
Guo Xiang Tan 822e594fc8
UX: Improve display of site setting validation message.
Previously, the validation message is shown inline with the label which
leads to the available width for both element being reduced.
2020-05-13 11:10:08 +08:00
Kris 765e842101 UX: remove underline from del & ins elements 2020-05-12 22:51:28 -04:00
Martin Brennan 9981fa4466
FIX: Prevent column name conflicts in reviewable code (#9753)
We were getting errors like this in Reviewables in some cases:

```
ActiveRecord::StatementInvalid (PG::AmbiguousColumn: ERROR:  column reference "category_id" is ambiguous
LINE 4: ...TRUE) OR (reviewable_by_group_id IN (NULL))) AND (category_i...
```

The problem that was making everything go boom is that plugins can add their own custom filters for Reviewables. If one is doing an INNER JOIN on topics, which has its own category_id column, we would get the above AmbiguousColumn error. The solution here is to just make all references to the reviewable columns in the list_for and viewable_by code prefixed by the table name e.g. reviewables.category_id.
2020-05-13 09:05:56 +10:00
Robin Ward d9f5499f3a Revert "Revert "DEV: Remove `Discourse.Route`""
This reverts commit b4d27d327d.

Plugins have been updated to not use this anymore.
2020-05-12 14:15:07 -04:00
Daniel Waterworth 497dc6eaa7 Add a global setting for CDN origin
This is so that, on a multisite cluster, when we handle a CDN request,
the hostname that is requested corresponds to one of the sites -
specifically the default site.
2020-05-12 16:43:40 +01:00
Rafael dos Santos Silva 2298e14d38
FEATURE: Support for App Shortcuts Menu (#9749)
* FEATURE: Support for App Shortcuts Menu

This adds a list of shortcuts to a installed Discourse instance.

It can be accessed by right clicks or long press on the app icon.

See https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/Shortcuts/explainer.md

List of possible follow ups include:

- Making it admin customizable
- Making it user customizable
- Using SVG icons from the site icon sprite
- Picking an accent color for icons

* FIX: Add type to shortcut menu icons
2020-05-12 12:24:33 -03:00
Robin Ward 088c11a12c FIX: Don't raise an exception if a TopicLink cannot be created
This can happen under concurrency and it's fine. If a `TopicLink`
already exists we can continue on without raising an error.
2020-05-12 11:15:59 -04:00
Joshua Rosenfeld c94e6a9a66
FEATURE: add noindex header to tags pages (#9748) 2020-05-12 10:44:46 -04:00
Mark VanLandingham 9bce91f59f
DEV: Allow plugins to add extra icons to category-link (#9743) 2020-05-12 09:41:16 -05:00
Bianca Nenciu 16137308b0
FIX: Show Settings button if plugin has settings (#9728)
It used to check if the plugin has an enabled_setting.
2020-05-12 11:18:19 +03:00
Sam Saffron a29ae17d3a
FIX: saving drafts unconditionally increases sequence
Previously we only changed sequence on ownership change, this
cause a race condition between tabs where user could type for a
long time without being warned of an out of date draft.

This change is a radical change and we should watch closely.

Code was already in place to track sequence on the client so no
changes are needed there.
2020-05-12 16:55:42 +10:00
Sam Saffron 451e9c4bb9
DEV: minor SQL formatting change
Moved join prior to left join to make query less confusing.

Has no material impact on performance.
2020-05-12 16:55:42 +10:00
Guo Xiang Tan 8fb99f218d
FEATURE: Allow plugins to register a callback to ignore DraftSequence. 2020-05-12 14:25:20 +08:00
Guo Xiang Tan d301af39bd
PERF: Avoid hitting DB when fetching draft sequence of bot user. 2020-05-12 13:56:58 +08:00
Martin Brennan 39a2d90e0f
DEV: Pass currentUser to post-menu button builders (#9752)
Adding this from a review; I was using Discourse.currentUser which is frowned upon now.

Passing currentUser both for regular post menu buttons and extra buttons attached via the plugin API.

Lots of formatting/whitespace changes, best off reviewing with ?w=1
2020-05-12 14:09:38 +10:00
Kris a009ec597d remove ember container div 2020-05-11 21:12:33 -04:00
tshenry 6f228b0312
FIX: Remove unnecessary forward slashes in regex 2020-05-11 17:55:44 -07:00
Penar Musaraj 7cdf41d311 DEV: Remove reference to Discourse.Category 2020-05-11 18:28:45 -04:00
Jeff Wong e744b9efec FIX: add tabindex=-1 on tabLoc post links
This prevents tabbing from confusing screenreaders, as having default tabindex
with aria-hidden confuses screenreaders
2020-05-11 14:43:12 -07:00
Penar Musaraj 90b900704b FIX: Improve mobile footer nav accessibility 2020-05-11 16:55:34 -04:00
Robin Ward b4d27d327d Revert "DEV: Remove `Discourse.Route`"
This reverts commit eed7983404.
2020-05-11 16:50:53 -04:00
Robin Ward 22af44ac49 DEV: Remove `Discourse.Mobile` 2020-05-11 16:13:29 -04:00
Robin Ward eed7983404 DEV: Remove `Discourse.Route` 2020-05-11 16:11:33 -04:00
Robin Ward 74db317974 DEV: Remove deprecation for `Discourse.Category` 2020-05-11 16:10:21 -04:00
Joffrey JAFFEUX 286b4e535e
DEV: allows buttons to define aria-label (#9747) 2020-05-11 22:09:44 +02:00
Robin Ward b4bd238dd6 DEV: Add safe deprecation to `Discourse.User` 2020-05-11 16:08:12 -04:00
Robin Ward 46730a2f0d DEV: Allow us to keep the deprecation with Ember CLI 2020-05-11 16:06:06 -04:00
Robin Ward 4c17ff98fa DEV: Remove deprecation for `Discourse.Session` 2020-05-11 15:51:10 -04:00
Robin Ward 8311374a5a DEV: Replace `version.js.erb` with pre generated file 2020-05-11 15:43:09 -04:00
Robin Ward d2b16a7618
DEV: Generate `emoji/data` on demand (#9744)
These emoji rarely change and can be re-generated when we make changes
to them.
2020-05-11 15:29:46 -04:00
Joffrey JAFFEUX af6e61defd
FIX: sets a title for notifications button (#9745) 2020-05-11 20:46:08 +02:00
jjaffeux 5a073c6a0a Revert "FIX: title should attempt to fallback to label before name (#9739)"
This reverts commit c6bf552ca3.
2020-05-11 20:09:11 +02:00
Dan Ungureanu 141f16eb6b
FIX: Multiple schema.org improvements
* Do not show "Uncategorized" category in topics list.
* Use "BreadcrumbList" only if topic is in a category.
* Add tags list as keywords to the first post.
* Add "dateModified" even if it is the same with "datePublished".
* Show "crawler-linkback-list" only if there are links to be shown.
2020-05-11 20:38:49 +03:00
jjaffeux 0deb05740f Revert "DEV: allows to define an ariaLabel on d-button (#9716)"
This reverts commit 7a95dd4841.
2020-05-11 19:19:13 +02:00
Joffrey JAFFEUX 7a95dd4841
DEV: allows to define an ariaLabel on d-button (#9716)
* DEV: allows to define an ariaLabel on d-button

This topic also adds this function to topic-footer-buttons, simplifies the whole logic of titile/label/arialabel in d-button and adds tests for these properties.

* typo
2020-05-11 18:42:51 +02:00
Joffrey JAFFEUX c6bf552ca3
FIX: title should attempt to fallback to label before name (#9739) 2020-05-11 18:42:18 +02:00
Rafael dos Santos Silva 4d137b4f89
FIX: Handle a deleted topic in thumbnail generation
Follow up to 03818e642a

A topic can be deleted between job enqueue and job execution
2020-05-11 13:32:37 -03:00
Jarek Radosz 7d3c4a5f13
FIX: Show category name in badge preview on edit (#9726) 2020-05-11 17:05:40 +02:00
Jarek Radosz a2bb33b6d7
REFACTOR: Remove an unused Topic model observer (#9723)
As far I can tell nothing sets categoryName on the Topic model. Didn't find anything in all-the-plugins/all-the-themes either.
2020-05-11 17:05:05 +02:00
Joffrey JAFFEUX addf9d62f8
FIX: prevents rendering topic-category if empty (#9720) 2020-05-11 17:45:28 +03:00
Mark VanLandingham 89c6f697b8
DEV: Plugin outlet after save or cancel composer buttons (#9725) 2020-05-11 09:23:36 -05:00
Sam Saffron 77f5bb1419
FIX: stop clearing title by mistake
b180e6e737 caused a short lived regression.

This code is very deliberate about ensuring originalTitle is
set correctly
2020-05-11 19:07:32 +10:00
Guo Xiang Tan a3a464b838
DEV: Improve description of addPosterIcon plugin api. 2020-05-11 16:44:47 +08:00
Sam Saffron b180e6e737
FIX: default to blank title on open
In production `title` was set to undefined causing a
discrepancy between originalTitle and title

This attempts to work around the issue in the production bundle
2020-05-11 18:36:09 +10:00
Joshua Rosenfeld 07b728c5e5
FEATURE: add noindex header to badges, groups, and /my pages (#9736) 2020-05-11 15:05:42 +10:00
Martin Brennan 29842e682b
FIX: Resolve issues with Next Monday for bookmarks not working in certain locales (#9737)
In moment.js the .day() function can accept a day string but this is locale based, so e.g. in Finnish locale the string "Monday" means nothing and will parse incorrectly to Sunday. To resolve this we always use the moment.js number for the day of the week we want.
2020-05-11 13:59:14 +10:00
Sam Saffron bb4e8899c4
FEATURE: let Google index pages so it can remove them
Google insists on indexing pages so it can figure out if they
can be removed from the index.

see: https://support.google.com/webmasters/answer/6332384?hl=en

This change ensures the we have special behavior for Googlebot
where we allow indexing, but block the actual indexing via
X-Robots-Tag
2020-05-11 12:15:18 +10:00
Sam Saffron 676be3a853
FEATURE: add no_index header if robots is disabled
Expand SiteSetting.allow_index_in_robots_txt so it also adds a
noindex header if set to false.

This makes sure that nothing is indexed even if it somehow reaches
Google.
2020-05-11 11:07:21 +10:00
Martin Brennan 12d4d51d81
FIX: CurrentUser now must be passed to resolveTimezone and user card local time issues (#9734)
* This is to prevent user's timezones being changed accidentally
e.g. by admin looking at a user
* This problem only occurred via the user card, however the user card
was still calling userTimezone even if the setting to display user
time in card was disabled
2020-05-11 11:01:47 +10:00
Sam Saffron 44712c5f98
FIX: ESC to dismiss empty draft topic composer
Previously originalTitle was set to undefined leading to
titleDirty being unconditionally undefined for new topics

That mean you could not dismiss the composer via ESC
2020-05-11 10:04:38 +10:00
Bianca Nenciu 8149bfbaf1
FEATURE: Filter settings by plugin (#9692) 2020-05-10 14:07:45 +03:00
Joffrey JAFFEUX 3b2b635e9b
DEV: removes setInterval as it might cause issues (#9722) 2020-05-10 08:57:48 +02:00
Joffrey JAFFEUX 862d153f54
REFACTOR: removes dead code (#9721) 2020-05-09 11:50:47 +02:00
Joffrey JAFFEUX 9bf11a8c68
DEV: allows select-kit to prevent autofocus of header after onChange (#9718) 2020-05-09 10:26:23 +02:00
Penar Musaraj d653d2f5d9 UX: Prevent timeline overlapping topic footer buttons 2020-05-08 16:20:27 -04:00
Robin Ward 34e5f807ec DEV: User UPPER_CASE for constants 2020-05-08 15:50:55 -04:00
Mark VanLandingham da561a430d
DEV: Add data-name to popular-theme-item rows (#9714) 2020-05-08 14:38:41 -05:00
Joffrey JAFFEUX 5bac2828ee
DEV: 25ms was too short and causing test failures (#9712) 2020-05-08 21:10:52 +02:00
Robin Ward b2e4ca968b DEV: Remove `translate` API from plugin.
It appears to be completely unused at this point.
2020-05-08 14:14:01 -04:00
Robin Ward 7f373e8b93 DEV: Don't use `js.erb` for constants
Adds a new rake task to auto generate a constants.js file with the
constants present. This makes migrating to Ember CLI easier, but also
slightly speeds up asset compilation by having to do less work.

If the constants change you need to run:
`rake javascripts:update_constants`
2020-05-08 14:14:01 -04:00
Jordan Vidrine 47788da706
FIX: Bookmark Modal Input (#9707) 2020-05-08 17:47:01 +02:00
Joffrey JAFFEUX 350fe932ca
DEV: removes setTimeout and reduces timer in tests (#9701) 2020-05-08 16:46:24 +02:00
Joffrey JAFFEUX 646bee2efe
DEV: removes a setTimeout and ensure shorcut is not propagated (#9702) 2020-05-08 16:46:13 +02:00
Dax74 e46bf15407
FIX: some adjustment for the UI of the table 2020-05-08 16:39:31 +02:00
Joffrey JAFFEUX 8d3900c6da
DEV: gear icon is deprecated in favor of cog (#9704) 2020-05-08 10:35:29 +02:00
Joffrey JAFFEUX 00a038d646
REFACTOR: removes various assignments and superfluous params (#9699) 2020-05-08 09:19:48 +02:00
Joffrey JAFFEUX 9d172eeaa5
REFACTOR: removes implicit operand conversion (#9700) 2020-05-08 09:19:36 +02:00
Sam Saffron d8d54a92f1
FEATURE: tighten rate limiting rules for forgot password
1. Total 6 attempts per day per user
2. Total of 5 per unique email/login that is not found per hour
3. If an admin blocks an IP that IP can not request a reset
2020-05-08 13:30:51 +10:00
Kris 1840023c28 UX: Improve banner & alert close button alignment and consistency 2020-05-07 22:57:52 -04:00
Guo Xiang Tan efd0e4d02b
FIX: Don't trigger user_updated event for bot users. 2020-05-08 09:28:16 +08:00
Krzysztof Kotlarek a3e1e9ef16
FIX: remove deprecated URI.escape (#9697)
During Nokogumbo changes I introduced back URI.escape which is deprecated.
2020-05-08 11:14:59 +10:00
Robin Ward ef94b0f1a7 FIX: Incorrect CSS class 2020-05-07 16:29:09 -04:00
Kris 94d10b46ca Admin popup menu needs a higher z-index than the bg cloak on mobile 2020-05-07 16:24:47 -04:00
Robin Ward f9608c0af5 DEV: Remove INLINE_ONEBOX_* constants
There were two constants here, `INLINE_ONEBOX_LOADING_CSS_CLASS` and
`INLINE_ONEBOX_CSS_CLASS` that were both longer than the strings they
were DRYing up: `inline-onebox-loading` and `inline-onebox`

I normally appreciate constants, but in this case it meant that we had
a lot of JS imports resulting in many more lines of code (and CPU cycles
spent figuring them out.)

It also meant we had an `.erb` file and had to invoke Ruby to create the
JS file, which meant the app was harder to port to Ember CLI.

I removed the constants. It's less DRY but faster and simpler, and
arguably the loss of DRYness is not significant as you can still search
for the `inline-onebox-loading` and `inline-onebox` strings easily if
you are refactoring.
2020-05-07 16:14:38 -04:00
Robin Ward 3567a90661 DEV: Ember Addon needs a vendor dir 2020-05-07 15:45:35 -04:00
Dax74 4891276742
Reduce the width of the input field on desktop 2020-05-07 20:36:36 +02:00
Joffrey JAFFEUX 788e305469
FIX: parenthesis were wrong, resulting in an always true expression (#9690) 2020-05-07 19:56:35 +02:00
Robin Ward 79c64eaeff
DEV: Move pretty-text into an ember-addon format (#9689) 2020-05-07 12:37:47 -04:00
Robin Ward 69ef0da4c2 FIX: `preload-store` was removed 2020-05-07 11:00:47 -04:00
Joffrey JAFFEUX 3cd412ae02
REFACTOR: removes useless variable assignment (#9666) 2020-05-07 16:41:26 +02:00
Joffrey JAFFEUX 1dd9df9cd0
REFACTOR: removes overwritten properties and duplicates fn (#9686) 2020-05-07 16:39:53 +02:00
Joffrey JAFFEUX 265baa40c6
REFACTOR: useless conditional as 'data' always evaluates to true (#9685) 2020-05-07 16:38:38 +02:00
Joffrey JAFFEUX 99c3ce03cb
REFACTOR: removes superfluous argument (#9684)
hideTooltip doesnt accept any argument
2020-05-07 16:38:23 +02:00
Joffrey JAFFEUX 206d45fd96
REFACTOR: removes superfluous argument (#9683) 2020-05-07 16:38:09 +02:00
Joffrey JAFFEUX 9846c43d93
REFACTOR: removes use of undeclared variable (#9682) 2020-05-07 16:37:56 +02:00
Joffrey JAFFEUX af78d188b8
REFACTOR: removes useless self assignment (#9681) 2020-05-07 16:37:20 +02:00
Joffrey JAFFEUX 8be0ba3aa4
REFACTOR: function was incorrectly called as a constructor (#9679) 2020-05-07 16:36:29 +02:00
Joffrey JAFFEUX e74170cd9e
REFACTOR: Superfluous arguments passed to function resolveSize (#9678)
resolveSize accepts only one param
2020-05-07 16:36:15 +02:00
Joffrey JAFFEUX affc79bb68
REFACTOR: removes useless assignment to local variable (#9676) 2020-05-07 16:35:54 +02:00
Joffrey JAFFEUX 08e8ae82cc
REFACTOR: removes useless conditional (#9677) 2020-05-07 16:34:49 +02:00
Joffrey JAFFEUX a078b086ba
REFACToR: removes useless assignment to local variable (#9675) 2020-05-07 16:34:36 +02:00