-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Remove Getting Started Guide related code from frontend #15209
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I left two small comments.
I'm not sure Fields you can group this metric by section is relevant now
Good question, but I think it's still used.
For some reason, when running Cypress tests, the page appears in `cannot read property fields of undefined` However it works correctly when running Metabase locally Checking for undefined `fields` explicitly fixes the problem Anyway, most likely this component is going to be removed in metabase#15209
Co-authored-by: Paul Rosenzweig <paulrosenzweig@users.noreply.github.com>
Co-authored-by: Paul Rosenzweig <paulrosenzweig@users.noreply.github.com>
The failing test is failing correctly (that UI shouldn't appear on EE). The issue is that it's running at all. I think that's another quirk with our CI setup with external contributors. This should be good to merge. I'll ask a Github admin to merge it with the failing tests. Nice work! |
* Add cypress tests for reference/metrics/:id page * Add metrics/:metricId/edit route * Use router location for metric's isEditing state Data Reference keeps `isEditing` state flag in Redux store (it's shared across metrics, segments and DB references) Metrics page now uses router's path name to distinguish reading and editing states * Use non-Redux callbacks at MetricDetailContainer * Add missing prop type definition * Fix editing callbacks not passed to MetricDetail * Fix signInAsAdmin test utility usage * Reorder imports * Use cy.findByText instead of cy.contains * Fix Metrics data reference test For some reason, when running Cypress tests, the page appears in `cannot read property fields of undefined` However it works correctly when running Metabase locally Checking for undefined `fields` explicitly fixes the problem Anyway, most likely this component is going to be removed in #15209 * Fix metrics test Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Fixes #15127
Fixes #15130
Problem
Looks like the frontend tries to interact with a removed feature on the Data Reference page (
/reference
)Both issues this PR addresses are related to Metric's
important_fields
property. As I see from the backend's source code, it was used for the Getting Started Guide feature. And it looks like it has been removed in Metabase 0.30.Also, at #15127 the issue happens because the frontend tries to access a property of the undefined
guide
object. It has to be retrieved from the backend viaGET /api/getting_started
request, but the backend route has been removed a few years ago.Solution
If my understanding of the problem is correct, we can just remove the frontend code related to Getting Started Guide and
important_fields
. This PR does exactly that. Also, it removes a few fields from the Metric's reference form that were related toimportant_fields
(like at #15130). The screenshots below demonstrate an updated page lookBy the way, I'm not sure Fields you can group this metric by section is relevant now. Please help me find out