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

Last x weeks show time range in the future #5061

Open
amir20 opened this issue Jun 11, 2024 · 6 comments
Open

Last x weeks show time range in the future #5061

amir20 opened this issue Jun 11, 2024 · 6 comments
Labels
Type:Bug Something isn't working

Comments

@amir20
Copy link

amir20 commented Jun 11, 2024

Describe the bug
When choosing last 4 weeks, the time range is partially in the future. For example, today is June 11th, but last 4 weeks is shown as May 20 - June 17th which obviously doesn't exist.

To Reproduce
Steps to reproduce the behavior:

  1. Go to time drop down for time range
  2. Choose any of the Last X period. The bigger the range the more obvious
  3. Notice that part of the range is in the future.

Expected behavior
It seems like the logic is using fixed time window instead of last trailing window.

Screenshots
Screenshot 2024-06-11 at 9 52 34 AM

Desktop (please complete the following information):

  • OS: [e.g. iOS] Mac
  • Browser [e.g. chrome, safari] Arc (Chrome based)

Additional context
I did a quick search and didn't find any other similar issues.

@amir20 amir20 added the Type:Bug Something isn't working label Jun 11, 2024
@mindspank
Copy link
Contributor

@amir20 Do you have any data points that are in the future? We calculate the end of the period as your max timestamp currently

@amir20
Copy link
Author

amir20 commented Jun 26, 2024

I don't think I do. I was curious so started switching between different dates. It is weird that the time range jumps between last day, week, 14 days and 4 weeks. I think if you said is true, then I would expect the ending time to always be consistent.

Here is a video recording to show what I mean. If you see, the end time keeps changing. Even more crazy last 6 hours is June 21st. Which is not true for today on June 26th.

Screen.Recording.2024-06-26.at.12.10.34.PM.mov

Let me know if you want me to share my dashboard.

@mindspank
Copy link
Contributor

Ah gotcha! Thanks for sharing.
Yeah... this is an area we are actively working on right now as the display is slightly confusing.
Right now our start ranges are "inclusive" and end ranges "exclusive", so Last 24h would show for example 1 Jan 00:00 - 2 Jan 00:00 which is slightly confusing. Same with the Last X Week as we snap to the end of that week (Monday 00:00).

In your case it also looks like you are running into a double whammy as you also have timezone offset from UTC which makes it even more confusing.

We are currently working on a new time range control in this PR: #4422
I verified that the 1 day / Last 24h looks correct and as you would expect in that PR, let me also check how Last X Weeks behaves.

@medriscoll
Copy link
Contributor

@amir20 As @mindspank mentioned, we're making changes to rationalize the labeling of these time ranges.

You are seeing two separate issues:

  1. Confusing labeling of time range end points: Formally most software frameworks define time ranges as semi-closed intervals [start, end) where the range is exclusive of the ending time. So a time range of "10-11am" excludes 11:00am. However, for day or above granularity, human conventions are that "June 10-11" to include June 11.

  2. Confusing labeling of time ranges with incomplete periods: Rill defines "Last 4 weeks" as a range encompassing four week starts (e.g. three Sundays ago through this coming Sunday). If the current day is Wednesday, we were labeling that range as ending on a future Sunday. (This is similar to defining "Current month" as "June 1-31" even if the current date is June 26).

These coming updates will resolve these UX irregularities you're witnessing.

@amir20
Copy link
Author

amir20 commented Jun 26, 2024

So my initial intuition on week ending with fixed periods was right.

Isn't it confusing for last 4 weeks to have time in the future? I can't imagine the user ever wanting a period that doesn't exist.

I have worked on a lot of dashboards and can't recall every having last 4 weeks show data that doesn't exist yet.

Even if the labeling was changed to Current month I would expect to only show data upto today.

@medriscoll
Copy link
Contributor

@amir20 We agree with you which is why we're updating the labeling behavior to accord with your expectations. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants