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

The annotations do not show on mousehover #7033

Open
williamdes opened this issue Apr 7, 2023 · 0 comments
Open

The annotations do not show on mousehover #7033

williamdes opened this issue Apr 7, 2023 · 0 comments

Comments

@williamdes
Copy link
Contributor

The code uses #4861
image

It does not enter

if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;

Because CodeMirror does CodeMirror-lint-marker CodeMirror-lint-marker-warning and not -mark-
Is this another bug ?

Anyway, let's continue :

if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity,
__annotation: ann
}));

And pushes the right contents, here is what we feed into

[{"message":"Linting is disabled for this query because it exceeds the maximum length.","fromLine":0,"fromColumn":0,"toLine":0,"toColumn":0,"severity":"warning"}]

https://github.com/phpmyadmin/phpmyadmin/blob/e5826048d8e97ce166bf138af6e2e9891b0fec36/js/src/codemirror/addon/lint/sql-lint.js#L8

Even if I use message it seems to not display the tooltip
That's really strange

CodeMirror: 5.65.10

@marijnh marijnh mentioned this issue Apr 7, 2023
Closed
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

No branches or pull requests

1 participant