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

Clicking on legend in native question breaks the UI #12439

Closed
dacort opened this issue May 1, 2020 · 3 comments · Fixed by #18790
Closed

Clicking on legend in native question breaks the UI #12439

dacort opened this issue May 1, 2020 · 3 comments · Fixed by #18790
Assignees
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/Native The SQL/native query editor .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects Visualization/Charts Line, area, bar, combo, and scatter charts.
Milestone

Comments

@dacort
Copy link
Contributor

dacort commented May 1, 2020

Describe the bug
A clear and concise description of what the bug is.

Logs

app-main.bundle.js?1580a7cbc7eacd7d4885:5 Uncaught (in promise) TypeError: Cannot read property 'type' of undefined
    at Function.value (app-main.bundle.js?1580a7cbc7eacd7d4885:5)
    at e.value (app-main.bundle.js?1580a7cbc7eacd7d4885:5)
    at app-main.bundle.js?1580a7cbc7eacd7d4885:5
    at i (app-main.bundle.js?1580a7cbc7eacd7d4885:5)
    at e.n.value (app-main.bundle.js?1580a7cbc7eacd7d4885:5)
    at app-main.bundle.js?1580a7cbc7eacd7d4885:5
    at vendor.bundle.js?1580a7cbc7eacd7d4885:1
    at vendor.bundle.js?1580a7cbc7eacd7d4885:1
    at vendor.bundle.js?1580a7cbc7eacd7d4885:1
    at vendor.bundle.js?1580a7cbc7eacd7d4885:1

To Reproduce
Steps to reproduce the behavior:

  1. Create a new native question
  2. Use this SQL:
SELECT "PRODUCTS__via__PRODUCT_ID"."CATEGORY" AS "CATEGORY", parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM') AS "CREATED_AT", count(*) AS "count"
FROM "PUBLIC"."ORDERS"
LEFT JOIN "PUBLIC"."PRODUCTS" "PRODUCTS__via__PRODUCT_ID" ON "PUBLIC"."ORDERS"."PRODUCT_ID" = "PRODUCTS__via__PRODUCT_ID"."ID"
GROUP BY "PRODUCTS__via__PRODUCT_ID"."CATEGORY", parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM')
ORDER BY "PRODUCTS__via__PRODUCT_ID"."CATEGORY" ASC, parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM') ASC
  1. Click "Visualization" and select "Line Chart"
  2. Click on any of the legends
  3. Note that we get the above error in the console
  4. Try to click other buttons in the UI and notice it has become unresponsive

Expected behavior
That clicking on the legend does nothing.

Screenshots
n/a

Information about your Metabase Installation:

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.7+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.7",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.7+10",
    "os.name": "Linux",
    "os.version": "4.14.171-105.231.amzn1.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "mongo",
      "mysql",
      "redshift",
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "11.6"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2020-04-28",
      "tag": "v0.35.3",
      "branch": "release-0.35.x",
      "hash": "e72d28e"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Severity
Annoying, but can workaround it by not clicking on the legend.

Additional context
n/a

@dacort dacort added Type:Bug Product defects .Needs Triage labels May 1, 2020
@flamber flamber added Priority:P2 Average run of the mill bug Querying/Native The SQL/native query editor Visualization/Charts Line, area, bar, combo, and scatter charts. and removed .Needs Triage labels May 1, 2020
@nemanjaglumac
Copy link
Member

This became even worse now because clicking on a legend results in a blank screen. I'd give it a P1, but refreshing helps so I guess P2 is appropriate.

nemanjaglumac added a commit that referenced this issue Oct 6, 2021
@nemanjaglumac nemanjaglumac added the .Reproduced Issues reproduced in test (usually Cypress) label Oct 6, 2021
@flamber flamber added .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Frontend labels Oct 10, 2021
@ranquild ranquild self-assigned this Oct 12, 2021
@ranquild
Copy link
Contributor

This became even worse now because clicking on a legend results in a blank screen. I'd give it a P1, but refreshing helps so I guess P2 is appropriate.

@nemanjaglumac How do I reproduce this? I tried both on master and release branches. When I click on a legend item, it navigates me to the query builder for that question.

@camsaul
Copy link
Member

camsaul commented Nov 1, 2021

@ranquild it looks like @nemanjaglumac added a repro for this case? Have you tried that test?

This was referenced May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/Native The SQL/native query editor .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects Visualization/Charts Line, area, bar, combo, and scatter charts.
Projects
Cypress Testing
Awaiting triage
Development

Successfully merging a pull request may close this issue.

5 participants