-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
onboarding: Add a one-time intro tooltip for the "go to conversation" button. #32773
base: main
Are you sure you want to change the base?
onboarding: Add a one-time intro tooltip for the "go to conversation" button. #32773
Conversation
Following the questions mentioned in the issue:
|
Tagging @userAdityaa for a review following this comment. |
Playing with it, I like showing it just once (total), since it's the same for DMs and non-DMs. |
We can decide a bit later whether to mark existing users as having already completed this onboarding step. |
@prakhar1144 Are you up for reviewing this one? |
This PR, rather than the issue, is the right place to post this comment:
|
web/src/compose_setup.js
Outdated
compose_tooltips.hide_go_to_conversation_button_intro_tooltip(); | ||
if ( | ||
onboarding_steps.ONE_TIME_NOTICES_TO_DISPLAY.has( | ||
"intro_go_to_conversation_button_tooltip", | ||
) | ||
) { |
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 think it's better to call hide_go_to_conversation_button_intro_tooltip
only if ONE_TIME_NOTICES_TO_DISPLAY
contains it, instead of calling it on every narrow.
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.
That sounds like a reasonable approach to me and I have fixed it. Thank you
web/src/compose_actions.ts
Outdated
@@ -455,6 +459,7 @@ export let cancel = (): void => { | |||
compose_state.set_message_type(undefined); | |||
compose_pm_pill.clear(); | |||
$(document).trigger("compose_canceled.zulip"); | |||
compose_tooltips.hide_go_to_conversation_button_intro_tooltip(); |
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.
Here, we are calling it every time as well.
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.
This is now fixed. Thank you.
2906d2a
to
ef9af1d
Compare
Following the review received I have updated this PR. The following changes are made:
This PR is ready for review. Thank you @pratik-pc for the feedback. |
web/src/compose_tooltips.ts
Outdated
const faded_messages_exist = $(".focused-message-list .recipient_row").hasClass("message-fade"); | ||
if (!faded_messages_exist) { | ||
return false; | ||
} |
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.
Not quite sure if this approach is correct. This would fail if there were no message_list
in the current view, such as when composing from the recent conversation view and changing the recipient.
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.
Hmm, that sounds right, I will fix it in the subsequent push. Thank you.
web/src/compose_tooltips.ts
Outdated
|
||
// This helps in updating tooltip when switching between topics. | ||
hide_go_to_conversation_button_intro_tooltip(); | ||
|
||
if ( | ||
!onboarding_steps.ONE_TIME_NOTICES_TO_DISPLAY.has("intro_go_to_conversation_button_tooltip") | ||
) { | ||
return false; | ||
} |
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 think we should call hide_go_to_conversation_button_intro_tooltip
after the onboarding_step
check here as well, unless there's a specific case you are trying to avoid.
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 must have missed it, I apologize for the inconvenience caused. It is fixed in the subsequent push.
ef9af1d
to
59149ad
Compare
Following the review received, I have updated this PR. The following changes are made:
@pratik-pc, I have made the required changes. Please let me know if any further adjustments are needed. Thank you. |
web/src/compose_tooltips.ts
Outdated
if ( | ||
onboarding_steps.ONE_TIME_NOTICES_TO_DISPLAY.has("intro_go_to_conversation_button_tooltip") | ||
) { | ||
hide_go_to_conversation_button_intro_tooltip(); | ||
} | ||
|
||
if ( | ||
!onboarding_steps.ONE_TIME_NOTICES_TO_DISPLAY.has("intro_go_to_conversation_button_tooltip") | ||
) { | ||
return false; | ||
} |
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.
This can just simply be
if (
!onboarding_steps.ONE_TIME_NOTICES_TO_DISPLAY.has("intro_go_to_conversation_button_tooltip")
) {
return false;
}
hide_go_to_conversation_button_intro_tooltip();
web/src/compose_tooltips.ts
Outdated
const message_type = compose_state.get_message_type(); | ||
if (message_type === "stream") { | ||
const stream_exists = Boolean(compose_state.stream_id()); | ||
|
||
if ( | ||
stream_exists && | ||
compose_recipient.composing_to_current_topic_narrow() && | ||
compose_state.has_full_recipient() | ||
) { | ||
return false; | ||
} | ||
} else if (message_type === "private") { | ||
const recipients = compose_state.private_message_recipient(); | ||
if ( | ||
recipients && | ||
compose_recipient.composing_to_current_private_message_narrow() && | ||
compose_state.has_full_recipient() | ||
) { | ||
return false; | ||
} | ||
} |
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.
It's better to refactor this into its own function from update_narrow_to_recipient_visibility
in a separate commit and then use it here and update_narrow_to_recipient_visibility
.
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.
Sure, that sounds better, I have implemented this in the following push.
web/src/compose_tooltips.ts
Outdated
const $go_to_conversation_button = $(".conversation-arrow"); | ||
if (!$go_to_conversation_button.hasClass("narrow_to_compose_recipients")) { | ||
return false; | ||
} | ||
|
||
const is_any_compose_banner_visible = compose_banner.is_any_banner_visible(); | ||
if (is_any_compose_banner_visible) { | ||
return false; | ||
} |
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.
This can also be
if (
!$(".conversation-arrow").hasClass("narrow_to_compose_recipients") ||
compose_banner.is_any_banner_visible()
) {
return false;
}
This commit extracts the logic of updating the "narrow_to_compose_recipients" class applied on the go-to conversation button from the function update_narrow_to_recipient_visibility() into a separate function should_display_narrow_to_recipient(). Fixes part of zulip#32166.
This commit includes the following changes: - Add a one-time go-to conversation tooltip as an onboarding step. - Implement tests to verify the tooltip. Fixes zulip#32166.
59149ad
to
792cb48
Compare
Following the review received, I have updated this PR. The following changes are made:
@pratik-pc, thank you for the ongoing feedback. I hope the updated changes look good to you. Please let me know if any further adjustments are needed. Thank you. |
You'd probably want to call |
This PR adds a one-time intro tooltip for the "go to conversation" button. It includes the following changes:
Fixes #32166.
CZO thread
The tooltip is displayed highlighting the "go to conversation" button without being hovered.
Conditions for showing the tooltip as mentioned in the issue #32166:
Screenshots and screen captures:
Go to conversation button tooltip.
Tooltip not being shown when banner is displayed.
Tooltip in an interleaved view.
Tooltip when a user confirms a topic recipient change to a topic not in current view.
Tooltip when a user confirms a topic recipient change to an existing topic.
Tooltip when a user confirms a direct message recipient change to a different recipient.
Dismissing the tooltip.
Tooltip not being shown again.
Tooltip in Recent conversations view.
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: