Skip to content

[5.0.0-dev] codemirror hints #14475

Closed
Closed

Description

@williamdes

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)

Activity

  1. aroralakshya commented on Jul 10, 2018

    @aroralakshya
    Contributor

    This also happens in the console.

  2. added
    Bug
    on Sep 22, 2018
  3. added
    UI
    on Nov 20, 2018
  4. self-assigned this
    on Mar 16, 2019
  5. williamdes commented on Mar 17, 2019

    @williamdes
    MemberAuthor

    Git bisect found that 393204c is the bad commit

  6. williamdes commented on Mar 19, 2019

    @williamdes
    MemberAuthor

    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();});
  7. williamdes commented on Mar 19, 2019

    @williamdes
    MemberAuthor
  8. williamdes commented on Mar 19, 2019

    @williamdes
    MemberAuthor
  9. added
    waiting on upstream
    on Mar 19, 2019
  10. added a commit that references this issue on Mar 20, 2019
    39c32d2
  11. added this to the 5.0.0 milestone on Mar 20, 2019
  12. locked as resolved and limited conversation to collaborators on Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugUIwaiting on upstream

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions