Skip to content

Conversation

@khanak0509
Copy link

Fixes #2003
When a channel has no topics, the topic list page now shows a helpful
placeholder message [("There are no topics here yet") , ("Be the first to start a conversation in this channel!")]
instead of an empty screen.

This improves the user experience by providing visual feedback .

issue #2003 .

Copy link
Collaborator

@sm-sayedi sm-sayedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @khanak0509 for picking this up. Comments below.

Please also provide screenshot(s) of the new changes in the PR description; that way, the reviewers can quickly confirm the visuals. Additionally, these changes need tests.

"@zulipAppTitle": {
"description": "The name of Zulip. This should be either 'Zulip' or a transliteration."
},
"topicListEmptyPlaceholderHeader": "There are no topics here yet",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
"topicListEmptyPlaceholderHeader": "There are no topics here yet",
"topicListEmptyPlaceholderHeader": "There are no topics here yet.",

Comment on lines 1431 to 1433

}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the additional lines, please remove.

Comment on lines 172 to 177
if (lastFetchedTopics!.isEmpty) {
final zulipLocalizations = ZulipLocalizations.of(context);
return PageBodyEmptyContentPlaceholder(
header: zulipLocalizations.topicListEmptyPlaceholderHeader,
message: zulipLocalizations.topicListEmptyPlaceholderMessage);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code inside the if block needs to be indented.

@khanak0509
Copy link
Author

Screenshot 2025-12-10 at 10 16 41 PM

@khanak0509
Copy link
Author

khanak0509 commented Dec 10, 2025

And regarding the screenshots of the new changes ,how should I proceed?
Should I create a new channel, or is there already an empty channel available?
In the screenshot attached to the issue, I saw an empty channel named mobile team , but I couldn’t find

@sm-sayedi
Copy link
Collaborator

By tests, I meant to write at least one test case in test/widgets/topic_list_test.dart verifying the new change does behave as expected.

And for the screenshot, you can always mess with the code and mimic the scenario; for example in this case, you can write lastFetchedTopics = [] and see how it looks.

@khanak0509
Copy link
Author

image

@khanak0509
Copy link
Author

I have now added a test case (16) in test/widgets/topic_list_test.dart to verify the latest changes, and I’ve also attached a screenshot.

@chrisbobbe
Copy link
Collaborator

chrisbobbe commented Dec 10, 2025

Thanks @khanak0509, and thanks @sm-sayedi for offering a review!

From a quick look at the screenshot, the text doesn't match Alya's specification in #2003 (comment); please fix that (delete the second line of text).

@khanak0509
Copy link
Author

image

@khanak0509
Copy link
Author

khanak0509 commented Dec 10, 2025

All changes done and the second line removed.

Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Small comments below.

Please also squash your fixup commits into the main commit that you're proposing to be merged.

Comment on lines 1422 to 1427
},
"topicListEmptyPlaceholderHeader": "There are no topics here yet.",
"@topicListEmptyPlaceholderHeader": {
"description": "Header text shown when a channel has no topics."
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Follow indentation/newline patterns of existing code


void main() {
TestZulipBinding.ensureInitialized();

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: keep empty line, separating stanzas of code

@khanak0509
Copy link
Author

khanak0509 commented Dec 11, 2025

sorry for these mistakes , now is it ok ?

@khanak0509
Copy link
Author

image

Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! And bump on this part of my last review:

Please also squash your fixup commits into the main commit that you're proposing to be merged.

If you need help with that, please see our Git guide to tidying commits, and if you still need help please join us in #git help in the Zulip development community.

@khanak0509 khanak0509 force-pushed the fix-empty-topic-list-2003 branch from 2e6356b to 4f5080d Compare December 12, 2025 06:54
@khanak0509
Copy link
Author

I did :
git rebase -i HEAD~8
(since I had committed 8 times), then marked all commits as s except for 1, removed all the other commits, and pushed
However, on GitHub, it shows:
There isn’t anything to compare.
2e6356b1b363cf0c9711dbbb5c68f451a495decb and 4f5080d8b103023cb21a605485a65457dd361c46 are identical.
Why is this happening?
When I do:
git log --oneline origin/main..HEAD
It shows only:
4f5080d (HEAD -> fix-empty-topic-list-2003, origin/fix-empty-topic-list-2003) topic_list: Add empty state placeholder for channels with no topics Fixes: #2003

why this is happening ? could you please help me

@khanak0509
Copy link
Author

I think now there is only 1 commit([topic_list: Add empty state placeholder for channels with no topics]) . is it ok ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty topic-list page design

3 participants