Skip to content
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

WIP: Have the element info-window follow the mouse #1472

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

mariusandra
Copy link
Collaborator

Changes

Here's a proposal to fix #1372

  • Before:
    2020-08-19 13 37 16

  • After:
    2020-08-19 16 31 16

Please send feedback if this approach makes sense or not. It's still WIP.

Todo:

  • Refactor InfoWindow.tsx by moving a lot of the calculation there into a logic (many selectors...)
  • Make it work better on narrow screens (move the window to the right/left of the mouse if it doesn't fit and make it full height)
  • Test how it all works on mobile

Checklist

  • All querysets/queries filter by Team (if this PR affects any querysets/queries)
  • Backend tests (if this PR affects the backend)
  • Cypress E2E tests (if this PR affects the front and/or backend)

@timgl timgl temporarily deployed to posthog-1372-info-windo-1rj19o August 19, 2020 14:35 Inactive
@Twixes
Copy link
Member

Twixes commented Aug 19, 2020

I think this is a good idea!

@Twixes
Copy link
Member

Twixes commented Aug 20, 2020

Maybe add a "Click element to lock window in place" note inside the window.

@timgl timgl marked this pull request as ready for review September 1, 2020 13:51
@timgl timgl merged commit b559fee into master Sep 1, 2020
@timgl timgl deleted the 1372-info-window-at-mouse-coords branch September 1, 2020 13:51
@mariusandra
Copy link
Collaborator Author

Hi, this was a WIP still. The windows didn't work right with a small screen and I had not tested anything on devices without a mouse.

@timgl
Copy link
Collaborator

timgl commented Sep 1, 2020

Oops, I'll revert

Twixes pushed a commit that referenced this pull request Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not obvious you can "pin" toolbar infowindows
3 participants