-
Notifications
You must be signed in to change notification settings - Fork 27
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
SceneTimeRange: onTimeZoneChange and onTimeRangeChange to set #389
Conversation
Thanks @tskarhed . This sounds like a good plan! Mind adding docs as well for what you've just learned about setting time range externally? Think adding it to https://grafana.com/developers/scenes/advanced-data#use-time-range would make sense. |
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.
would this not break the guideline we have for react callback handlers to begin with onXX ? to match when we hook them up like this.
I do agree that this naming does make it feel like something you should maybe not call manually (outside a react callback handler).
Do we have any other onXX interface/ scene object methods in scenes (want to make sure we do not add some inconsistency here). I think MultiValueVariable has changeValueTo (so not using onXX).
Not seeing and change to stop using the deprecated versions here
const from = toUtc(1696405657); | ||
const to = toUtc(1696405687); |
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.
Use dateTime
when it is an epoch
Hmm, I see your point. Would it make sense for these two to just exist in parallel, just for the sake of good naming? You would use Maybe that would add complexity when implementing the interface though. |
@torkelo @tskarhed I don't think having two makes sense. API is one thing, the callback is another. For the |
@dprokop yea, agree. |
This step will help a little bit, but I think I want to make another PR to change these to
setTimeZone
andsetTimeRange
.Here is my suggestion for doing so, please give me your thoughts:
setTimeZone
andsetTimeRange
.Then it is possible to do a gradual change. Thoughts?