mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	narrow: Expand informative text in empty mentioned messages view.
Limits the width of the empty message notice to 600px so that this longer and more descriptive text is similar to the width of the empty header text.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							cd2812c131
						
					
				
				
					commit
					89a3c290db
				
			@@ -28,6 +28,22 @@ const SPECTATOR_STREAM_NARROW_BANNER = {
 | 
			
		||||
    ),
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const MENTIONS_VIEW_EMPTY_BANNER = {
 | 
			
		||||
    title: $t({defaultMessage: "This view will show messages where you are mentioned."}),
 | 
			
		||||
    html: $t_html(
 | 
			
		||||
        {
 | 
			
		||||
            defaultMessage:
 | 
			
		||||
                "To call attention to a message, you can mention a user, a group, topic participants, or all subscribers to a stream. Type @ in the compose box, and choose who you'd like to mention from the list of suggestions. <z-link>Learn more</z-link>",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "z-link": (content_html) =>
 | 
			
		||||
                `<a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">${content_html.join(
 | 
			
		||||
                    "",
 | 
			
		||||
                )}</a>`,
 | 
			
		||||
        },
 | 
			
		||||
    ),
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
function retrieve_search_query_data(): SearchData {
 | 
			
		||||
    // when search bar contains multiple filters, only retrieve search queries
 | 
			
		||||
    const current_filter = narrow_state.filter();
 | 
			
		||||
@@ -209,20 +225,7 @@ function pick_empty_narrow_banner(): NarrowBannerData {
 | 
			
		||||
                        ),
 | 
			
		||||
                    };
 | 
			
		||||
                case "mentioned":
 | 
			
		||||
                    return {
 | 
			
		||||
                        title: $t({defaultMessage: "You haven't been mentioned yet!"}),
 | 
			
		||||
                        html: $t_html(
 | 
			
		||||
                            {
 | 
			
		||||
                                defaultMessage: "Learn more about mentions <z-link>here</z-link>.",
 | 
			
		||||
                            },
 | 
			
		||||
                            {
 | 
			
		||||
                                "z-link": (content_html) =>
 | 
			
		||||
                                    `<a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">${content_html.join(
 | 
			
		||||
                                        "",
 | 
			
		||||
                                    )}</a>`,
 | 
			
		||||
                            },
 | 
			
		||||
                        ),
 | 
			
		||||
                    };
 | 
			
		||||
                    return MENTIONS_VIEW_EMPTY_BANNER;
 | 
			
		||||
                case "dm":
 | 
			
		||||
                    // You have no direct messages.
 | 
			
		||||
                    if (
 | 
			
		||||
 
 | 
			
		||||
@@ -1619,6 +1619,8 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.empty_feed_notice {
 | 
			
		||||
    max-width: 600px;
 | 
			
		||||
    margin: 0 auto;
 | 
			
		||||
    padding: 3em 1em;
 | 
			
		||||
    text-align: center;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -293,8 +293,8 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
 | 
			
		||||
    assert.equal(
 | 
			
		||||
        $(".empty_feed_notice_main").html(),
 | 
			
		||||
        empty_narrow_html(
 | 
			
		||||
            "translated: You haven't been mentioned yet!",
 | 
			
		||||
            'translated HTML: Learn more about mentions <a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">here</a>.',
 | 
			
		||||
            "translated: This view will show messages where you are mentioned.",
 | 
			
		||||
            'translated HTML: To call attention to a message, you can mention a user, a group, topic participants, or all subscribers to a stream. Type @ in the compose box, and choose who you\'d like to mention from the list of suggestions. <a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">Learn more</a>',
 | 
			
		||||
        ),
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user