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

feat(dashboards): Dashboard Widgets Open in Discover button redirects with all selected Y-Axis from the Widget #28637

Merged
merged 12 commits into from
Sep 20, 2021

Conversation

edwardgou-sentry
Copy link
Contributor

Updates the Open in Discover links in Dashboard Widgets to redirect with all Y-Axis selected from the Widget rather than using only the first Y-Axis from the Widget.

@edwardgou-sentry edwardgou-sentry requested a review from a team September 16, 2021 18:44
Copy link
Member

@wmak wmak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smol question about how we set yAxis, but regardless LGTM

@@ -38,6 +38,9 @@ class DashboardWidgetQuerySelectorModal extends React.Component<Props> {
selection,
widget.displayType
);
const discoverLocation = eventView.getResultsViewUrlTarget(organization.slug);
// Pull Y-Axis from the widget
discoverLocation.query.yAxis = query.fields;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible for query.fields to contain yAxis incompatible fields here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, I've added some checks to ensure we only use compatible fields via eventView.getYAxisOptions and also made sure to limit to 3 yAxis max as the table widget allows 3+ fields to be selected..

Base automatically changed from feat/discover-multi-y-axis to feat/discover-multi-y-axis-checkbox-dropdown September 20, 2021 16:13
Base automatically changed from feat/discover-multi-y-axis-checkbox-dropdown to master September 20, 2021 17:05
@edwardgou-sentry edwardgou-sentry merged commit 585b18e into master Sep 20, 2021
@edwardgou-sentry edwardgou-sentry deleted the feat/dnd-open-in-discover-multi-y-axis branch September 20, 2021 17:37
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants