Commit Graph

24675 Commits

Author SHA1 Message Date
72648dd576 FIX: Base topic details message on current category and tag tracking state (#12937)
The user may have changed their category or tag tracking settings since a topic was tracked/watched based on those settings in the past. In that case we need to alter the reason message we show them otherwise it is very confusing for the end user to be told they are tracking a topic because of a category, when they are no longer tracking that category.

For example: "You will see a count of new replies because you are tracking this category." becomes: "You will see a count of new replies because you were tracking this category in the past."

To do this, it was necessary to add tag and category tracking info to current user serializer. I improved the serializer code so it only does 3 SQL queries instead of 9 to get the tracking information for tags and categories for the current user.
2021-05-06 09:14:07 +10:00
c792c2b5fe FIX: {{ace-editor}} was buggy in Ember CLI release (#12952) 2021-05-05 13:45:52 -04:00
c8f34db648 FIX: Use the no-sandbox flag when running Ember CLI tests. (#12951)
Without this flag we get "Error: Browser exited unexpectedly" when trying to run tests.
2021-05-05 14:02:26 -03:00
b0e9c6e127 FIX: limit visible revisions history to last 100 (#12946)
This is done to prevent spike memory usage when the number of revisions is very large (thousands) and the post has a significant length.
2021-05-05 12:18:25 +02:00
1b02dce594 DEV: Drop old IE11 intersection-observer references (#12942)
It's been awhile since we have supported IE11 so it should be safe to remove
IntersectionObserver now.

From a TODO task in this repo:
> drop when we eventually drop IE11

Announcement of when we removed IE11 support:

https://meta.discourse.org/t/137984/40?u=blake
2021-05-04 17:54:54 -06:00
657370b56c FIX: Pressing back from topic in bookmark list takes user to / (#12936)
See: https://meta.discourse.org/t/navigating-back-to-bookmarks/188912/4

Instead of taking the user back to the bookmark list after selecting
a topic and navigating back, the user was navigated back to the page
before that. This is because the topic-link component was missing
the data-auto-route attribute which tells the intercept-click library
not to use DiscourseURL.routeTo to handle the transition (so it is just
handled internally by Ember)
2021-05-05 09:00:21 +10:00
f57878f20f FEATURE: Add more class names to latest-topic-list-item (#12933) 2021-05-04 16:40:42 -04:00
599327658c FIX: temporarily skip flaky future-date-input tests (#12941) 2021-05-04 17:18:58 +04:00
61ad959212 UX: Allow saving with cmd+s/ctrl+s with Ace editor (#12674)
When editing the files for a theme in the admin dashboard, typing "cmd+s" (a common key-binding to save in most text editors) used to engage the browser's default "save page" dialogue.

This commit adds a key-binding to the ace editor that saves the file.

Now, the "cmd+s" (and "ctrl+s" for windows) key-binding does the same action as the save button.
2021-05-04 12:56:10 +01:00
338740c385 UX: hide the list of file extensions on the upload dialog (#12836) 2021-05-04 15:16:00 +04:00
d14a7f1965 DEV: removes comment about disable_jump_reply (#12939)
This has been removed in 40fa96777d
2021-05-04 11:44:09 +02:00
167bbb259f UX: add CSS classes on body tag based on topic statuses. (#12729)
This commit will add CSS classes like `unlisted`, `pinned`, and `unpinned` on the body tag.

* DEV: we no longer using the `categoryClass` & `tagClasses` methods.
* Update app/assets/javascripts/discourse/app/components/add-topic-status-classes.js

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2021-05-04 11:07:54 +05:30
77c92fd674 FIX: Hide Uncategorized unless allow_uncategorized_topics (#12889)
Uncategorized was sometimes visible even if allow_uncategorized_topics
was false. This was especially happening on mobile, if at least one
topic was uncategorized.
2021-05-04 13:05:08 +10:00
d1d9f83304 FIX: Link notification to first unread post (#12868)
* FIX: Link notification to first unread post

If a topic with a few posts was posted in a watched category or with a
watched tag, the created notification would always point to the last
post, instead of pointing to the first one.

The root cause is that the query that fetched the first unread post
uses 'TopicUser' records and those are not created by default for
user watching a category or tag. In this case, it should use the
'CategoryUser' or 'TagUser' records.

* DEV: Use named bind variables
2021-05-04 13:03:00 +10:00
0ac9abe59e FIX: show required only when full name is required and lint fix (#12916) 2021-05-04 12:58:26 +10:00
10d229ff71 Revert "FIX: excludes .svg-as-img from JS sizing (#12906)" (#12931)
This reverts commit 2f0205e5c850e40c278a0854c1cb121fdd175cbd.
2021-05-03 14:40:18 -04:00
9bc126949e DEV: Support referencing public images in plugins in SCSS (#12930) 2021-05-03 14:40:02 -04:00
8ca6202d81 FIX: tag control styles should apply to desktop (#12919) 2021-05-03 13:57:10 -04:00
3731d3c772 UX: anticipate anchor link hover (#12920) 2021-05-03 13:56:58 -04:00
b81c740fc7 FIX: remove invite based associated object (#12927) 2021-05-03 12:49:53 -04:00
6c276765c2 Adding composer-after-composer-editor plugin-outlet on the composer template (#12914)
* Adding after-groups-index-container plugin-outlet on the groups index template

* Update app/assets/javascripts/discourse/app/templates/groups/index.hbs

Co-authored-by: Régis Hanol <regis@hanol.fr>

* Adding composer-after-composer-editor plugin-outlet on the composer template

* Update composer.hbs

Co-authored-by: Régis Hanol <regis@hanol.fr>
2021-05-03 11:27:09 -04:00
286b6916af UX: refactor security modals (#12870)
- better form
- uses d-footer
- ensure buttons have the same height

Note that to achieve same height for btn without text, I made the choice to go for a minimum height which should work in most cases.
2021-05-03 09:22:33 +02:00
e7de943b5d FIX: hide "Next Week" in future-date-input on Sundays (#12918) 2021-05-03 09:22:05 +02:00
75e159f0ed FEATURE: add support for like webhooks (#12917)
* FEATURE: add support for like webhooks

Add support for like webhooks. Webhook events only send on user membership
in the defined webhook group filters.

This also fixes group webhook events, as before this was never used, and
the logic was not correct.
2021-04-30 17:08:38 -07:00
656b0ae39e DEV: Add an option to skip a theme update from the themes:install task. (#12905)
A theme can now specify `skip_update: true` in the yml config for
update allowing for the theme to be installed only if it does not already
exist.
2021-04-30 09:31:41 -07:00
7b5f31ff04 FIX: Wizard locale change wasn't applying to some elements (#12915) 2021-04-30 12:14:16 -04:00
ffa78b5c26 FIX: Update max-width of staff log cells (#12903)
This commit adjusts the max-width of cells in the staff logs to make up for the new word wrap rules in place.
2021-04-30 10:58:17 -05:00
28cefb666a FIX: light color scheme picker should default to user selection (#12913)
Fixes a bug in user preferences > interface, the light scheme dropdown
was defaulting to "Theme Default" even when the user had selected a
different scheme.
2021-04-30 11:31:01 -04:00
c1f969135f DEV: Update pushState and replaceState development patches (#12863)
This updates the preview_theme_id preservation logic to use more recent, robust, browser APIs. It also adds support for preserving the `?pp=async-flamegraph` parameter which is proposed in https://github.com/MiniProfiler/rack-mini-profiler/pull/494
2021-04-30 11:28:47 +01:00
486550c6fe DEV: Arrange theme QUnit dependencies in the right order (#12907) 2021-04-30 13:28:33 +03:00
6f8413fd85 DEV: Don't force Ember CLI for proxied requests made by Ember CLI (#12909) 2021-04-30 13:27:35 +03:00
19ee38b78a DEV: Fix BAD CSRF errors for admin POST requests when on Ember CLI (#12908) 2021-04-30 13:26:48 +03:00
ed818a4a19 FIX: prevents malformed href to crash TopicEmbed (#12910)
If the associated page of a remote url passed to `TopicEmber.new(remote_url)` contained a malformed link like: `<a href="(http://foo.bar)">Baz</a>` it would raise an uncaught exception:

```
Job exception: Invalid scheme format: (http
```
2021-04-30 11:10:19 +02:00
2f0205e5c8 FIX: excludes .svg-as-img from JS sizing (#12906) 2021-04-30 11:00:16 +02:00
d3b05f8a9c FEATURE: always insert images on new lines and add newline after (#12895) 2021-04-30 12:38:28 +04:00
54b7a0d06c FIX: Keep filter UI after editing post (#12898) 2021-04-29 14:56:23 -04:00
51f872f13a DEV: Require Ember CLI to be used in development mode (#12738)
We really want to encourage all developers to use Ember CLI for local
development and testing. This will display an error page if they are not
with instructions on how to start the local server.

To disable it, you can set `NO_EMBER_CLI=1` as an ENV variable
2021-04-29 14:13:36 -04:00
bd23e793b7 DEV: Add top level <div> when using Ember CLI (#12878)
Eventually we'd like to remove this but it makes our Ember CLI build
consistent with the non-ember version.
2021-04-29 14:13:19 -04:00
e2154b3d59 FEATURE: Small improvements to the topic list embed (#12881)
* FEATURE: Small improvements to the topic list embed

- Ability to wrap the list in a custom class so you can styles different
lists using specific CSS

- Adds a topic link to the thumbnail when using the complete template

* FIX: Be more strict about allowed chars in class name
2021-04-29 12:12:00 -03:00
614166ab1e UX: Reduce the number of columns on invite page (#12891)
We used to have different columns for invite type, groups and topics,
which sometimes introduced a lot of whitespace or distorted the other
columns.
2021-04-29 16:44:51 +03:00
849b786378 DEV: refactor font sizing into css custom variables (#12746)
* DEV: refactor font sizing into css custom variables

Add font variables as css variables. Allows plugins/themes to update/overwrite the variables and have core pick up changes. This allows for a theme or plugin to overhaul core's font ratios if desired.
2021-04-28 17:21:59 -07:00
0abb272289 DEV: Cleanup after remote update check (#12887)
Checking for remote should cleanup after itself. Currently each check litters
the /tmp filesystem with checkouts. This patch ensures that update checks
keep the system a bit tidier.
2021-04-28 17:07:27 -07:00
e25218014e FIX: add theme field errors (#12880)
* FIX: add theme field errors

Expose theme field errors on theme pages
Previously these errors were not being displayed on themes.
2021-04-28 15:00:37 -07:00
4f88f2eb15 FEATURE: Allow theme tests to be run in production (take 2) (#12845)
This commit allows site admins to run theme tests in production via a new `/theme-qunit` route. When you visit `/theme-qunit`, you'll see a list of the themes/components installed on your site that have tests, and from there you can select a theme or component that you run its tests.

We also have a new rake task `themes:install_and_test` that can be used to install a list of themes/components on a temporary database and run the tests of the themes/components that are installed. This rake task can be useful when upgrading/deploying a Discourse instance to make sure that the installed themes/components are compatible with the new Discourse version being deployed, and if the tests fail you can abort the build/deploy process so you don't end up with a broken site.
2021-04-28 23:12:08 +03:00
e832088edf UX: Fix styling for long label in multi-select choices (#12877) 2021-04-28 15:12:01 -04:00
54472e4150 DEV: raises a GrantError instead of a log and a variable exception (#12875)
The message in logs will now look like:

```
BadgeGranter::GrantError: Failed to backfill 'Some Badge' badge: {:post_ids=>[]}. Reason: ERROR:  column "email" does not exist
LINE 6: ...t id as user_id, current_timestamp as granted_at, email from...
```
2021-04-28 20:05:45 +02:00
ced5463ffb FIX: avatar flair wasn't displaying on the user summary page (#12867) 2021-04-28 20:15:22 +04:00
8be0191ffc UI: minor tweaks to insert-hyplink modal (#12871)
- ensures footer buttons are aligned
- prevents focus on close button to be much larger than it should be, note that this fix could impact other modals but the current solution is not working, so better fix it differently if needed
2021-04-28 17:21:23 +02:00
548c044809 FIX: Improvements to animated image pausing (#12839) 2021-04-28 10:48:00 -04:00
aa9a8d1041 UI: ensures toolbar gear button has identic color and height (#12872) 2021-04-28 16:22:30 +02:00