Commit Graph

27183 Commits

Author SHA1 Message Date
19677ce3f6 UX: fix various login modal issues on mobile (#16708) 2022-05-11 14:36:27 +10:00
a6be4972a8 FIX: Use our header value instead of custom header on duplicates (#16711)
When we build and send emails using MessageBuilder and Email::Sender
we add custom headers defined in SiteSetting.email_custom_headers.
However this was causing errors in cases where the custom headers
defined a header that we already specify in outbound emails (e.g.
the Precedence: list header for topic/post emails).

This commit makes it so we always use the header value defined in Discourse
core if there is a duplicate, discarding the custom header value
from the site setting.

cf. https://meta.discourse.org/t/email-notifications-fail-if-duplicate-headers-exist/222960/14
2022-05-11 13:47:12 +10:00
907adce1cb FIX: Use registered bookmarkables for BookmarkManager (#16695)
These validate/after_create/after_destroy methods were added
back in b8828d4a2d27176cc7e882aa87fd084945f1501a before
the RegisteredBookmarkable API and pattern was nailed down.
This commit updates BookmarkManager to call out to the
relevant bookmarkable for these and bookmark_metadata for
consistency.
2022-05-11 09:51:03 +10:00
4037cdb6db FIX: Allow .ics for polymorphic bookmarks (#16694)
We have a .ics endpoint for user bookmarks, this
commit makes it so polymorphic bookmarks work on
that endpoint, using the serializer associated with
the RegisteredBookmarkable.
2022-05-11 09:29:24 +10:00
1d76c5ef5d FIX: Store scroll position when using Back button (#16658)
For some pages, when navigating to a topic and then pressing the Back
browser button to go back to the topic list, the scroll position was
not preserved and the user was taken to the beginning of the list.

This happened because the application failed to detect when the user
used the Back button and whether the topic list should be fetch from
the cache or not. The scroll position is preserved only for cached
topic lists.

Other improvements:

* Improve isPoppedState

* Reset position for topic-lists from user-activity page

* Remove usage of jQuery

* Make sure the scrollTo function has effect

Follow up to 618a1ba5711a67603e5783a528fd5d468ed42d7e.
2022-05-10 19:18:55 +03:00
6f00feaea0 Fix user nav overflow bug on ipad (#16702) 2022-05-10 16:38:14 +01:00
cf273ec6e0 DEV: Remove ie 11 from build targets (#16652)
## Ember Upgrade

Context: https://deprecations.emberjs.com/v3.x/#toc_3-0-browser-support-policy
2022-05-10 08:33:31 -05:00
142ae3b5e5 UX: allows to close popover on escape (#16698) 2022-05-10 13:41:02 +02:00
ba148e082d FIX: Apply watched words to user fields
Currently we don’t apply watched words to custom user fields nor user
profile fields.
This led to users being able to use blocked words in their bio, location
or some custom user fields.

This patch addresses this issue by adding some validations so it’s not
possible anymore to save the User model or the UserProfile model if they
contain blocked words.
2022-05-10 11:37:52 +02:00
26c5002144 UX: prevent user grid blowout on full page search (#16672) 2022-05-10 09:48:01 +08:00
3b3c505f3c FIX: Polymorphic bookmarks for bookmark report (#16693)
This allows the category_id filter for the bookmark
report to work with polymorphic bookmarks. Honestly this
is a little hardcode-y at the moment but until we go and
make this report a lot more flexible with more filters
I don't think it's worth the work to add extra interfaces
to RegisteredBookmarkable and BaseBookmarkable to make
this more flexible. This is enough for now.
2022-05-10 11:14:59 +10:00
fbcc35b417 DEV: Remove PostAction/UserAction bookmark refs (#16681)
We have not used anything related to bookmarks for PostAction
or UserAction records since 2020, bookmarks are their own thing
now. Deleting all this is just cleaning up old cruft.
2022-05-10 10:42:18 +10:00
Sam
2df3c65ba9 FIX: add support for pipelined and multi redis commands (#16682)
Latest redis interoduces a block form of multi / pipelined, this was incorrectly
passed through and not namespaced.

Fix also updates logster, we held off on upgrading it due to missing functions
2022-05-10 08:19:02 +10:00
919f71537e FIX: Background like count update didn't account for own user actions (#16688)
This fixes a corner case of the perf optimization in d4e35f5.

When you have the the same post showing in multiple tab/devices and like
said post in one place, we updated the like count but didn't flip the
`acted` bool in the front-end. This caused a small visual desync.

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2022-05-09 17:23:39 -03:00
3206452d78 FIX: Prioritize names and usernames consistently (#16686)
The prioritize_username_in_ux site settings controls if the username or
name will be prioritized in the user interface. On the user directory
page the name was never displayed if the user and username were very
similar, being completely different from all the other places where the
username or name is displayed.
2022-05-09 18:46:27 +03:00
618a1ba571 FEATURE: Restore scroll on user activity pages (#16661)
The scroll position was reset everytime the user pressed the back button
and returned to a user activity page. This fix applies only to pages
that uses the user-stream component. Pages with topic lists already had
this functionality implemented.
2022-05-09 18:45:57 +03:00
6bdcd7afb2 FEATURE: Promote the "delete group" staff action log. (#16656)
We used to log group deletion as custom, which means we can't later search for them. Include group ID in the details.
2022-05-09 12:12:52 -03:00
54759b7e8c FIX: Limit pan event handler to fix scrolling in TOC (#16673) 2022-05-09 09:04:03 -04:00
131974b3a6 FIX: ensures d-popover closes when clicking on popper (#16675)
I think the no-invalid-interaction is fine here as on click Is not actually used for an expected interaction but as an event bubbling barrier.
2022-05-09 10:50:29 +02:00
222c8d9b6a FEATURE: Polymorphic bookmarks pt. 3 (reminders, imports, exports, refactors) (#16591)
A bit of a mixed bag, this addresses several edge areas of bookmarks and makes them compatible with polymorphic bookmarks (hidden behind the `use_polymorphic_bookmarks` site setting). The main ones are:

* ExportUserArchive compatibility
* SyncTopicUserBookmarked job compatibility
* Sending different notifications for the bookmark reminders based on the bookmarkable type
* Import scripts compatibility
* BookmarkReminderNotificationHandler compatibility

This PR also refactors the `register_bookmarkable` API so it accepts a class descended from a `BaseBookmarkable` class instead. This was done because we kept having to add more and more lambdas/properties inline and it was very messy, so a factory pattern is cleaner. The classes can be tested independently as well.

Some later PRs will address some other areas like the discourse narrative bot, advanced search, reports, and the .ics endpoint for bookmarks.
2022-05-09 09:37:23 +10:00
c99a6b10fb DEV: allows to set a class on d-popover component (#16670) 2022-05-06 15:23:35 +02:00
7e026e8ddf DEV: Add last_seen_reviewable_id to the users table (#16666)
We're adding this column now in preparation for a future commit(s) that will
redesign the avatar/notifications menu. The reason the column is added in a
separate commit is because the redesign changes are going to be complex with a
high risk of getting (temporarily) reverted and if they included a database
migration, they wouldn't revert cleanly/easily.

Internal ticket: t65045.
2022-05-06 10:11:16 +03:00
337cacc7bf DEV: Unflak-ify tests and make them more robust (#16659) 2022-05-06 11:53:23 +08:00
4b92175d4e UX: remove horizontal scoll from narrow screens (#16657) 2022-05-05 11:34:01 -04:00
81580e559c FIX: prevents double user_badge_granted event (#16654)
This bug was causing double events to be fired as :user_badge_granted is already called when a `user_badge` is created. More over the signature of the block in the UserBadge code is `badge_id, user_id` not `badge, user_id`.
2022-05-05 15:09:41 +02:00
8c8b646a59 FIX: Prevent admin theme settings from blowing up (#16653) 2022-05-05 20:20:59 +08:00
47d64b7a08 DEV: Remove last instance of {{with}} helper (#16651) 2022-05-05 06:16:34 -05:00
87b970cd22 UX: Ensure #main-outlet-wrapper takes full width. (#16650)
For some reason, we're seeing inconsistency between production and
development environment where the computed width of #main-outlet-wrapper
is not taking the full width of the grid column in production.

Follow-up to b35cf7cc0c5845924b57399f418d7f5e58887a65.
2022-05-05 16:34:40 +08:00
b35cf7cc0c DEV: First desktop design interface pass at experimental sidebar take 2. (#16647) 2022-05-05 14:35:08 +08:00
aa5d90a554 Revert "DEV: First desktop design interface pass at experimental sidebar (#16590)" (#16646)
This reverts commit 36dcf80aff944500c2cdd183613af466efe35591.
2022-05-05 11:56:24 +08:00
0328757ffb FIX: Topic view breaks with topic timer to publish to restricted category. (#16385)
When a user views a topic that contains a topic timer to publish to a
restricted category, an error occurs on the client side because the user
does not have access to information about the category.

This commit fixes it such that the topic timer is not shown to the user
if the user does not have access to the category.
2022-05-05 11:21:01 +08:00
36dcf80aff DEV: First desktop design interface pass at experimental sidebar (#16590)
Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2022-05-05 11:19:46 +08:00
48481dd6ed DEV: Remove ignored columns (#16645)
Bookmark columns deleted in b22450c7a8d378b32291743ca602cbc477dea106
TopicTimer columns deleted in d098f51ad3a3649d34717fa6567489998709ba6c
Upload columns deleted in ef90575b918467e0417c5b5d72c22f12a8550b43
2022-05-05 12:22:17 +10:00
749e496a2c DEV: Minor fixes to json schema editor styling (#16634) 2022-05-05 09:52:58 +08:00
80d2888222 DEV: add new plugin outlets (#16643) 2022-05-05 09:49:27 +08:00
8271828948 FIX: Users with unicode usernames unable to load more topics in activity (#16627)
This was due to a server side bug when unicode usernames have been
enabled. We were double encoding the unicode username in the URL
resulting in a invalid URL.
2022-05-05 09:48:22 +08:00
2381f18eba DEV: Convert notify_about_queued_posts_after to accept a float (#16637)
Add support for `notify_about_queued_posts_after` to be set to a float to allow for 15 min increments
2022-05-04 11:33:43 -05:00
dcc7f2a55e DEV: Convert notify_about_flags_after to float (#16633)
Add support for `notify_about_flags_after` to be set to a float.
2022-05-04 11:19:43 -05:00
71a4e9db85 DEV: Use Ember getter and explicitly check for undefined (#16618)
Context -> https://deprecations.emberjs.com/v3.x/#toc_ember-metal-get-with-default
2022-05-04 09:37:42 -05:00
62ed7d4968 DEV: replace depreciated {{hasBlock}} (#16629) 2022-05-04 09:02:19 -05:00
68ccaa3acb DEV: Fix typos and outdated comments (#16614) 2022-05-04 14:12:18 +08:00
175e6e6061 DEV: Add Ember CLI workspace license checks (#16603)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-05-03 13:06:19 -04:00
96e7c85177 FIX: updated filtered replies when replies exist (#16610) 2022-05-03 11:16:20 -05:00
d58a1e180d DEV: Update ember-try to 2.0.0 (#16606) 2022-05-03 11:04:16 -04:00
19d2d55011 FIX: Ensure post_hotlinked_media index does not exceed size limit (#16609)
On some installations, this would fail with 'index row size exceeds btree version 4 maximum'. This commit replaces the (post_id, url)` index with a `(post_id, md5(url))` index, which is much more space efficient.
2022-05-03 15:47:58 +01:00
c1db968740 DEV: Move hotlinked image information into a dedicated table (#16585)
This will make future changes to the 'pull hotlinked images' system easier. This commit should not introduce any functional change.

For now, the old post_custom_field data is kept in the database. This will be dropped in a future commit.
2022-05-03 13:53:32 +01:00
Sam
616de83232 FIX: avoid concurrent usage of AR models (#16596)
Flagged by the truffle team at: https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671

This usage of AR is unsafe currently, as AR models are not safe for concurrent usage

Introduces a new query potentially every minute which should be acceptable.
2022-05-03 08:50:56 +10:00
4e65e02da6 UX: Fix hover state for flat buttons in WCAG schemes (#16601) 2022-05-03 08:48:58 +10:00
8cb33cee48 DEV: Fix typo in customize-robots-txt (#16599) 2022-05-02 22:54:05 +02:00
9fc3d46003 Update wordpress scopes and add `session/scopes` endpoint (#15366)
* Update wordpress scopes && add ``session/scopes`` endpointt

* Fix failing spec

* Add users#show scope to discourse_connect

* Update app/controllers/session_controller.rb

Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com>

Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com>
2022-05-02 12:15:32 -03:00