-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 one-time go-to-conversation tooltip. #32169
base: main
Are you sure you want to change the base?
Conversation
3ad7a23
to
e248a91
Compare
Hey @alya, Ready for review! |
e248a91
to
9f69765
Compare
web/src/compose_recipient.ts
Outdated
const instance = tippy(arrow_element, { | ||
content: "Go to conversation", | ||
trigger: "manual", | ||
placement: "top", | ||
}); |
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.
Instead of creating a new tippy instance every time show_tippy_tooltip
is called, you could check if an instance already exists on the element and reuse it. This avoids creating duplicate tooltips and improves performance.
const instance = tippy(arrow_element, { | |
content: "Go to conversation", | |
trigger: "manual", | |
placement: "top", | |
}); | |
const instance = arrow_element._tippy || tippy(arrow_element, { | |
content: "Go to conversation", | |
trigger: "manual", | |
placement: "top", | |
}); |
@userAdityaa the issue mentions:
Here, by "one-time" it means -- "visible to a user only once". Currently it will appear every time a user composes a message. Also, I don't think the PR aligns with this point mentioned in the issue:
Sidenote: Fix the commit message as per commit guidelines. |
9f69765
to
a2b3c7c
Compare
a2b3c7c
to
9e301da
Compare
9e301da
to
feab02c
Compare
Hey @alya, Ready for review! |
As requested in the PR template, please post screenshots of all your changes in the PR description. It is very difficult to review a video. |
Hey @alya, Done with that. After this changes now the user will see the fire-tooltip only once and it will only get close by clicking on the arrow key. |
OK, but I still don't see a screenshot of the tooltip. |
web/src/compose_recipient.ts
Outdated
}); | ||
|
||
instance.show(); | ||
localStorage.setItem("conversation_tooltip", "true"); |
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.
Don't use browser local storage, see git grep OnboardingStep
for how to implement a one-time notice.
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.
Im fixing it right now.
I fixed the PR title to be appropriately descriptive, and this needs to be reworked to store the data correctly, but that probably is independent of the UI. |
Hi @userAdityaa and @timabbott, I have resolved the issue locally by implementing it as an onboarding step. Although I was initially unable to fix the failing tests yesterday, I'm happy to report that the tests have now been successfully fixed. Would it be okay for me to open a PR? Thank you. |
ab7be76
to
30417fd
Compare
30417fd
to
6492ef2
Compare
This commit helps for configuring one-time tippy tooltip when the go to conversation button is active, as previously it was difficult for user to find out about the button. Fixes zulip#32166
6492ef2
to
a0fd631
Compare
@saubhagya-patel , sure, that's fine. Please be sure to follow https://zulip.readthedocs.io/en/latest/contributing/continuing-unfinished-work.html and tag @userAdityaa for a review. |
@alya, I have opened a PR #32773 addressing the issue, following this comment. Following the continuing unfinished work documentation, please note that PR #32773 takes a different approach than the one in this PR. Specifically, this PR adds the tooltip when updating the class of the "go-to conversation" button, whereas PR #32773 introduces the tooltip when the Thank you. |
Hey @saubhagya-patel, If you don't mind can you review this PR. And if there is something wrong you can just inform that to me. Thank you in advance. |
This commit helps for configuring one-time tippy tooltip when the go to conversation button is active, as previously it was difficult for user to find out about the button.
Fixes: #32166
Before (No indication)
Screen.Recording.2024-10-30.at.4.43.02.AM.mov
After (Fire up Tooltip)
Screen.Recording.2024-12-17.at.3.27.34.AM.mov
Screenshot (Tooltip)
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: