Skip to content

The annotations do not show on mousehover #7033

@williamdes

Description

@williamdes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions