-
Notifications
You must be signed in to change notification settings - Fork 293
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
Show spinner when saving, unsaving, or dismissing an idea in Idea Hub widget #3907
Comments
@johnPhillips The IB is pretty much good to go, just one question:
Can you clarify your thoughts on what should possibly change here? I know you discussed with @asvinb, I'd like to see a few more of those thoughts shared here. Is it a problem having the loading indicators only on hover? I'm thinking, if the user clicks one of those buttons, they're already hovering over it anyway, so they should definitely see the state change to a loading indicator. They may afterwards hover off while it's still loading, but I wonder how much this is actually a problem. If you think it is a problem, how should it be fixed? |
@johnPhillips Actually we can solve the issue about the hover state by adding another class name to the container having |
@felix sure. To be honest, I was slightly vague there because I wasn't sure how the precise implementation would play out with #3920, which is obviously touching the same UI. I think things will have to be slightly fluid between the two issues, or we need to make the other a blocker, solve it and then come back to this one perhaps?
I've outlined my thoughts over on that issue - keen to hear your feedback 👍
I personally felt that it might be slightly confusing for the spinner to disappear when you mouse out because you lose that feedback that something is in play, and then the idea just disappears. I discussed with @aaemnnosttv the idea of having some sort of transient notice that appears for a few seconds to confirm that the action was successful for example, so we could look at that. However, as regards spinners and hover states / line wrapping, I knocked together some examples:
Again, keen to hear your thoughts and happy to go with whatever you decide 👍 |
@asvinb - nice idea, thank you. It might make things feel a bit more consistent, and I can add it to the IB if there is consensus. Over to you @felixarntz - let me know what your take is on all this. |
@felixarntz would it be possible to let us know on this one so we can push it through for Sprint 57 please? |
@eclarke1 This is pending the solution for #3839, which we've now defined in the PR conversation (that issue due to that complexity may go notably above original estimate and probably is already). I think we should hold off this one until the path of #3839 is clear. It's not a launch blocker - still, let's try again for Sprint 58 (which would likely still be in time for launch). @alex-moulin What are your suggestions for how a loading spinner should be surfaced here? Now that the three actions will be within the three-dots menu, it changes the UI circumstances here. Should the menu close on click and the loading spinner should show somewhere else on the idea? Or should the menu remain open and the loading spinner shows within the menu next to the action you clicked? cc @johnPhillips |
@felixarntz My suggestion would be that the menu remains open and the loading spinner would show within the menu in the place of the action clicked, and the result would then either be to see the pin icon in its selected state or that the idea would disappear if it was dismissed. Let me know if you would rather have me mock this up. |
Update here: It looks like we're circling back to the original approach for #3839, likely including removal of the hover state. As such, that should drastically simplify this issue as well. I'm keeping this in ACs for now though until the course of the other issue is clear. |
@marrrmarrr @samitron7 This is now the issue where we need to make a decision on whether to remove the hover state and show the icons at all time. The hover state is problematic for the loading indicator since then they would also only show when hovering, which would be a strange experience. |
@felixarntz I think from the user perspective, there's a distinction b/w when they're viewing the widget in general and when they want to complete an action. |
This may be doable indeed, but not 100% certain based on how the widget hover state currently works. Paging our CSS guru @asvinb, do you think the above would be possible? E.g. add a class when the user interacts with one of the buttons to temporarily keep them visible (instead of only on hover). |
@felixarntz / @eugene-manuilov could you give this a final look over? I was involved in some of the changes at the end and it's somewhat of a non-trivial PR. Thanks! |
QA Update:
|
@wpdarren, yes, maybe, not critical though. Create a ticket for it if you want since tooltips are out of scope for this ticket, I think. |
I think it's expected behavior for now. I'm not sure what the best solution is here but I think the tooltip offers useful information while the action is in progress. So maybe something we can enhance but, I wouldn't say it's a poor experience. |
QA Update: ✅Verified:
idh.mp4 |
There can be a delay when clicking one of the Idea Hub widget icon buttons to save, unsave, or dismiss an idea. This delay is expected due to sending the API request, however we should cater for this in the UI by showing a loading indicator.
See https://app.asana.com/0/1200491083500938/1200758448284506/f
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Additional Acceptance criteria
See #3907 (comment).
Implementation Brief
assets/js/modules/idea-hub/datastore/constants.js
:IDEA_HUB_ACTIVITY_IS_DELETING
IDEA_HUB_ACTIVITY_IS_PINNING
IDEA_HUB_ACTIVITY_IS_UNPINNING
IDEA_HUB_ACTIVITY_IS_PROCESSING
assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/Idea.js
IDEA_HUB_ACTIVITY_IS_PROCESSING
handleDelete
,handlePin
andhandleUnpin
callbacks, replaceIDEA_HUB_ACTIVITY_IS_PROCESSING
with the corresponding activity constant, soIDEA_HUB_ACTIVITY_IS_DELETING
insidehandleDelete
etc..googlesitekit-idea-hub__idea--is-processing
class name to the.googlesitekit-idea-hub__idea--single
wrapper if there is an activity in progress.IDEA_HUB_BUTTON_DELETE
,IDEA_HUB_BUTTON_PIN
andIDEA_HUB_BUTTON_UNPIN
buttons, passCircularProgress
withsize
set to24
as prop, as the value for theicon
prop if the corresponding activity constant is truthy. So ifIDEA_HUB_ACTIVITY_IS_DELETING
is truthy, passCircularProgress
; if not, pass the appropriate existing icon.IDEA_HUB_ACTIVITY_IS_PROCESSING
to set thedisabled
attributes on the create and view buttons with a check to see ifactivity
is truthy. In other words, disable the buttons if there is anactivity
in progress.assets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss
,.googlesitekit-idea-hub__idea--actions svg
to exlude the.MuiCircularProgress-svg
so that we are not setting any styles on theCircularProgress
svg..googlesitekit-idea-hub__idea--is-processing
which are similar to.googlesitekit-idea-hub__idea--single:hover
and..googlesitekit-idea-hub__idea--single:focus
where the icons are visible except the background color is white.Test Coverage
Visual Regression Changes
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: