Commit Graph

16898 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
d88f792eb1
DEV: removes maximum limit on tag list site setting (#13436) 2021-06-18 12:53:30 +02:00
Joffrey JAFFEUX
cbd01a0cca
REFACTOR: removes unused code (#13412)
This has been fully useless since this fix https://github.com/discourse/discourse/pull/12865

The removed test is not actually real life behavior, category should be on a topic type not a fruit.
2021-06-18 11:55:49 +02:00
Martin Brennan
7f916ad06d
FIX: Dismiss new keyboard shortcut not working (#13430)
The dismiss new keyboard shortcut (x,r) has been broken since
7a79bd7da3. A fix was done and JS
tests were added in 006d52f32b
and b01e4738ab but the test was not
quite correct and so the bottom dismiss new button was not clicked.

This also fixes an issue with our keyboard shortcut click handling.
If multiple elements matched the selector they were all clicked. Now
we just click the first match.
2021-06-18 13:56:23 +10:00
Kane York
faca5c09fd
FIX: Use correct property for jump-up embedded post link (#13425)
Fixup for 77d33ebe21 #13320 which added the customShare property but did not update all uses
2021-06-17 13:17:56 -07:00
Penar Musaraj
36162cf396
FIX: Adding multiple auto tags in watched words admin UI (#13421) 2021-06-17 13:42:16 -04:00
Mark VanLandingham
95b51669ad
DEV: Revert 3 commits for plugin API to add directory columns (#13423) 2021-06-17 12:37:37 -05:00
Mark VanLandingham
854d965679
FIX: translations of table headers in group members directory 2021-06-17 11:08:18 -05:00
Andrei Prigorshnev
3b87271647
FEATURE: Open the edit bookmark modal when clicking on the topic level bookmark button (#13407)
If you click on a bookmark in the post stream you get an Edit Bookmark modal. This does not happen if you click the topic bookmark button.

We want to open the Edit modal too if there is only one bookmark on a topic (it doesn't matter on the first post or not). The other behaviour if there are > 1 bookmarks in the topic is to prompt the user to confirm delete of all the bookmarks in the topic. This behaviour will stay as-is.

I have done some refactoring in this PR, and still, there is a place for improvement. For example, we don't call post.deleteBookmark() method when deleting several bookmarks. I just don't want to refactor too much in one PR.
2021-06-17 19:24:06 +04:00
Mark VanLandingham
0c42a29dc4
DEV: Plugin API to allow creation of directory columns with item query (#13402)
The first thing we needed here was an enum rather than a boolean to determine how a directory_column was created. Now we have `automatic`, `user_field` and `plugin` directory columns.

This plugin API is assuming that the plugin has added a migration to a column to the `directory_items` table.

This was created to be initially used by discourse-solved. PR with API usage - https://github.com/discourse/discourse-solved/pull/137/
2021-06-17 09:06:18 -05:00
Bianca Nenciu
ea2833d0d8
FIX: Update post's raw from server response (#13414)
The client used to update the raw, but sometimes the server changed the
raw text, which resulted in false edit conflicts.
2021-06-17 11:53:29 +03:00
Joffrey JAFFEUX
90bd88627a
FIX: prevents mode to be forced to unexisting mode (#13413) 2021-06-17 10:07:51 +02:00
Joffrey JAFFEUX
4c3d2267b4
FIX: ensure we dont collapse data multiple times (#13399)
Note that this commit will also disable daily grouping for datasets with more than 30 data points. This will also smartly do the grouping by month when grouping a full year.
2021-06-17 09:15:20 +02:00
Martin Brennan
a2d69ff479
FIX: Move allow_unknown_sender_topic_replies outside SMTP/IMAP box (#13410)
This setting applies to both SMTP and IMAP for the group inbox,
so it should be outside those boxes in a standalone setting.
2021-06-17 11:40:01 +10:00
Martin Brennan
6bf97a47a7
FEATURE: Add last updated details to SMTP/IMAP group settings UI (#13396)
Adds the last updated at and by SMTP/IMAP fields to the UI, we were already storing them in the DB. Also makes sure that `imap_mailbox_name` being changed makes the last_updated_at/by field update for IMAP.
2021-06-17 08:21:06 +10:00
Robin Ward
651b8a23b8
FIX: Ember CLI was losing some preloaded data (#13406)
The `bootstrap.json` contains most preloaded information but some routes
provide extra information, such as invites.

This fixes the issue by having the preload request pass on the preloaded
data from the source page, which is then merged with the bootstrap's
preloaded data for the final HTML payload.
2021-06-16 13:45:02 -04:00
Andrei Prigorshnev
82ebc706aa
FIX: The topic level bookmark button stops working if choose ‘No’ on the clearing all bookmarks confirmation modal (#13374)
Steps to reproduce the bug:
- Create bookmarks for several posts on a topic
- Click the topic level bookmark button, it’ll open the modal that asks to confirm clearing all bookmarks from the topic
- Choose No
- Try to push the topic level bookmark button again - it won’t work

And it's fixed with this commit
2021-06-16 18:42:21 +04:00
David Taylor
0f9d31a85e
FIX: Make avatar-flair component fail gracefully group info missing (#13398)
This can happen when an avatar-flair component is rendered to an anonymous user on a login_required site (e.g. when they are redeeming an invite). The lack of group information was causing an error to be raised. With this commit, it now simple skips rendering the flair.
2021-06-16 11:22:11 +01:00
Martin Brennan
03fc31e23b
FIX: Skip failing tests for composer (#13394)
Since merging urgent fix 3a3a2abdb7
these tests are broken. We need to skip these until someone with
better knowledge of this can take a look.
2021-06-16 11:42:43 +10:00
Bianca Nenciu
3a3a2abdb7
FIX: Update raw and cooked immediate after edit (#13387)
* Revert "DEV: skips three tests following cc1e73  (#13386)"

This reverts commit 2be201660a.

* FIX: Do not refresh post stream twice

This also improves the test suite and simulates a long running request

* FIX: Update local copy of raw
2021-06-16 10:50:27 +10:00
Andrei Prigorshnev
00255d0bd2
FEATURE: make date pickers in the bookmarks UI and topic timer UI consistent with all other pickers (#13365)
Next Week should mean next Monday, Next Month - the first day of the next month, and so on.

Also, we'll be using the name "Next Monday" instead of "Next Week" because it's easier to understand. No one can get confused by next Monday.
2021-06-15 16:54:00 +04:00
Joffrey JAFFEUX
2be201660a
DEV: skips three tests following cc1e73 (#13386)
* DEV: skips two tests following cc1e73

Following the fix in cc1e73b8e4 we now refresh the whole stream which causes expected states of these tests to not exist anymore.

I'm skipping theses tests while we decide for a better fix.
2021-06-15 11:59:03 +02:00
Vinoth Kannan
9b200aba16
FIX: respect nofollow exclusion setting in topic featured links. (#11858)
Previously, nofollow attribute is not removed even when a domain is added to the `exclude_rel_nofollow_domains` site setting.
2021-06-15 15:27:43 +05:30
Sam
cc1e73b8e4
FIX: refresh post stream after in-place post updates (#13384)
Changing the staged attribute on a post means we also need to re-render.

Previously certain edits would not issue a refresh leaving a post greyed out.
2021-06-15 16:40:52 +10:00
Dan Ungureanu
ff4fb9c771
DEV: Add plugin API to extend search results (#12966) 2021-06-15 15:32:41 +10:00
Robin Ward
96c14c1968
FIX: Some absolute links were causing full page reloads (#13377) 2021-06-15 12:30:36 +10:00
Martin Brennan
af15bf1350
FIX: Show group Email settings if just SMTP enabled (#13362)
We previously only showed the link to the Email section
of group settings if both SMTP and IMAP were enabled for
a site, but this is not necessary now, only SMTP can be
enabled by itself so we should show the section if SMTP
is enabled.
2021-06-15 10:09:25 +10:00
Kane York
c780ae9d25
FEATURE: Add a messages view for all official warnings of a user (#12659)
Moderators are allowed to see the warnings list, with an access warning.

https://meta.discourse.org/t/why-arent-warnings-easily-accessible-like-suspensions-are/164043
2021-06-14 14:01:17 -07:00
Jordan Vidrine
7d8483f698
FIX: Adjust styling of first notification (#13366)
* UX: Fix first notification layout
2021-06-14 13:48:32 -05:00
Jarek Radosz
a470e880bd
FIX: De-prioritize composer category on navigation (#13372) 2021-06-14 17:38:57 +02:00
David Taylor
c44650eec5
FIX: Do not render user-avatar-flair element when user has no flair (#13369)
Rendering an empty flair element with the css `background-image: url();` causes the browser to attempt an image request against the current document URL. Making duplicate requests for the document URL can cause some unusual race conditions, especially related to cookies. If this user-avatar-flair element was present on the site homepage (e.g. if categories+latest is the homepage), then it can prevent the signup flow from working correctly.

This commit updates the user-avatar-flair component to be a transparent wrapper around the avatar-flair component. If the user has no flair, no avatar-flair element will be rendered. This avoids the `background-image: url();` situation, and fixes the auth flow.

This commit also removes the duplicate avatar flair rendering from the `latest-topic-list-item` component. This wasn't particularly obvious, since the duplicate flairs were being rendered directly on top of each other.
2021-06-14 15:12:57 +01:00
Andrei Prigorshnev
178b294a62
FIX: flaky javascript tests with fake timers (#13235)
The problem was happening in component integration tests on the rendering stage, sometimes the rendering would never finish.

Using time moments in the future when faking time solves the problem. Unfortunately, I don't know why exactly it helps. It was just a lucky guess after some hours I spent trying to figure out what's going on. But I've done a lot of testings, so looks like it really works. I'll be monitoring builds for some time after merging this anyway.

Unit tests seem to work alright with moments in the past. And we don't fake time in acceptance tests at the moment but I guess they would very likely be flaky with time moments from the past since they also do rendering.

I'm actually thinking of moving all fake time moments to the future (including moments in unit tests) to decrease the chances of flakiness. But I don't want to do everything in one PR, because I can accidentally introduce new flakiness.

A pretty easy way of picking time moments in the future for tests is to use the 2100 year. It has the same calendar as 2021. If a day is Monday in 2021 it's Monday in 2100 too.
2021-06-11 13:51:27 +04:00
Alan Guo Xiang Tan
4681c670c0 DEV: Remove test that is no longer providing value. 2021-06-11 12:45:37 +08:00
Robin Ward
052c841550
FIX: Clicking on a URL with a different url prefix did not work (#13349)
Before this fix if your forum was set up with a subfolder and you
clicked on a link to a different subfolder it would not work. For
example:

   subfolder: /cool
   link is: /about-us

Previously it would try to resolve /about-us as /cool/about-us. With
this fix it redirects to /about-us correctly.
2021-06-11 11:44:30 +10:00
Bianca Nenciu
ef906fa1da
FIX: Do not reload post if raw is present (#13335)
Editing a post that was just posted caused it to be reloaded and made a
request to the server. This had an additional side effect where the
model instances used by post stream and composer would be different and
changes did not propagate correctly.
2021-06-11 11:00:41 +10:00
Sam
3fefdb1973
A11Y: Adjust heading rules on topic lists (#13353)
Previously due to "rowheader" role we would read out topic titles twice.

This adjusts it so we apply the heading role only to the topic link.
In turn this makes navigation through topic lists more accurate (h) only
lands you on topic links. It also reduces the amount of duplicate reading
NVDA does.

Before:

Topic title link new topic link support link b481 link 19h link 2 button...

After:

Topic title link


This reduces noise, up and down once you land on a topic link can give you
more context.
2021-06-10 10:59:30 +10:00
Penar Musaraj
8fee32d277
A11Y: Don't mark multiple form labels as applying to the same element (#13289)
Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2021-06-09 11:06:56 -04:00
Robin Ward
77d33ebe21
FIX: Lots of plugin tests were using old, non-Ember compat CLI APIs (#13320) 2021-06-09 10:58:55 -04:00
Jeff Wong
f12551afd3
PERF: Animate request animation frame (#13337)
* PERF: requestanimationframe for better performance on pan events
* PERF: temporarily remove items on animate
2021-06-09 04:26:52 -10:00
Grayden
7ba35e0d71
UX: Improvements for reordering categories (#13013)
* UX: Improvements to reorder categories UX

Before, moving a category from, for example, position 25 to position 0 would result in switching the positions of the two categories at those positions.

Category A at position 0 would move to position 25, and Category B at position 25 would move to position 0.

Instead of switching positions, the reorder categories function should retain the order of categories except for the one being moved.

So, Category B at position 25 would still move to position 0, but Category A is merely bumped down to position 1.

This improves the UX because if a user *really* wants to switch the two categories, it results in one extra step. However in the other (what I think is normal) case, it saves the 24 other switches the user has to make to get Category A back to position 1 (you can imagine the user having to click the up arrow button repeatedly to return Category A to the top of the page). Now, imagine trying to do this with a site with 100s of categories. Yikes!

The UX improvement described above is what this commit accomplishes by redesigning the `move()` method of the reorder-categories controller. It adds some overhead to adjust the positions of all categories in between the origin and target positions, but in testing this is not noticible to the user. It's better for the computer to do extra work than the user.

* UX: Allow decimal input in reorder-categories for more precise positioning.

A common UX pattern when reordering a list of items is to allow a user to specify a target position as a decimal between two valid integer positions. The user is indicating they want the target list item to move in between the list items at the positions on either side of the target position.

For example, say there are three categories Category A at position 0, Category B at position 1, and Category C at position 3.

To move Category C in between Categories A and B, a user can now simply update Category C's position to 0.5.
2021-06-09 13:01:06 +03:00
Osama Sayegh
940eb28e31
FIX: Theme tests should work in production (#13333)
The `ember_jquery` bundle contains production builds of Ember and jQuery
which doesn't work with tests. This commits introduces a new
`theme_qunit_vendor` bundle which is copy of the `vendor` bundle but
doesn't contain `ember_jquery`.

This commit is a partial revert of
409c8585e4
2021-06-08 22:03:59 +03:00
Mark VanLandingham
d500d0cc99
FEATURE: Add group filter to user directory (#13330) 2021-06-08 13:20:08 -05:00
Andrei Prigorshnev
49c231c993
UX: add a hint that tags can be included in tag groups (#13326) 2021-06-08 20:14:34 +04:00
Jarek Radosz
21e8a33177
DEV: Clean up QUnit tests (#13328)
* DEV: Use `query` helper instead of `queryAll()[0]`
* DEV: Replace `queryAll().length` w/ `exists()`/`count()`
* DEV: Use `exists()` instead of `count() > 0`, `count() === 0`
* DEV: Use `count()`/`exists()` instead of `find().length`
2021-06-08 17:54:12 +02:00
David Taylor
9811a1c5d9
DEV: Allow transformed values to be used in all widget hbs statements (#13331)
Previously, the `transformed.blah` shortcut could only be used in top-level hbs statements like {{transformed.blah}}. When attempting to use it in a sub-expression like `{{concat "hello" transformed.world}}`, it would raise a "transformed is not defined" error.

This commit updates the shortcut logic to make `transformed.blah` and `attrs.blah` work consistently in all hbs expressions.

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2021-06-08 16:46:07 +01:00
Andrei Prigorshnev
9e426d33c7
FEATURE: Don't show the draft checkmark when drafts are saved (#13292)
We don't want to show the draft checkmark in the composer when drafts are saved, as it’s a little bit distracting to see it keeps appearing and disappearing. Only in the case of error does it need to show anything, we will be showing a "drafts offline" warning as we did it before.

An important detail is that the warning was appearing and disappearing all the time too. Now, the warning won’t be flashing while a user is typing, it’ll be disappearing only when the draft was eventually saved.
2021-06-08 13:22:49 +04:00
Bianca Nenciu
393dafce7d
FIX: Hide image resize controls in staged edit content (#13313) 2021-06-08 11:58:18 +03:00
Martin Brennan
9d7b6779fb
DEV: Remove suppression of popupAjaxError if isTesting (#13325)
I made a change in https://github.com/discourse/discourse/pull/13083/files to suppress re-throwing the error from popupAjaxError if isTesting() but that causes issues in other places instead. If I remove it I get this error in the group email test I added, so I am removing that test here too.
2021-06-08 16:33:59 +10:00
Jarek Radosz
45971d8c3c
FIX: Search menu regression (#13321)
Turns out the extra `<span>` is crucial. (TODO: this codepath needs tests…)
2021-06-08 03:30:26 +02:00
Jeff Wong
7c12ca89cb
Update menu swipe (#13277)
* DEV: replace swipe events to use translate rather than left/right

translate is better for animations. also use native css animations for opening
and closing.

* a11y: respect prefers reduced motion on mobile timeline

* DEV: reduce jquery usage

* DEV: add tests for menu swipe events

test is run in 50% zoom/transform which means offsets and x of touch events need to be halved

Refactor test window to use a transform rather than non-standard zoom property

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2021-06-07 12:31:16 -07:00
Jarek Radosz
1cd189aabf
UX: Fix search topic titles wrapping (#13315)
A followup to e3b0abc and a replacement PR for #13298.
Fixes long topic titles wrapping to a separate line in the dropdown search results.

Also replaces divs that were incorrectly nested inside spans.
2021-06-07 21:26:22 +02:00