Commit Graph

46083 Commits

Author SHA1 Message Date
23ec819e70 DEV: Introduce debugging rake task for PostRevision issues (#17998)
See https://meta.discourse.org/t/232885 for context. This rake task enumerates problematic records and prints out a sample of each failure.
2022-08-19 11:30:46 +01:00
67bb0d8a55 DEV: Add profile tab to the experimental user menu (#17982)
This commit adds the profile tab to the experimental user menu. We're adding it to the user menu because it contains links/buttons that are not available anywhere else. We may remove the tab again if we find better places for those links/buttons, but for now it'll stay.

For more context on the experimental user menu, see https://github.com/discourse/discourse/pull/17379.
2022-08-19 13:02:11 +03:00
66376a6569 PERF: Minify admin and wizard JS bundles to match app (#17992)
This regressed when we switched these bundles to be compiled by ember-cli. Before/after sizes:

```
          before                  after
admin.js: 1370 KB (190 KB gz) --> 782 KB (125 KB gzipped)
wizard.js: 127 KB ( 22 KB gz) -->  68 KB ( 18 KB gzipped)
```
2022-08-19 08:35:00 +01:00
2d1e50911b DEV: Use button for sidebar section header
Buttons can be focused and action triggered via the enter key compared
to a span.
2022-08-19 10:21:36 +08:00
21d5904d7c UX: fix typo in a blank page copy 2022-08-19 09:36:51 +08:00
2f2e146d2d Build(deps-dev): Bump webmock from 3.17.1 to 3.18.1
Bumps [webmock](https://github.com/bblimke/webmock) from 3.17.1 to 3.18.1.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.17.1...v3.18.1)

---
updated-dependencies:
- dependency-name: webmock
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 09:36:37 +08:00
b36a22d6e2 Build(deps-dev): Bump minitest from 5.16.2 to 5.16.3
Bumps [minitest](https://github.com/seattlerb/minitest) from 5.16.2 to 5.16.3.
- [Release notes](https://github.com/seattlerb/minitest/releases)
- [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc)
- [Commits](https://github.com/seattlerb/minitest/compare/v5.16.2...v5.16.3)

---
updated-dependencies:
- dependency-name: minitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 09:36:23 +08:00
49a70a37f1 FIX: Remove last_unread_post excerpt logic for bookmarks (#17979)
The logic to determine what post excerpt to show for
a topic-level bookmark based on the last unread post
was complex and slow, so we decided to remove it and
always just use the first post excerpt.

This commit also fixes an issue where a couple of
instances of for_topic were missed when doing the
Bookmarkable refactors, so:

1. Clicking the topic bookmark link was not taking
   the user to the last unread post
2. When replying to a topic where there was a topic
   level bookmark with the auto delete preference
   of "on owner reply", we were not removing the
   bookmark from the UI correctly.

A test has been added for the former, the latter would
be quite time-consuming to test and not really worth
it considering it's quite an edge case UI bug.
2022-08-19 09:35:25 +10:00
df9e546f5d DEV: Abort qunit tests when clicking in the toolbar (#17989)
Ever opened `/tests`, immediately tried to change the config, and got frustrated that focus keeps getting stolen by the running tests? Worry no more - this commit will make the tests auto-abort when you click any of the input/dropdowns in the QUnit header. It's not perfect - abort will wait until the end of the currently running test, so sometimes focus will be stolen one more time. But it's still a lot better than having to manually find and click the abort button.
2022-08-18 23:32:38 +01:00
542cd1ff90 FIX: allow extra whitespace when asking discobot to perform a bot command (#17738) 2022-08-18 13:32:30 -04:00
6e682cc7c4 FEATURE: Count views on published pages (#17878)
* FEATURE: Count views on published pages

* Removed trailing whitespaces

* Fixed the test
2022-08-19 00:11:19 +08:00
c63580b226 DEV: Add hint when qunit assertion fails and app is unsettled (#17984) 2022-08-18 16:19:46 +01:00
707034bc75 FIX: Limit new and existent staged users for email topics (#17970)
The maximum_staged_users_per_email site setting controls how many
staged users will be invited to the topic created from an incoming
email. Previously, it counted only the new staged users.
2022-08-18 18:19:20 +03:00
b082f459c9 FEATURE: Limit maximum recipients for group emails (#17971)
New maximum_recipients_per_new_group_email site setting can be used to
prevent spam group emails with many recipients.
2022-08-18 18:18:58 +03:00
e49167b311 UX: Improve empty state copy on the activity/replies page (#17784) 2022-08-18 18:00:15 +04:00
d7c1ff3116 UX: show blank page placeholder instead of the blue panel that says "No Activity" (#16293) 2022-08-18 17:24:52 +04:00
6c46f4af71 UX: Don't shrink avatar/number box (#17985)
Fixes an issue where longer sidebar item text would squeeze the prefix element
2022-08-18 14:36:30 +02:00
1e58bed4d2 DEV: add tests for --composer-height calculation (#17986)
Follow up for 2b43238973
2022-08-18 18:03:15 +05:30
7b51ac418b DEV: Asyncify most of Composer controller (#17974)
…and fix cases where we were breaking the promise/async chain (by not awaiting or not returning promises)
2022-08-18 13:58:08 +02:00
a252bbf3e8 FIX: show hide bootstrap mode notice in real time (#17981) 2022-08-18 17:09:33 +05:30
be1b202fd6 FEATURE: show default custom date on time-shortcut-pickers (#17867) 2022-08-18 14:55:54 +04:00
5990842dd9 UX: Revamp styling of sidebar
The following changes are made in this commit:

1. Move caret icon in sidebar section header to the right.
1. Each row in sidebar takes the full width which enables us to do a
full width highlight on hover and when sidebar link is active.
1. Ensure each row in Sidebar is of the same height.

Internal refs: /t/70546, /t/72196, /t/71820
2022-08-18 16:14:49 +08:00
44c53cb3bf DEV: Update internal package.json metadata (#17978)
These packages are not published anywhere - they only exist for organizational purposes within this repository. Even so, it makes sense for their metadata to match that of the top-level discourse/discourse repository.
2022-08-17 23:27:16 +01:00
72ea00d0cc DEV: Add progress output in CI during ember-cli build (#17977)
By default, in CI environments, Ember CLI does not output anything between "building..." and "cleaning up". Depending on configuration and hardware, Discourse asset builds can take upwards of 60s, and so this lack of output can make the build feel 'stuck'.

This commit introduces an addon which checks for CI mode, and then outputs status information periodically. The logic is very similar to Ember CLI's non-CI progress output implementation (https://github.com/ember-cli/ember-cli/blob/04a38fda2c/lib/models/builder.js#L183-L185).
2022-08-17 22:39:52 +01:00
e70bab16e0 DEV: Ensure custom ember-cli addons only output JS files (#17976)
Without this filter, a binary file (e.g. `.DS_Store`) in one of these addon directories will be concatenated into the output JS. Note that this filter is applied at the end of the build pipeline, so any hbs files have already been transpiled into `.js`.

This mirrors the filtering performed on the main application bundle by Ember CLI: https://github.com/ember-cli/ember-cli/blob/04a38fda2c/lib/broccoli/default-packager.js#L1255
2022-08-17 21:42:55 +01:00
602efedd81 UX: Make popup menu options scroll on limited screen height (#17973) 2022-08-17 13:42:25 -07:00
4a77ef8e29 DEV: Add more excludes to jsconfig (#17975) 2022-08-17 21:51:40 +02:00
665327f7a4 DEV: Clean up loadDraft() (#17969) 2022-08-17 20:43:35 +02:00
48e2b984fb DEV: Filter topics by tag for categories (#17953)
* DEV: Filter topics by tag for categories and children
2022-08-17 11:51:02 -05:00
626d50c15c FIX: Disable Twitter onebox without API support (#17519)
Twitter removed OpenGraph tags from their pages. We can no longer
extract all the information (for example, the quoted tweet) we need
to render Oneboxes without using their API.
2022-08-17 18:32:48 +03:00
2b43238973 FIX: set --composer-height when the composer is in collapsed state (#17968) 2022-08-17 20:51:09 +05:30
8626268366 FEATURE: Trigger backup_failed event on backup failure (#17955)
This also adds an optional `ticket` parameter to `Backuper` which allows identifying the backup in `backup_complete` and `backup_failed` events. Both events contain the logs as payload and moving some methods around ensures that all errors are included in the logs.
2022-08-17 14:33:23 +02:00
83a975a28b DEV: Await for all async MessageBus callbacks (#17966)
Should take care of yet another category of flaky tests
2022-08-17 12:44:48 +02:00
129885c260 DEV: Add test for arrow keys navigation in the experimental user menu (#17961)
This test is extracted from the changes proposed in: https://github.com/discourse/discourse/pull/17379.
2022-08-17 11:51:29 +03:00
eba05c5d48 DEV: Update commit hash for .git-blame-ignore-revs
I merged the commits the wrong way and it changed the commit sha for the
commit we wanted to ignore

Follow-up to 84464a2898fa180ddcce356f34ca287a732be363
2022-08-17 16:47:16 +08:00
84464a2898 DEV: Add sidebar template colocation commit to .git-blame-ignore-revs 2022-08-17 16:44:04 +08:00
95c7cdab94 DEV: Template colocation for sidebar files
We can finally rely on template colocation in our app and we'll be
standarizing on that in the near future. However, I want to have sidebar
adopt this convention earlier.
2022-08-17 16:44:04 +08:00
0f0ea75a21 DEV: Display Sidebar template for anonymous user (#17962)
Setup the stage for the sidebar which will be shown to anonymous users.
2022-08-17 16:17:36 +08:00
42c64abe15 FEATURE: open create invite modal from the bootstrap notice banner (#17960) 2022-08-17 13:11:09 +05:30
97a20d6d82 UX: Sort tags alphabetically in sidebar (#17959) 2022-08-17 14:47:29 +08:00
f7ed09a02c UX: Sort categories alphabetically in Sidebar (#17958) 2022-08-17 12:39:02 +08:00
4657110c35 UX: Make category section link icons consistent with Sidebar's interface (#17922)
Instead of relying on another help to generate the icons, we want to
rely on the interface for adding prefix icons. This ensures that prefix
icons are consistent across the section links in Sidebar
2022-08-17 09:40:43 +08:00
913db5d546 PERF: Only load the current user's topic_user for bookmarks list (#17873)
Previously, for every bookmarked topic, all topic_user records were being preloaded. Only the current user's record is actually required.

This commit introduces a new `perform_custom_preload!` API which bookmarkables can use to add custom preloading logic. We use this in topic_bookmarkable to load just the topic_user data we need (in the same way as `topic_list.rb`).

Co-authored-by: Blake Erickson <o.blakeerickson@gmail.com>
2022-08-17 09:40:24 +08:00
2e09a88a29 A11Y: Accessible full-screen and minimize composer buttons (#17936) 2022-08-17 09:39:41 +08:00
c790b0305c A11Y: Use button in d-modal-cancel component (#17938)
Fixes issue under User profile > Preferences > Security > Recently Used
devices > Cog icon. And cleans up the "reply where" modal as well.
2022-08-17 09:39:28 +08:00
1c324aff98 Build(deps): Bump mini_racer from 0.6.2 to 0.6.3 (#17956)
Bumps [mini_racer](https://github.com/discourse/mini_racer) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/discourse/mini_racer/releases)
- [Changelog](https://github.com/rubyjs/mini_racer/blob/master/CHANGELOG)
- [Commits](https://github.com/discourse/mini_racer/compare/v0.6.2...v0.6.3)

---
updated-dependencies:
- dependency-name: mini_racer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-17 09:36:46 +08:00
977d9c0725 Build(deps): Bump pry-byebug from 3.10.0 to 3.10.1 (#17957)
Bumps [pry-byebug](https://github.com/deivid-rodriguez/pry-byebug) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/deivid-rodriguez/pry-byebug/releases)
- [Changelog](https://github.com/deivid-rodriguez/pry-byebug/blob/master/CHANGELOG.md)
- [Commits](https://github.com/deivid-rodriguez/pry-byebug/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: pry-byebug
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-17 09:36:27 +08:00
de8bf7466e DEV: list_type: simple to allow for easy re-ordering (#17952) 2022-08-16 10:23:14 -07:00
f788c1b3e4 FIX: welcome topic title was not editable (#17950)
The topic title was not editable when composer was opened from the
welcome topic banner.
2022-08-16 21:27:40 +05:30
3e010bc88c DEV: Ensure RenderGlimmer handles in-place component changes (#17946)
If a widget toggles between displaying two different RenderGlimmer instances, the Widget framework treats them as the same, and so `update()` is called rather than destroy/init. This commit detects this scenario and manually destroys/inits to ensure the correct component is being rendered.
2022-08-16 16:44:21 +01:00