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

[5.0.0-dev] codemirror hints #14475

Closed
williamdes opened this issue Jul 9, 2018 · 5 comments
Closed

[5.0.0-dev] codemirror hints #14475

williamdes opened this issue Jul 9, 2018 · 5 comments
Assignees
Labels
Bug A problem or regression with an existing feature ui Issues relating to the user interface waiting on upstream Issues blocked by a third-party
Milestone

Comments

@williamdes
Copy link
Member

Steps to reproduce

  1. Create 1 table, min 1 column
  2. Go to "SQL" in your table
  3. Type the name of the columns after WHERE

Expected behaviour

Show type hint
https://demo.phpmyadmin.net/QA_4_8/index.php?db=world&table=City&target=tbl_sql.php&server=1
QA_4_8

Actual behaviour

Shows [object object]
https://demo.phpmyadmin.net/master-config/tbl_sql.php?db=world&table=City&server=1
5.0.0-dev

Browser

Google chrome : Version 67.0.3396.99 (Build officiel) (64 bits)

@aroralakshya
Copy link
Contributor

This also happens in the console.

@williamdes williamdes added the Bug A problem or regression with an existing feature label Sep 22, 2018
@williamdes williamdes added the ui Issues relating to the user interface label Nov 20, 2018
@williamdes williamdes self-assigned this Mar 16, 2019
@williamdes
Copy link
Member Author

Git bisect found that 393204c is the bad commit

@williamdes
Copy link
Member Author

This is the bad change

diff --git a/js/vendor/codemirror/addon/hint/sql-hint.js b/js/vendor/codemirror/addon/hint/sql-hint.js
index 9601f14e0e..e3017fb313 100644
--- a/js/vendor/codemirror/addon/hint/sql-hint.js
+++ b/js/vendor/codemirror/addon/hint/sql-hint.js
@@ -275,7 +275,7 @@
     if (search.charAt(0) == "." || search.charAt(0) == identifierQuote) {
       start = nameCompletion(cur, token, result, editor);
     } else {
-      addMatches(result, search, defaultTable, function(w) {return {text:w, className: "CodeMirror-hint-table CodeMirror-hint-default-table"};});
+      addMatches(result, search, defaultTable, function(w) {return w;});
       addMatches(result, search, tables, function(w) {return w;});
       if (!disableKeywords)
         addMatches(result, search, keywords, function(w) {return w.toUpperCase();});

@williamdes
Copy link
Member Author

@williamdes
Copy link
Member Author

Made PR codemirror/codemirror5#5819

@williamdes williamdes added the waiting on upstream Issues blocked by a third-party label Mar 19, 2019
@williamdes williamdes added this to the 5.0.0 milestone Mar 20, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature ui Issues relating to the user interface waiting on upstream Issues blocked by a third-party
Projects
None yet
Development

No branches or pull requests

2 participants