-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add id to users with same name #1255
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran your code manually and it worked fine for me. I tried going through the files to give an in-depth review, but it is difficult to review due to the current commit structure. It would be great if you could squash the commits using git rebase
.
Also, upon running pytest
on your PR, there were errors. All those can be looked into deeper once the commit structure is streamlined.
1b4b479
to
ad54cb0
Compare
d1e89b2
to
307f719
Compare
c49b6a6
to
32f3598
Compare
6d0751e
to
41c83cb
Compare
a83a39b
to
9b493bc
Compare
9b493bc
to
cdec135
Compare
409ea50
to
cca8c5f
Compare
@Sushmey Ah, I'm also finding the tests are failing locally, so that may have been a migration issue on my part. I also meant to say that the last commit doesn't have test changes and clearly changes behavior, which is one reason I'd like to see a new test for previous commit, so that the code change can match a test change. |
8b85a73
to
b3344a8
Compare
b3344a8
to
fb6d9c5
Compare
d930d89
to
8af2213
Compare
36a3456
to
d21c790
Compare
d21c790
to
8981b3e
Compare
616238c
to
a6e9263
Compare
7dc3a92
to
8be2fcd
Compare
Users with same name had their adjacent messages displayed under the same header and no visually discerning feature was available for users with same name. This solves that. Fixes zulip#1151.
8be2fcd
to
47c8a5f
Compare
47c8a5f
to
5d4cccc
Compare
Added a function that checks if username is duplicate. Added tests for the same.
Add a style class to user id in header to differentiate from the username. Users with same usernames have their user id appended to it. Doing it in the same header test needs changing of all the parameters. Hence adding a new test function specifically for that case.
5d4cccc
to
f6e5605
Compare
@neiljp Thank you so much for the review! 🤗 I've made changes based on your comments. I added a separate test for duplicate usernames but different author ids to account for the new behaviour and updated a test case for the same. I tried including it in the same test but it doesn't seem possible without having to change every test case parameter. Also, added a mock response as false for the is_user_name_duplicate function so that it doesn't fail for the reasons mentioned earlier, and since duplicate usernames aren't what we are testing in that test anyway. |
What does this PR do?
On the Zulip terminal, users with same name weren't discernable because they were considered the same users. This PR compares users based on their user id and then displays the user id beside their user name if they have the same user name.
Fixes #1151
Tested?
Commit flow
first commit -> comparing users based on user_id instead of name so that a separate header can be displayed
second commit -> displaying user_id beside all the users who have same name as more than one user in the list of all users. Adding a new style class so that the appended user_id doesn't look like a part of the username
third commit -> changing label from
names
tomsg_sender
in all colour themesNotes & Questions
This makes users with same name have different headers by appending the id to the author name and shows it as a visually separate addition.
Interactions
Visual changes

Before:
After:
