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

[core] Make time selection more intuitive #181

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

ricoberger
Copy link
Member

@ricoberger ricoberger commented Oct 15, 2021

Sometimes the shown time from the Options component in a toolbar was not
very meaningful. Especially when a user opened a shared URL, were the
user select a last x minutes interval, we showed this text, instead of
the correct time range, also when the last x minutes referred to an very
old time.

Now we are always showing the formatted timestamp, so that this problem
can not occure anymore. It is still possible to refresh a time range, so
that the current time is used as end time with the formaly selected diff
between the start and end time.

If you are using the options component in one of your plugins, you have
to adjust the passed in values, so that your plugin works with the next
release of kobs.

NOTE: Maybe we can also remove some duplicated code for the toolbar and
the state handling via the URL in the future.

Fixes #178.

Sometimes the shown time from the Options component in a toolbar was not
very meaningful. Especially when a user opened a shared URL, were the
user select a last x minutes interval, we showed this text, instead of
the correct time range, also when the last x minutes referred to an very
old time.

Now we are always showing the formatted timestamp, so that this problem
can not occure anymore. It is still possible to refresh a time range, so
that the current time is used as end time with the formaly selected diff
between the start and end time.

If you are using the options component in one of your plugins, you have
to adjust the passed in values, so that your plugin works with the next
release of kobs.

NOTE: Maybe we can also remove some duplicated code for the toolbar and
the state handling via the URL in the future.
@ricoberger ricoberger merged commit ec1ad9f into main Oct 15, 2021
@ricoberger ricoberger deleted the make-time-selection-intuitive branch October 15, 2021 19:22
ricoberger added a commit that referenced this pull request Dec 9, 2021
This commit changes the options handling again. In #181 we removed the
time parameter and since then we always showed the absolute time in the
options button. It turned out that this was very unintuitive for users,
so that we re-add the "time" property and show the relative time (e.g.
when a user selects "Last 15 Minutes").

We replaced the Options component with a Toolbar component, so that we
only display one button to trigger the search. Before this we displayed
a refresh button and a search button, which confused users. They didn't
exactly know when to use which button. Now with only one button
displayed we use a similar approach like Grafana, Kibana, etc. that the
time is always refreshed when the time is relative and the user clicks
on the search button.

We also use the current url only to get the initial options for a
component. When the user changes the options, we adjust the url and
directly adjust the options state, instead of using the adjust url to
set the new options.
@ricoberger ricoberger mentioned this pull request Dec 9, 2021
3 tasks
ricoberger added a commit that referenced this pull request Dec 9, 2021
This commit changes the options handling again. In #181 we removed the
time parameter and since then we always showed the absolute time in the
options button. It turned out that this was very unintuitive for users,
so that we re-add the "time" property and show the relative time (e.g.
when a user selects "Last 15 Minutes").

We replaced the Options component with a Toolbar component, so that we
only display one button to trigger the search. Before this we displayed
a refresh button and a search button, which confused users. They didn't
exactly know when to use which button. Now with only one button
displayed we use a similar approach like Grafana, Kibana, etc. that the
time is always refreshed when the time is relative and the user clicks
on the search button.

We also use the current url only to get the initial options for a
component. When the user changes the options, we adjust the url and
directly adjust the options state, instead of using the adjust url to
set the new options.
ricoberger added a commit that referenced this pull request Dec 9, 2021
This commit changes the options handling again. In #181 we removed the
time parameter and since then we always showed the absolute time in the
options button. It turned out that this was very unintuitive for users,
so that we re-add the "time" property and show the relative time (e.g.
when a user selects "Last 15 Minutes").

We replaced the Options component with a Toolbar component, so that we
only display one button to trigger the search. Before this we displayed
a refresh button and a search button, which confused users. They didn't
exactly know when to use which button. Now with only one button
displayed we use a similar approach like Grafana, Kibana, etc. that the
time is always refreshed when the time is relative and the user clicks
on the search button.

We also use the current url only to get the initial options for a
component. When the user changes the options, we adjust the url and
directly adjust the options state, instead of using the adjust url to
set the new options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Time range selection is not intuitive
1 participant