Skip to content

Conversation

@Riken-Shah
Copy link
Member

@Riken-Shah Riken-Shah commented Sep 9, 2022

The implementation is simple, we just check if the message sender is a notification bot to decide if we should show the read receipts list.

Fixes #22905

Screenshots and screen captures:
Screenshot 2022-09-23 at 12 54 00 PM

Self-review checklist

  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

@zulipbot zulipbot added size: L area: message feed (UI) Buttons/UI directly in the message feed (not popovers, etc.) area: popovers and tooltips Popovers, including general message actions. priority: high release goal We'd like to resolve this for the current major release labels Sep 9, 2022
@Riken-Shah
Copy link
Member Author

Instead of only applying the disable logic for the notification bot I have applied the logic for all the bots.

@alya Is this fine?

Also updated suggested text from,

Read receipts are not available for Notification any Bot messages.

@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from a35a1f3 to 67345e2 Compare September 9, 2022 18:54
@alya
Copy link
Contributor

alya commented Sep 9, 2022

Hm, could we just apply the logic to Notification Bot? Other bots don't send messages that the app automatically marks as read.

@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from 67345e2 to bfd9cff Compare September 10, 2022 06:23
@Riken-Shah
Copy link
Member Author

Hm, could we just apply the logic to Notification Bot? Other bots don't send messages that the app automatically marks as read.

Cool Done!

@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from bfd9cff to 0184d0c Compare September 10, 2022 06:30
Copy link
Collaborator

@juliaBichler01 juliaBichler01 left a comment

Choose a reason for hiding this comment

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

The changes to the code look good to me, but one question/suggestion about how the popup window looks:
Is it on purpose that there is a lot of empty space below the text? I think it would look better if this would be a bit less.

@Riken-Shah
Copy link
Member Author

Thanks for the review!

Is it on purpose that there is a lot of empty space below the text? I think it would look better if this would be a bit less.

We show the simar space if there are no read receipts.

Screenshot 2022-09-11 at 12 40 09 AM

I also agree it'd look better if we remove extra space. @alya What do you think?

@timabbott
Copy link
Member

The design challenge with the popover window is that we show it while the loading indicator is pinning, with a certain height, and then its height potentially changes when the data contents are added; it feels not great. So I think we have a minimum height set in the CSS for what will look good if there's at least one user shown, for example, read receipts for a private message.

One possible solution would be to just not have the modal have a loading indicator -- just only open it once we've received a response from the server (if we're making one); that way, you never see the thing's size change shortly after it opens.

The downside of that approach would be that you get no feedback that your click was processed properly..

@Riken-Shah Riken-Shah changed the title read_receipts: Disable showing read receipts for any Bot messages. read_receipts: Disable showing read receipts for Notification Bot messages. Sep 12, 2022
@Riken-Shah
Copy link
Member Author

We don't make any API call for notification bot messages, so for this case, we can remove the minimum height rule.

@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from 0184d0c to c475f40 Compare September 12, 2022 12:02
@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from c475f40 to f6548c5 Compare September 12, 2022 13:42
@zulipbot zulipbot added size: XL and removed size: M labels Sep 12, 2022
@Riken-Shah
Copy link
Member Author

We don't make any API call for notification bot messages, so for this case, we can remove the minimum height rule.

@alya Should I implement this?

@alya
Copy link
Contributor

alya commented Sep 14, 2022

We don't make any API call for notification bot messages, so for this case, we can remove the minimum height rule.

@alya Should I implement this?

Yes, that sounds good to me!

@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from f6548c5 to 39d7ca2 Compare September 15, 2022 08:49
@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from 39d7ca2 to a92f001 Compare September 15, 2022 09:18
@Riken-Shah
Copy link
Member Author

@alya & @timabbott This is ready for another round of review!

@alya
Copy link
Contributor

alya commented Sep 20, 2022

Hmm, I think we went too far with reducing the height required -- the modal looks cut off on the bottom.

Can we try leaving as much space on the bottom as we do on the top?

@alya
Copy link
Contributor

alya commented Sep 20, 2022

I didn't see any other issues in manual testing.

@Riken-Shah Riken-Shah force-pushed the disable-read-receipts-for-notification-bot-msg branch from a92f001 to a6e2a22 Compare September 23, 2022 07:22
@Riken-Shah
Copy link
Member Author

Can we try leaving as much space on the bottom as we do on the top?

On top we have 10px margin, at bottom we had 8px padding I have updated it to 10px.
Let me know if it looks alright or if I need to add more spacing.

P.S I have updated the screenshot on the top comment.

@alya alya added the integration review Added by maintainers when a PR may be ready for integration. label Sep 23, 2022
@alya
Copy link
Contributor

alya commented Sep 23, 2022

Hmm, it seems like there must be additional margin coming from somewhere -- I'm still seeing more space on top than on the bottom.

@alya
Copy link
Contributor

alya commented Sep 23, 2022

@timabbott do you want to take a look?

@Riken-Shah
Copy link
Member Author

I'm still seeing more space on top than on the bottom.

Hmm, maybe I can add one more px to compensate for hr border, but not sure that will create any significant difference.

@timabbott
Copy link
Member

I think Alya had a different existing padding as what to match -- there's 16px of padding above the heading, and 10px below; so we should just do the 16px, not 10px. It lgtm changing from 10px to 16px:

image

Merged with that tweak, thanks @Riken-Shah!

Riken-Shah and others added 2 commits September 23, 2022 16:20
The implementation is simple, we just check if the
the message sender is a notification bot to decide if we
should show the read receipts list.

We also update the modal content styling to match the padding at the
top of the modal.

Fixes zulip#22905
@timabbott timabbott force-pushed the disable-read-receipts-for-notification-bot-msg branch from a6e2a22 to 1557875 Compare September 23, 2022 23:22
@timabbott timabbott merged commit 1557875 into zulip:main Sep 23, 2022
@timabbott
Copy link
Member

Merged, with a bonus commit to move the read receipts CSS next to the related modal CSS.

@Riken-Shah Riken-Shah deleted the disable-read-receipts-for-notification-bot-msg branch September 24, 2022 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: message feed (UI) Buttons/UI directly in the message feed (not popovers, etc.) area: popovers and tooltips Popovers, including general message actions. integration review Added by maintainers when a PR may be ready for integration. priority: high release goal We'd like to resolve this for the current major release size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not show read receipts for Notification Bot messages

5 participants