discourse/spec/models
Osama Sayegh 1fa21ed415
DEV: Prioritize unread notifications in the experimental user menu (#18216)
Right now the experimental user menu sorts notifications the same way that the old menu does: unread high-priority notifications are shown first in reverse-chronological order followed by everything else also in reverse-chronological order. However, since the experimental user menu has dedicated tabs for some notification types and each tab displays a badge with the count of unread notifications in the tab, we feel like it makes sense to change how notifications are sorted in the experimental user menu to this:

1. unread high-priority notifications
2. unread regular notifications
3. all read notifications (both high-priority and regular)
4. within each group, notifications are sorted in reverse-chronological order (i.e. newest is shown first).

This new sorting logic applies to all tabs in the experimental user menu, however it doesn't change anything in the old menu. With this change, if a tab in the experimental user menu shows an unread notification badge for a really old notification, it will be surfaced to the top and prevents confusing scenarios where a user sees an unread notification badge on a tab, but the tab doesn't show the unread notification because it's too old to make it to the list.

Internal topic: t72199.
2022-09-12 21:19:25 +03:00
..
about_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
admin_dashboard_data_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
api_key_scope_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
api_key_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
application_request_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
associated_group_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
badge_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
badge_type_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
bookmark_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
category_featured_topic_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
category_group_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
category_list_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
category_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
category_user_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
child_theme_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
color_scheme_color_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
color_scheme_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
developer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
digest_email_site_setting_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
directory_item_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
discourse_connect_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
do_not_disturb_timing_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
draft_sequence_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
draft_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
email_change_request_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
email_log_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
email_token_spec.rb FIX: do not redeem expired invites on new user signup (#17798) 2022-08-05 07:50:48 +05:30
embeddable_host_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
emoji_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
given_daily_like_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
global_setting_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
group_archived_message_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
group_associated_group_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
group_history_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
group_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
group_user_spec.rb FIX: Restore trust level when leaving group (#17954) 2022-08-29 13:00:48 +03:00
incoming_link_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
incoming_links_report_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
invite_redeemer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
invite_spec.rb SECURITY: Limit email invitations to topic 2022-08-10 11:33:16 +02:00
javascript_cache_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
locale_site_setting_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
mailing_list_mode_site_setting_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
notification_spec.rb DEV: Prioritize unread notifications in the experimental user menu (#18216) 2022-09-12 21:19:25 +03:00
optimized_image_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
permalink_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
plugin_store_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
post_action_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
post_action_type_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
post_analyzer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
post_detail_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
post_mover_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
post_reply_key_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
post_reply_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
post_revision_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
post_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
post_timing_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
private_message_topic_tracking_state_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
published_page_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
quoted_post_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
remote_theme_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
report_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
reviewable_claimed_topic_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
reviewable_flagged_post_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
reviewable_history_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
reviewable_post_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
reviewable_queued_post_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
reviewable_score_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
reviewable_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
reviewable_user_spec.rb FIX: Recover from guardian check when deleting reviewable users. (#17949) 2022-08-16 11:50:06 -03:00
s3_region_site_setting_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
screened_email_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
screened_ip_address_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
screened_url_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
search_log_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
sidebar_section_link_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
site_setting_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
site_spec.rb FIX: hide welcome topic banner as soon as the welcome topic is edited (#18125) 2022-09-01 09:44:21 +05:30
sitemap_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
skipped_email_log_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
stylesheet_cache_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
tag_group_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
tag_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
tag_user_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
theme_field_spec.rb FIX: Ensure `<script>` handlebars templates are namespaced correctly (#18178) 2022-09-04 13:01:10 +02:00
theme_modifier_set_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
theme_spec.rb DEV: Use DiscourseJsProcessor for theme template compilation (#18135) 2022-09-01 11:50:46 +01:00
top_menu_item_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
top_topic_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
topic_allowed_user_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_converter_spec.rb FIX: Do not invite whisper or small action posters (#18123) 2022-08-29 15:52:54 +03:00
topic_embed_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
topic_featured_users_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_group_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_invite_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_link_click_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
topic_link_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
topic_list_spec.rb FIX: Avoid duplicate topic-list requests (#18073) 2022-08-24 11:54:01 +01:00
topic_participants_summary_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_posters_summary_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_spec.rb FIX: Skip topic allowed user for small actions (#18075) 2022-08-29 13:01:16 +03:00
topic_tag_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_thumbnail_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_timer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
topic_tracking_state_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
topic_user_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
topic_view_item_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
translation_override_spec.rb FEATURE: update bootstrap mode notice to add invite and wizard links (#17822) 2022-08-10 00:13:42 +05:30
trust_level3_requirements_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
trust_level_and_staff_setting_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
trust_level_setting_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
unsubscribe_key_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
upload_reference_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
upload_spec.rb FIX: broken onebox images due to url normalization bugs 2022-08-09 11:55:25 +01:00
user_action_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_api_key_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_archived_message_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_associated_group_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_auth_token_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_avatar_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_badge_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_bookmark_list_spec.rb FIX: Return next bookmarks page only if it exists (#18139) 2022-09-01 13:04:00 +03:00
user_email_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_export_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
user_field_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_history_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_notification_schedule_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_option_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_profile_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_profile_view_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
user_search_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_second_factor_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
user_spec.rb DEV: Prioritize unread notifications in the experimental user menu (#18216) 2022-09-12 21:19:25 +03:00
user_stat_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
user_status_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_summary_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_visit_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
username_validator_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
watched_word_spec.rb FIX: Allow to add the same watched word with a different case (#17799) 2022-08-05 12:18:17 +02:00
web_crawler_request_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
web_hook_event_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
web_hook_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00