-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rework SessionsPlayerButton
and clean up Sessions UI
#5745
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.
@@ -82,7 +84,7 @@ export function Popup({ | |||
{visible | |||
? ReactDOM.createPortal( | |||
<div | |||
className="popper-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.
Nit: There's a handy library called clsx
that can make this shorter.
className={clsx('popper-tooltip', className)}
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's great, thanks
for session_recording_package in session_recording_results: | ||
for session_recording in session_recording_package: | ||
del session_recording["start_time"] | ||
del session_recording["end_time"] |
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.
Would it be worth it to use a new snapshot so that expected
reflects these new parameters?
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 kind of bit menial to add them (it's not really a snapshot, just values in self.assert*
calls) due to quirks in datetime comparisons (I had some problems with tzinfo when I tried to do this before going for del
) and I don't think this is important to getting this in, so I'll leave this with just a TODO for now.
Q: In an ideal world most sessions would not have a dropdown. Do we show one even for those (as indicated by the screenshot?) If so - why? IMO This makes the "majority" case of navigation much slower - you expect most sessions (especially in modals) to have one recording only. Also this kills a feature - being able to distinguish whether a user has seen a recording or not. This is something that's quite vital for session recordings - you don't want to watch one twice. As-is this change would make my usage of session recordings more painful. Note also #4884 - this quirk is something I think is temporary and we'll hopefully do away with soon. cc @clarkus |
@alexkim205 Thanks for the review. As for durations, yes, they should definitely be different, as a PostHog session is detached from a session recording, that is a single session can have multiple session recordings, a single one, or none. So it's calculated separately based on PostHog events. @macobo I see what you mean. I added a play icon to the button too, which is blue if there's an unwatched recording under it, and gray if all have already been watched. This should improve scannability. Initially I wanted to make it play without a dropdown in case of a single recording, but I ran into a weird UX mismatch, where you'd be able to see the details of recordings when there were multiple of them (thanks to the dropdown), but you'd be clicking blindly in case of a single recording – no place to show the timestamp. |
@macobo I think we can maintain the watched / unwatched treatment given my previous comment. It's essentially how it works now with different color coding and additional tooltips to translate what each icon color means. Is there more to it, or would that be sufficient to communicate watched / unwatched? I do think we should trigger dropdowns with clicks as much as possible. That's pretty consistent across all our dropdowns. |
Problem being you need to open a dropdown to see it in the first place. Given that these lists are supposed to get large, we have made a process that used to be purely visual into a clicking fest.
I think so too. Didn't check out the code but looks much better.
Very good point IMO re the design. All-in-all it brings up the question of what problem we're solving and why? For Sessions page specifically, after #4884 has been resolved we will have 1-1 matching. For people modal, I'd expect similar - one session recording per person 98% of the time (since it's based on user navigating around, how often do you use two browsers at once?) What are we gaining by simplifying the 2% case? |
True, but we've also added extra information to communicate the freshness of recordings and their duration. It's another click but you can have more info to indicate which session might be worth watching. We are going to hit some uppperbound for scale here at some point. We could adjust to showing recordings inline with an overflow option that links off to a full list of recordings for the user, but I'm not sure we'd be able to include the other information in that case.
I think we're making it better until #4884 is completed. Once we have more confidence in a 1:1 match, we can adjust here. Given how things are working now, this feels like a better experience until we're in a more ideal state. |
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.
Sorry for the delay here. Quick posthumous review (UX/product, not code) based on PostHog Cloud to improve in a subsequent PR,
-
There's a weird flicker with scrollbars which makes interacting with the page really difficult.
-
Probably related to the above, the tooltip in the Recordings column header is no longer showing.
-
We should just allow direct clicking on the button if there's only one recording. No point in showing the dropdown. This way it can also be clear at a glance to users when a session has multiple recordings.
Oh I thought it was set to only show a drop down in the case of multiple recordings. Otherwise it's a button. |
Couldn't reproduce the flickering, but there is a problem with sizing the last column in |
Changes
This is a prerequisite for #5664 that reworks
SessionsPlayerButton
into something that will also be useful in the persons modal. Based on a design by @clarkus (#5664 (comment)), though a bit more lightweight than there at the moment – can always adjust any styles.Also cleaned up nearby Sessions UI.