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
Segment Editor: Add "Test" button which opens the Visits Log #14884
Conversation
@katebutler could we change the "Test" button to look for example like the "CLOSE" button? In general not sure about the behaviour. It's great the segment selector stays open so we can create the segment afterwards. But when no visit matches or only one, or when an error happens then nothing can be seen see It's almost as it would need to push the content for the visitor log down only in this special case when clicking on test @diosmosis since you created the issue any thoughts on this? |
Not sure how to solve this problem. I suppose alternatively, we could load the segmented visitor log in a modal when test is clicked. Think that would make a difference? |
Not sure. Modal likely won't work either as it would still hide the partial result. Only thing I can imagine is pushing the content for the visitor log further down when using the test feature. That should also be easy to do I reckon. There be other options like loading the visits log in the segment editor but this can be tricky... alternatively we could check how many visits match a given segment when clicking on test and show the result as a modal or so. Maybe showing the matching visits in the last X hours be enough? |
Wouldn't the modal be on top of everything else? I'm not sure how it would be hidden. |
I see you meant showing the visits log in modal not the segment editor? Could work... just not sure what it looks like ... there's minimal space and there's usually a grey background etc. I now wonder what is the best way for a user to verify it works anyway? Like a number of matching visits? Showing a few visits? How many visits? How can a user be best sure it's working? Showing a number of matching visits plus a few example visits? Is there anything else how a user can be certain the segment is correct? Would it work to maybe open the test button in a new window? (not best UX though) |
Thought about showing the number of visits too. It might work, if the user trusts that the matched visits are correct... but then the segment might work but match the wrong visits and the user would need to see that. It's probably best to show some visits, what do you think? |
Yeah I reckon showing some visits is certainly helpful. The segment might still not be expected but I suppose you can never 100% test / verify it and we can always tweak over time if users have some good ideas on how to best validate a segment with additional information. If MySQL was faster we would directly show for each condition within a segment the number of matched visits and the number of matched visits for the entire segment even before clicking on test... but it wouldn't be fast enough and put quite some load on it. |
What if we only show the first matched visit? That might be enough to check that it's matching the right criteria. Unless the user uses an 'OR'. We could also figure this problem out later if it's not a blocker. EDIT: Disclaimer: I have no idea how important this issue is. |
Sounds good. Some simple solution be good |
@katebutler could you look at the merge conflicts? |
# Conflicts: # plugins/SegmentEditor/SegmentEditor.php # plugins/SegmentEditor/lang/en.json
@katebutler just gave it a test...
Noticed the segment editor disappears in the background when otherwise changing for example the number of shown visits and we wouldn't want to load too many there anyway maybe. Also when clicking on export the popover gets lost otherwise etc. |
…closing segment editor when popover is open
@katebutler is it possible to also when the popover is open, and someone clicks in the background, to only close the popover and not the segment editor? |
Fixes #14745