Skip to content

Conversation

@krassowski
Copy link
Member

@krassowski krassowski commented Jul 19, 2023

References

Fixes #14857 and background (see below).

This mostly concerns extensions, core lab does not make use of the built-in CodeMirror tooltips. Since extensions may want to let's fix it. Also, it is a trivial change.

Code changes

  • Add background color override for tooltips as currently we override font color (indirectly) but not background
  • Configure tooltip positioning to fix it when used in JupyterLab which uses contain: strict for performance reasons

User-facing changes

Before After
Screenshot from 2023-07-19 19-54-26 Screenshot from 2023-07-19 19-53-59

Backwards-incompatible changes

None

@krassowski krassowski added the bug label Jul 19, 2023
@krassowski krassowski added this to the 4.0.x milestone Jul 19, 2023
@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @krassowski

in https://github.com/jupyterlab/jupyter-collaboration/blob/a2671b2e226ba8163fb878885305f27ad9c77e3a/packages/collaboration/src/cursors.ts#L432 to allow displaying the user name when collaborating, I also added the parent to be document.body so that the tooltip is displayed outside of its containing widget (for the collaboration example that is needed if the cursor is in the editor first line).

Should we bring that one in also by default?

@krassowski
Copy link
Member Author

Yes, I think that attaching to body is fine. Though I wonder if we should explore defining tooltipSpace⁠ function (too or instead).

@fcollonval
Copy link
Member

Yes, I think that attaching to body is fine. Though I wonder if we should explore defining tooltipSpace⁠ function (too or instead).

Thanks for the pointer I oversight that feat'. I guess it would be nice. I'm gonna approved this as we could do a follow-up with that feature. I let you press forward or merge 😉

@krassowski krassowski merged commit 6a2c33e into jupyterlab:main Aug 2, 2023
@krassowski
Copy link
Member Author

@meeseeksdev please backport to 4.0.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyterlab that referenced this pull request Aug 2, 2023
fcollonval pushed a commit that referenced this pull request Aug 3, 2023
…ckground (#14903)

Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CodeMirror should be configured to use absolute positioning of tooltips

2 participants