linkedin / linkedin/Tachyon

EventTimeRanges shorter than 15min are drawn at the end of the Dayview

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
58
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I found the issue in `DayView.java::setEventRects()`:

```
int filteredStartMinute = Math.max(startMinute, timeRange.startMinute);
int duration = Math.min(endMinute, timeRange.endMinute) - filteredStartMinute;
if (duration < MIN_DURATION_MINUTES) {
duration = MIN_DURATION_MINUTES;
filteredStartMinute = endMinute - duration;
}
```
`MIN_DURATION_MINUTES` is 15min and `endMinute` is 11:59pm, so if duration is ever less than the minimum, it is drawn as a `DirectionalRect` from 11:44pm - 11:59pm.

I may be misinterpreting the intention here, but I suspect that filteredStartMinute should be reassigned relative to the `timeRange.endMinute`, not `this.endMinute`. IE:

```
if (duration < MIN_DURATION_MINUTES) {
duration = MIN_DURATION_MINUTES;
filteredStartMinute = timeRange.endMinute - duration;
}
```

Contributor guide

Open the contributing guide

Research direction

Start in DayView.java at setEventRects() and read how filteredStartMinute and duration are calculated for short EventTimeRanges. Verify the behavior for ranges shorter than MIN_DURATION_MINUTES, including one near the end of the day. Done means short ranges are positioned relative to their own timeRange rather than being drawn at the end of the Dayview.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.