Skip to content

Conversation

drew08t
Copy link
Contributor

@drew08t drew08t commented Oct 15, 2025

This fixes the url syncing for time comparison during page refresh by inputting an option key (to be passed by the panel to include compareWith-[panel id]

Before:
Oct-15-2025 16-48-58

After:
Oct-15-2025 16-36-33

Fixes grafana/grafana#112274

@drew08t drew08t self-assigned this Oct 15, 2025
@drew08t drew08t added release Create a release when this pr is merged minor Increment the minor version when merged labels Oct 15, 2025
compareWith?: string;
compareOptions: Array<{ label: string; value: string }>;
hideCheckbox?: boolean;
key?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

key is already a used state property that has specific meaning/usage.

Comment on lines +166 to +167
const key = this.state.key || 'compareWith';
return { [key]: this.state.compareWith };
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this change? the UrlSyncManager and UniqueUrlKeyMapper should already handle making url keys unique for the scene, might be some bug there we can fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged release Create a release when this pr is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TimeComparison: URL sync bug

2 participants