Commit Graph

16201 Commits

Author SHA1 Message Date
Rafael dos Santos Silva c4552e9c10
FIX: Autoplay videos must always be muted (#11533)
This automatically adds the muted attribute if it's missing in a video
tag.

Co-authored-by: David Taylor <david@taylorhq.com>
2020-12-21 14:55:00 -03:00
Bianca Nenciu 38950840e0
FIX: Show restricted tags in bulk select (#11531)
Navigating to a category and tag page, selecting topics and attempting
to bulk append a tag showed all but the tags restricted to the category.
2020-12-21 12:26:51 +02:00
Mark VanLandingham d8e2b497f7
DEV: Move rerender on 'do not disturb' change to mixin (#11529) 2020-12-18 10:35:43 -06:00
Mark VanLandingham 649ed24bb4
FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
Bianca Nenciu 806f05f851
FIX: Make find_by_slug_path work with default slugs (#11501)
Default slugs are generated by adding '-category' to category ID.
2020-12-18 16:05:01 +02:00
Roman Rizzi 142e0ae062
Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)"" (#11509)
* Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)"

This reverts commit aa0d4ea764.

* Correctly debounce onScroll function
2020-12-18 10:18:52 -03:00
Arpit Jalan f296ca4b4a
FEATURE: allow plugins to show custom HTML via renderTags (#11520)
This commit allows discourse-assign plugin to show custom HTML via
renderTags even if topic has no tags.
2020-12-18 09:42:42 +05:30
Penar Musaraj 2b8b252249
UX: Move reply filter button on mobile (#11524) 2020-12-18 14:51:13 +11:00
Sam 4558d91bbb
UX: adjust default menu width (#11526)
The notification panel gets resized and the JS uses maxWidth of 320.

This tends to fight with the CSS causing notifications to "jump" a bit when a new one lands.
2020-12-18 14:50:50 +11:00
Joe 4b1d98e878
DEV: Adds raw plugin outlets to topic list headers (#11519) 2020-12-17 23:08:38 +08:00
Penar Musaraj 9870a0b6a1
FIX: missing default notification level on group creation (#11512) 2020-12-16 15:52:34 -05:00
Roman Rizzi 4d1bc3a491
FIX: Scroll to the last position when navigating back to the tag topic list. (#11496)
Scrolling was not working as expected after clicking the browser back button and navigating back to the tag topic list. We need to wrap the scroll inside a debounce function to ensure that the "window.pageYOffset" property is populated before our function runs.
2020-12-16 15:23:12 -03:00
Penar Musaraj 230fe0427e
DEV: More events for filtered replies (#11511) 2020-12-16 12:11:01 -05:00
Penar Musaraj d1058f4e4c
UX: Blend header colors (#11422) 2020-12-16 09:38:51 -05:00
Arpit Jalan 1e7d6ebb0f
DEV: no need to iterate through each tag for rendering (#11508)
This commit allows discourse-assign plugin to show assigned user next to
tags.
2020-12-16 18:40:58 +05:30
Penar Musaraj 89bf64c0bf
DEV: Trigger events when filtering replies (#11498) 2020-12-16 16:46:40 +11:00
Kris d870c80516
UX: Don't wrap menu text under icon (#11502) 2020-12-16 16:43:47 +11:00
Kris 9a66f24703
UX: Add title attribute to watched word input (#11505) 2020-12-16 16:43:01 +11:00
Kris f450ab6b5d
UX: Make theme install modal more responsive (#11503)
* UX: Make theme install modal more responsive

* chrome fix
2020-12-16 16:41:36 +11:00
Kris 407591719c
UX: When input placeholders are too long, truncate with ellipsis (#11504) 2020-12-16 16:40:30 +11:00
Kris 7588910ee6
UX: remove timeline from print view, fix header in crawler view (#11489) 2020-12-15 16:12:46 -05:00
Penar Musaraj 31fe0e91ad
UX: Tweaks to filtered replies (#11485)
Include the enable_filtered_replies_view site setting in the admin UI
Adds title label to in-reply-to widget
Invokes the filtered UI when using replies_to_post_number as a query
parameter
Replaces the "Show All" button icon
Fixes grammar for "Viewing 1 reply to..." label
2020-12-15 11:23:44 -05:00
Kane York 55292cfce1
FIX: Do not forbid tags in /new-topic on mobile (#11486)
Now that mobile has a UI for tags, there is no longer any reason to forbid setting them via URL.
2020-12-14 15:51:40 -08:00
Kris e02c47c4f3
UX: Show required indication consistently on signup (#11477) 2020-12-14 16:35:32 -05:00
Penar Musaraj 0e210df79a
FIX: Show correct avatar in post stream bar (#11481)
Also fixes the displayed count of posts when filtered by user.
2020-12-14 15:24:15 -05:00
Roman Rizzi b45a30c40f
FIX: Users without shared drafts access can still have access to the category. (#11476)
This is an edge-case of 9fb3629. An admin could set the shared draft category to one where both TL2 and TL3 users have access but only give shared draft access to TL3 users. If something like this happens, we need to make sure that TL2 users won't be able to see them, and they won't be listed on latest.

Before this change, `SharedDrafts` were lazily created when a destination category was selected. We now create it alongside the topic and set the destination to the same shared draft category.
2020-12-14 16:08:20 -03:00
Roman Rizzi c7b9f044a4
FEATURE: Automatically disable slow mode. (#11461)
Staff and TL4 users can decide the slow mode duration. We'll internally set a topic timer to disable it.
2020-12-14 14:06:50 -03:00
jbrw 773c51a633
FEATURE: Allow category group moderators to list/unlist topics (#11470)
* FEATURE: Allow categroy group moderators to list/unlist topics

If enabled via SiteSettings, a user belonging to a group which has been granted category group moderator privileges should be able to list/unlist topics belonging to the appropraite category.
2020-12-14 11:01:22 -05:00
Sam cfb81b7895
FIX: show retina avatars on Chrome (#11480)
chromium may report float device pixel ratio below 1.5 that is still clearly retina:

```
window.devicePixelRatio
1.4999998807907104
```

We used to round this down to 1 and not provide these browsers with retina avatars.

New algorithm is much more forgiving, anything over 1.1 gets 2x images, anything over 2.1 gets 3x images.
2020-12-14 09:39:10 +11:00
Kris ae114a6ee8
Revert "UX: When requiring user fields at signup, also mark default fields as required (#11356)" (#11475)
This reverts commit 3ef60686ed.
2020-12-11 12:09:56 -05:00
Robin Ward a51a06115a FIX: Posts with Staff Colors were excluded from the group activity
Now they are included, with the correct color applied.
2020-12-11 11:52:03 -05:00
Penar Musaraj 820b3e672a
DEV: Remove jquery.ba-resize (#11457) 2020-12-11 11:36:32 -05:00
Bianca Nenciu c4319b7b55
FIX: Show 'New' filter when 'none' subcategory set (#11474)
When set to 'none' it did not count topics from any category, but it
should count from the current one.

Follow up to df26d2e72a.
2020-12-11 18:24:32 +02:00
Robin Ward 3b81c2d470 FIX: Normalize links by converting them to lower case
The server side does this so the same link on the client side with any
upper case letters does not warn as a duplicate.
2020-12-11 11:16:51 -05:00
Bianca Nenciu df26d2e72a
FIX: Build correct topic list filter (#11473)
* FIX: 'false' value was treated as a truthy value

For example, latest.json?no_subcategories=false used to have set
no_subcategories to the string value of 'false', which is not false.

* DEV: Remove dead code

* FIX: Redirect to /none under the right conditions

These conditions are:
 - neither /all or /none present
 - only for default filter

* FIX: Build correct topic list filter

/none was never added to the topic list filter

* FIX: Do not show count for subcategories if 'none' category

* FIX: preload_key must contain /none if no_subcategories
2020-12-11 14:20:48 +02:00
Kris 236749add2
bulk select posts popup needs a higher z-index (#11472) 2020-12-10 21:32:52 -05:00
Roman Rizzi aa0d4ea764
Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)
This reverts commit 8b426431a4.
2020-12-10 16:48:25 -03:00
Penar Musaraj b24a77ff91
DEV: Run post stream scroll events less often (#11463)
See PR for details.
2020-12-10 14:09:11 -05:00
Penar Musaraj 8940e0f163
DEV: Fix position of filtered replies notice on DiscourseHub (#11462) 2020-12-10 13:25:09 -05:00
Penar Musaraj adda53c462
FEATURE: Optional filtered replies view (#11387)
See PR for details
2020-12-10 12:02:07 -05:00
Roman Rizzi 8b426431a4
DEV: Wrap `Ember.run.debounce`. (#11352)
We want to wrap the `Ember.run.debounce` function and internally call `Ember.run` instead when running tests.

This commit changes discourseDebounce to work the same way as `Ember.run.debounce`.

Now that `discourseDebounce` works exactly like `Ember.run.debounce`, let's replace it and only use `DiscourseDebounce` from now on.

Move debounce to discourse-common to be able to reuse it in different bundles

Keep old debounce file for backwards-compatibility
2020-12-10 11:01:42 -03:00
Penar Musaraj fb2e24a77a
UX: Fix unreachable buttons on menus in Safari iOS (#11458)
Safari overlays its own nav at the bottom 10% or so of the screen. This
makes buttons in that area virtually unclickable, so to ensure buttons
there are reachable, we need to add enough bottom padding to menu panels.
2020-12-10 08:11:58 -05:00
Krzysztof Kotlarek da2a61e36c
FIX: correct tracking when mute all categories (#11441)
Currently, we have a solution for muted topics. Basically, when a post is created first we send a `muted` message to users who muted that specific topic:

https://github.com/discourse/discourse/blob/master/app/models/topic_tracking_state.rb#L91

Later, topic tracking state filters if the topic is muted or not before update state:

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/models/topic-tracking-state.js#L58:L67

That solution works quite well.

I wanted to extend it to handle `mute all categories by default` setting as well.

In that case, we should only inform the user about new topic/post when they explicitly want to.

If that setting is enabled, we would send "unmuted" message to a user who watches specific category, topic or tag. In all other cases, don't inform user about new topic as all categories are muted by default.

Meta: https://meta.discourse.org/t/threads-muted-by-mute-all-by-default-are-showing-up-as-new-but-not-visible/168324
2020-12-10 16:49:05 +11:00
Vinoth Kannan eb60fc86dc
PERF: run user merging task in a background job. (#10961)
* PERF: run user merging task in a background job.

Currently, admin page is timing out while merging the users with lots of posts.
2020-12-10 15:52:08 +11:00
Sam Saffron f1288812e8 DEV: comment out flaky test
This is failing inconsistently, remove to stabilize test suite.
2020-12-10 12:17:44 +08:00
tshenry b3bae15f4b
UX: Add full date title to fps-result date (#11455)
This is a tiny change that will allow users to hover the date element of a full page search result to see the raw date. It's not always easy to know what the exact date was "20d" ago, so hopefully this helps when it's relevant.
2020-12-09 15:41:00 -08:00
David Taylor d1d37473d4
FIX: Only block local edits for git-sourced themes (#11450)
Themes uploaded as zip files are given a row in the `remote_themes` table to store metadata, even though they are not truly remote.
2020-12-09 19:41:42 +00:00
Jordan Vidrine 0116897ac9
UI: Category Onebox styling changes (#11448)
This commit adjusts the category one box styling to be more in line with the discourse categories UI.
2020-12-09 11:36:05 -06:00
Gerhard Schlager 06077856ce
FIX: Prevent usage of `composer-action-undefined` CSS class (#11445) 2020-12-09 15:22:53 +01:00
jbrw 4c118e4d7a
FIX: Allow for cateogry edit routes of unknown depth (#11426)
* FIX: Allow for cateogry edit routes of unknown depth

* DEV: remove unused files
2020-12-08 16:50:26 -05:00
Kane York 59ef48c0b9
FIX: Remove custom 'error' action on build-category-route/discovery (#11425)
The root cause of the issue was that the route was overriding the 'error' action from the correctly implemented handler in routes/application.js.

Remove the custom handler, and the duplicated template logic for displaying the errorHtml.

Fixes: e16b3da04a
2020-12-08 11:58:36 -08:00
tshenry a446e0fde1
FEATURE: Link to text customization when editing system badges (#11345)
Being that system badges ship with every instance of Discourse, we've opted to define the name, description, and long description in our locales files to promote translation into other languages. When an admin visited the overview page of a system badge in their admin panel, they were met with disabled inputs for these text properties. The problem is that we failed to educate the admin that the text needs to be managed via the site text customization settings. 

This change adds a small "Customize Text" link under theses inputs that takes the admin to the specific site text customization where they can make desired changes.
2020-12-08 11:55:49 -08:00
Penar Musaraj 3e1b84963d
DEV: Remove duplicate (and deprecated) SK option (#11435) 2020-12-08 13:21:02 -05:00
Joffrey JAFFEUX b824af02d4
FIX: removes extra slashes from URL (#11433)
This is similar to a fix used in ember core: https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/routing/lib/location/history_location.ts#L140

It will prevent a URL with a double slash to hang and end up in a 404.
2020-12-08 17:47:43 +01:00
Arpit Jalan f62ea77666
Revert "DEV: no need to iterate through each tag for rendering" (#11432)
This reverts commit a19a3adf9e.

Need to look into failing tests.
2020-12-08 20:35:46 +05:30
Arpit Jalan a19a3adf9e
DEV: no need to iterate through each tag for rendering (#11428)
This commit allows discourse-assign plugin to show assigned user next
to tags.
2020-12-08 18:41:26 +05:30
Sam Saffron 1cf057fb1c DEV: lint file
We enforce ordering of imports in our linter, missed this on a merge
2020-12-08 09:16:28 +08:00
Joffrey JAFFEUX daefa3d25a
UX: makes sk components full width on users admin page (#11413) 2020-12-08 11:18:02 +11:00
Jarek Radosz 6b464d1b8d
FIX: Restore dismissing the first notification (#10433)
* FIX: Restore dismissing the first notification

Reverts the temporary fix (8e4fea897e) and restores the feature introduced in e638d43f0a.

The issue that was the reason for the revert (https://meta.discourse.org/t/logins-redirects-to-missing-notifications-page/149718) was a combination of two bugs:

1. Fixed in this commit - the click listener was accidentally registered also for logged-out users. This meant that the first click on a page always trigger an AJAX call to the notifications endpoint (`/notifications?recent=true&limit=5`), which returned a 403 error. Now, this code is run only when the user is logged in.

2. A still unknown bug that I could not reproduce, which was somehow setting the login redirect cookie to the URL of that previously failed AJAX request.
2020-12-08 11:11:35 +11:00
Bianca Nenciu 812d047c60
FIX: Follow open in new tab site setting for bio links (#11418) 2020-12-08 10:56:14 +11:00
Joe 5ab6ef9765
FEATURE: Adds back button to theme editor (#11416) 2020-12-08 10:54:44 +11:00
Kris 3ef60686ed
UX: When requiring user fields at signup, also mark default fields as required (#11356) 2020-12-07 18:26:31 -05:00
Kris 0302de058c
UX: Fix invite checkbox width issue (#11371) 2020-12-07 18:08:04 -05:00
Kane York e16b3da04a
FIX: Stop category 404s from breaking the router (#11424)
The propagated promise failure from model() caused the router to reject future route transitions, even though it correctly routed to the last-resort 404 page.

Co-authored-by: Jeff Wong <awole20@gmail.com>
2020-12-07 14:22:39 -08:00
Penar Musaraj dd9ec827e5
FIX: Adjust reviewable menu placement on mobile (#11420)
Shows the actions dropdown above the triggering button to avoid some
options from displaying below mobile navigation in DiscourseHub.
2020-12-07 13:39:18 -05:00
Penar Musaraj 490e1cfbbb
DEV: Use tag renderer in tags filter dropdown (#11378)
A small change that would allow components to extend the tag
display in the filter dropdown, like they can in other contexts.

Was requested in the tag icons component, see
https://meta.discourse.org/t/tag-icons-component/109757/60?u=pmusaraj

The PR also standardises tag styling in select-kit dropdowns.
2020-12-07 12:10:21 -05:00
Bianca Nenciu da74b3e14b
FEATURE: Add after-topic-list-body plugin-outlet (#11410) 2020-12-07 13:33:24 +02:00
Roman Rizzi 4aeb3ef8e0
FIX: Trigger an event when a post is bookmarked. (#11407)
When we renamed BookmarkWithReminder to Bookmark in ca539fd, the bookmark event trigger was removed with the old code, and we forgot to add it again.
2020-12-04 15:09:20 -03:00
Roman Rizzi 4d9686c494
FEATURE: Reviewed by filter. (#11405)
New reviewable filter to only display reviewables handled by a specific user.
2020-12-04 14:09:05 -03:00
Gerhard Schlager 1960fc5333
FIX: Stop using duplicate composer button ID (#11404)
"quote" is used by the button added in `composer-editor`.
bbe5d8d5cf/app/assets/javascripts/discourse/app/components/composer-editor.js (L875-L882)
2020-12-04 00:05:43 +01:00
Mark VanLandingham acbc47ef36
FIX: Load .js files from plugins in qunit testing env (#11304) 2020-12-03 10:25:42 -06:00
Krzysztof Kotlarek 9c5ee4923b
FEATURE: silently close topic (#11392)
New TopicTimer to silently close topic. It will be used by discourse-solved plugin

Meta: https://meta.discourse.org/t/allow-auto-close-for-solved-to-do-so-silently/169300
2020-12-03 10:43:19 +11:00
Roman Rizzi bbe5d8d5cf
DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
Régis Hanol d1d87b6fa3
FIX: show/hide ignored users preferences (#11386)
* FIX: show/hide ignored users preferences

based on the current user trust level and the appropriate site setting.

* Allow us to await the `updateCurrentUser` call

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-12-01 18:20:43 +01:00
Roman Rizzi 1c2358ba16
DEV: Tidy up imports. (#11364)
Only allow one import definition per file and add a new eslint rule to enforce it.
2020-11-27 11:30:16 -03:00
Gerhard Schlager 2e5e4dbf19
DEV: Make it easier to customize link attributes in quick access menu (#11365)
This allows themes to customize link attributes:

```
api.reopenWidget("quick-access-item", {
  _linkAttributes(href) {
    const attributes = this._super(...arguments);
    // do stuff
    return attributes;
  }
}
```
2020-11-27 12:26:47 +01:00
Bianca Nenciu eeae657ca5
FIX: No tags should be set if tag chooser is hidden (#11362)
If a user could not set tags because they had a trust level lower than
min_trust_level_to_tag_topics site setting, the "Create Topic" button
from a tag page would still show up and be enabled. Clicking it caused
the composer model to silently have the tags set.
2020-11-27 13:03:37 +02:00
Robin Ward dab2f2fdf4 REFACTOR: We can't use Ember.HTMLBars.compile in Ember CLI
Instead we use the inline `hbs` helper. Note in the non-Ember CLI
version this will not actually inline compile, but it will still work
for all our tests.
2020-11-26 09:27:20 -05:00
Joe eecff3d15b
DEV: Ensures mobile RTL stylesheets are loaded (#11360)
This PR only makes CSS changes that have no visual impact, but they fix an issue in the compiler that causes some stylesheets not to load on mobile RTL.

Full context here

https://meta.discourse.org/t/user-card-will-not-open-on-the-mobile/171268/6?u=johani
2020-11-26 21:03:25 +08:00
Robin Ward 059e9cb1d2 REFACTOR: Remove `.erb` from emoji-picker
We can't use erb in ember-cli, and it seems the emoji groups rarely
change anyway. This commit migrates the ERB to pre-rendered javascript
that is updated via the `rake javascript:update_constants` task.
2020-11-25 11:23:02 -05:00
Joffrey JAFFEUX abb89475a3
FIX: issues with frowning/grinning (#11235)
- frowning was using slighty_frowning
- slightly_frowning was using frowning
- grinning_face_with_smiling_eyes was not defined
- fronwing_face_with_open_mouth was not defined
2020-11-25 09:09:35 +01:00
Martin Brennan 5028aaf446
FIX: Add secure media url to SERVER_SIDE_ONLY list (#11348) 2020-11-25 15:31:31 +11:00
Martin Brennan 2348a7972e
FIX: When quoting an attachment, keep the |attachment in markdown (#11347) 2020-11-25 15:31:14 +11:00
jbrw 416f984c5e
FEATURE: Update onebox and add styling for githubfolder onebox (#11313) 2020-11-25 10:51:29 +11:00
Robin Ward 436d68d54f
UX: Don't show selected posts interface twice on mobile (#11328)
Note to reproduce you need a topic with over 3 posts.
2020-11-25 10:50:05 +11:00
Rafael dos Santos Silva a6613d15f4
Adds discourse-gifs to suggested components (#11339) 2020-11-24 14:58:45 -03:00
Robin Ward 0e0c70019b FIX: Suggested Topics was being set inside a computed property
This is bad because changing the `suggested_topics` proeprty could cause
a `set` on `suggested_topics`.
2020-11-24 11:08:11 -05:00
Penar Musaraj 67979b2b21
Remove "Alternative Logos" from popular themes list (#11337)
Core has had support for dark theme logos for a while now.
2020-11-24 10:13:16 -05:00
Dan Ungureanu 2742595b00
FIX: Checkbox value should not leak between themes (#11327)
This commit includes a hack to ensure didInsertElement is called only
once.
2020-11-24 12:10:28 +02:00
Penar Musaraj 4b538e7cb9
DEV: Skip missing icon warnings in production (#11334)
The list of SVG icons is unavailable in production, and the previous
refactor here was causing incorrect and noisy console warnings.

This also parses the `svgIconList` string in a dev environment, icons
should now match more accurately.
2020-11-23 21:41:54 -05:00
Jarek Radosz de2d323ccf
UX: Slightly adjust onebox alignment (#11326)
* fixed header/favicon's vertical alignment
* slightly increased header margin
* made the onebox padding symmetrical
* increased the right margin on small image elements
* removed extraneous pre bottom margin
2020-11-23 22:16:50 +01:00
Robin Ward 3394d994e9 FIX: Tests were using jQuery selectors
For the most part `querySelectorAll` will work with jQuery selectors,
but the big exception is `:eq(0)` and similar. Those needed to be
replaced.
2020-11-23 11:36:07 -05:00
Bianca Nenciu 60bc38e6a8
FIX: Gracefully handle force pushes for remote themes (#11325)
Force pushing a commit to a theme repository used to break the updater,
because the system was not able to count the commits behind the old and
new version. This operation failed because a force push deleted the old
commits.

The user was prompted with a simple "500 server error" message.
2020-11-23 15:29:22 +02:00
Vinoth Kannan 139c5dc356
FIX: use `tag` model instead of tagId property. (#11298)
In a recent commit 866fa008d4 support for tagId property is removed.

And added a test case. Follow-up for 2d5bb516a6.
2020-11-23 16:40:15 +05:30
Dan Ungureanu 4638c6fc8d
FEATURE: Add 'all subcategories' option in category-selector (#11099) 2020-11-23 10:55:32 +02:00
Kris 855026eea1
UX: PM title glyph alignment and consistency improvement (#11314)
* UX: PM title glyph alignment should match public topic-status style

* minor fixes
2020-11-23 12:16:41 +11:00
Jarek Radosz 790b9856af
FIX: Onebox image alignment (#11319)
It was overlapping with elements after it and was unnecessarily indented relative to the text before it.
2020-11-23 10:49:02 +11:00
Robin Ward 66ecefba52 FIX: Upload events happened outside of the runloop
This could cause test failures when checking for the result of the
events if Ember hasn't applied them yet.
2020-11-20 15:35:00 -05:00
Joffrey JAFFEUX 8aa912c885
FIX: iconList is an array in production (#11308)
This should be investigated further, but hopefully the comment will prevent anyone else to fall in this trap.
2020-11-20 20:00:51 +01:00
Robin Ward 1ea6bbab34 FIX: We shouldn't debounce this in testing
Eventually we should add a helper to prevent all debouncing in test, but
for now this will really speed up Ember-CLI tests.
2020-11-20 12:39:49 -05:00
Robin Ward d6f2a63efe FIX: Tests were performing `data[]` queries but without quotes
This works in jQuery but not querySelectorAll
2020-11-20 12:39:07 -05:00
Joffrey JAFFEUX 8a90a5610f
DEV: allows to check if an icon is in the set (#11303) 2020-11-20 17:34:55 +01:00
Penar Musaraj 7539c2ed7f
UX: Revamp category security tab (#11273) 2020-11-20 10:44:34 -05:00
Jarek Radosz dbcf722ab9
DEV: Modulize component tests (#11300)
It's like the new tests, but still old underneath!
2020-11-20 15:54:09 +01:00
Arpit Jalan c244214fe5
UX: update "Rebuild-HTML" icon (#11296) 2020-11-19 19:39:18 -08:00
Robin Ward 1157ff8116 FIX: There are two elements with a `suspend-reason` class
We only want to fill in the text one. (This is an Ember CLI fix)
2020-11-19 14:16:35 -05:00
Dan Ungureanu 5202380a04
DEV: Move browser-update.js.erb out of vendored scripts (#11234)
This script has been adopted and modified.
2020-11-19 18:48:24 +02:00
Robin Ward 625cf5a8ae FIX: Modal methods should be wired up in `setupTests` not in module 2020-11-18 15:42:49 -05:00
jbrw 331236d6d7
Onebox improved error handling and support for Instagram Access Tokens (#11253)
* FEATURE: display error if Oneboxing fails due to HTTP error

- display warning if onebox URL is unresolvable
- display warning if attributes are missing

* FEATURE: Use new Instagram oEmbed endpoint if access token is configured

Instagram requires an Access Token to access their oEmbed endpoint. The requirements (from https://developers.facebook.com/docs/instagram/oembed/) are as follows:

- a Facebook Developer account, which you can create at developers.facebook.com
- a registered Facebook app
- the oEmbed Product added to the app
- an Access Token
- The Facebook app must be in Live Mode

The generated Access Token, once added to SiteSetting.facebook_app_access_token, will be passed to onebox. Onebox can then use this token to access the oEmbed endpoint to generate a onebox for Instagram.

* DEV: update user agent string

* DEV: don’t do HEAD requests against news.yahoo.com

* DEV: Bump onebox version from 2.1.5 to 2.1.6

* DEV: Avoid re-reading templates

* DEV: Tweaks to onebox mustache templates

* DEV: simplified error message for missing onebox data

* Apply suggestions from code review
Co-authored-by: Gerhard Schlager <mail@gerhard-schlager.at>
2020-11-18 12:55:16 -05:00
jbrw 8e8dca9246
FIX: Selected Tag Group permission shouldn’t change during save (#11274)
`setPermissionsGroups` would initialize an empty permissions object whenever new groups were added to the Tag Group. This meant that if you selected the `visible` permission and then added groups to the Tag Group, the `visible` permission would be obliterated and the Tag Group would be treated as though it was `private`.
2020-11-18 11:22:19 -05:00
Penar Musaraj d90b852cd0
UX: bottom padding for menu panel on iOS notch devices (#11270) 2020-11-17 15:42:03 -05:00
Robin Ward 75e92e1bd7 REFACTOR: The Favcount library needs global variables
This moves the library into our lib folder, and refactored it to more
modern Javascript. I've kept the MIT license at the top of the file.

Doing this allows us to import it as a library in Ember CLI and ditch
yet another global variable.
2020-11-17 15:04:17 -05:00
Robin Ward 410214e5a9 FIX: In newer embers, it's `triggerKeyEvent` not `keyEvent` 2020-11-17 14:46:23 -05:00
Mark VanLandingham 504aaad838
DEV: New plugin-outlet under preferences interface nav (#11266) 2020-11-17 12:36:17 -06:00
David Taylor c62f082754
UX: Only link the icon for site setting history (#11265)
Linking the whole site setting name makes it tricky to copy/paste the name, which is common when asking/answering support queries.
2020-11-17 15:59:55 +00:00
Paweł Kowalski 8619c1fd47 Optimize assets/images 2020-11-17 09:53:33 -05:00
Robin Ward 3fc5671e40 REFACTOR: Allow us to import `keyEvent`
This change should be quite safe as it only adds extra support for
imports rather than global variables.
2020-11-17 09:43:08 -05:00
Arpit Jalan 2fde06ba08
UX: handle large email addresses on email skipped and bounced tabs (#11259) 2020-11-17 18:01:40 +05:30
Kris 2cb2f864d4
Remove extra padding, follow-up to 8be04ff (#11258) 2020-11-16 23:10:03 -05:00
Arpit Jalan 473f7bfe7b
FIX: do not allow a tag to be synonym of its own (#11246)
https://meta.discourse.org/t/adding-synonym-to-the-same-tag-gets-stuck/169801/
2020-11-17 06:52:31 +05:30
Martin Brennan a9b20fa827
DEV: Allow overiding calculation of top offset for card contents base (#11254) 2020-11-17 12:05:59 +11:00
David Taylor 475b4892e3
DEV: Remove 'diff local changes' when updating remote themes (#11247)
Since 65e123498b, it is now impossible to make local changes to remote themes, so this warning is not needed.
2020-11-16 19:28:12 +00:00
Dan Ungureanu bc8423a1bf
FEATURE: Add auto update field to themes (#11102)
Themes marked for auto update will be automatically updated when
Discourse is updated. This is triggered by discourse_docker or
docker_manager running Rake task 'themes:update'.
2020-11-16 14:44:09 +02:00
Arpit Jalan 0853208d67
FIX: save draft when either title or reply is present (#11243)
Here's how draft saving process works currently:

- if only title is present (no reply) the draft is saved
- if only reply is present (no title) the draft is saved
- if both title and reply are present, and reply length is less than
`min_post_length` and the title length is less than
`min_topic_title_length`, then the draft is saved
- if both title and reply are present, and reply length is less than
`min_post_length`, then the draft is not saved

The current draft saving conditions are complex to understand and is
causing confusion as seen here: https://meta.discourse.org/t/draft-is-not-being-saved-when-creating-a-new-pm/149990/6?u=techapj

This commit updates the process to always save the draft if either title
or reply exists.
2020-11-16 16:43:50 +05:30
Justin DiRose 65e123498b
FIX: Disallow editing of remote themes (#11189)
Allowing the editing of remote themes has been something Discourse has advised against for some time. This commit removes the ability to edit or upload files to remote themes from Admin > Customize to enforce the recommended practice.
2020-11-13 09:57:49 -06:00
Robin Ward 0d0ae5e67f REFACTOR: Add support for `currentRouteName` in test helpers
This replaces the global `currentPath`
2020-11-13 09:31:09 -05:00
Arpit Jalan b81326a7dd
UX: draft delete button was looking odd on user stream (#11232) 2020-11-13 17:21:06 +05:30
Krzysztof Kotlarek bd0b558a89
FIX: paste the spreadsheet to the composer (#11163)
* FIX: paste the spreadsheet to the composer

If we paste spreadsheet with the missing label we receive
`"	this \n1	2"`

If we trim whitespace at the beginning then our later calculation to determine if it is a table is incorrect:

```
      const columns = rows.map((r) => r.split("\t").length);
      const isTable =
        columns.reduce((a, b) => a && columns[0] === b && b > 1)
```

https://meta.discourse.org/t/pasting-from-spreadsheet-wont-work-if-corner-cell-is-empty/169443
2020-11-13 13:01:22 +11:00
Roman Rizzi ffd1b7c234
Revert "topic fixup" (#11223)
The review queue page fails to load with the error: "TypeError: category is null"

This reverts commit 19b7cdd21f.
2020-11-12 15:15:25 -03:00
Penar Musaraj 89fc11e93b
UX: Layout changes to edit category page (#11222) 2020-11-12 12:51:25 -05:00
Mark VanLandingham fa29c2e7b9
DEV: Refactor default new group permissions (#11221) 2020-11-12 10:37:33 -06:00
Penar Musaraj 698b7ace10
FIX: Reset category edit page button state (#11218)
Fixes two small issues:
- buttons stayed disabled after deleting a category
- on a newly-created category, the Edit button was missing on the category landing page
2020-11-12 10:03:58 -05:00
Arpit Jalan df003eaf7b
FIX: add a way to cancel initialization of new draft (#11106) 2020-11-12 19:13:52 +05:30
David Taylor 5be78bb2d9
FIX: Use `filters` parameter instead of `filter` for staff action log (#11217)
Fixing this also means that ember takes care of JSON encoding the query parameter

Follow-up to a4441b3984
2020-11-12 13:31:28 +00:00
David Taylor a4441b3984
FEATURE: Link site setting titles directly to their change log (#11215)
This makes it much easier to check the staff action logs for a specific site setting. A small history icon will appear when hovering over a site setting name. On click, you will be taken to the pre-filtered staff action log for the site setting.
2020-11-12 12:07:36 +00:00
Gerhard Schlager 6d4711ca10
DEV: Fix lint (#11213) 2020-11-12 12:15:55 +01:00
Kris a90c18e033
DEV: Account for below-site-header and above-site-header outlets when positioning timeline and usercards (#10434) 2020-11-12 11:45:09 +01:00
Jarek Radosz cd6dbd3e9c
FIX: Restore (deprecated) ability to overwrite a property (#11207)
It should be a `readOnly` but some themes/plugins still pass the `categories` property into this component, so…
2020-11-11 22:16:20 +01:00
Jarek Radosz ae8c96ed35 DEV: Wait for debounced functions
Modern Ember testing environment requires calling `await settled()` to wait for delayed runloop-aware functions.
2020-11-11 13:32:42 -05:00
Jarek Radosz 80ef210730 Imports lint 2020-11-11 13:32:29 -05:00
Jarek Radosz b1bbcb2415 DEV: Use topic property setter 2020-11-11 13:32:29 -05:00
Jarek Radosz cb4c9eeab8 DEV: Don't eagerly find and assign Topic.category 2020-11-11 13:32:29 -05:00
Jarek Radosz 19b7cdd21f topic fixup 2020-11-11 13:32:29 -05:00
Jarek Radosz 20108f834c DEV: Don't overwrite computed props in tests 2020-11-11 13:32:29 -05:00
Jarek Radosz 25524a213d DEV: Remove duplicated code
Fixes "overwriting computed property" warnings
2020-11-11 13:32:29 -05:00
Jarek Radosz 883da89c70 DEV: Replace a full computed prop with readOnly 2020-11-11 13:32:29 -05:00
Jarek Radosz 44de03e409 Imports 2020-11-11 13:32:29 -05:00
Jarek Radosz 0fc944889b DEV: Replace observers in User model 2020-11-11 13:32:29 -05:00
Jarek Radosz fe2c3e3e38 DEV: Replace the Topic.category observer
Fixes an issue in Ember CLI environment
2020-11-11 13:32:29 -05:00
Gerhard Schlager 811c610108
DEV: Assign id to button for easier finding via CSS selectors (#11200) 2020-11-11 18:33:23 +01:00