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

"All Day" events collapse to zero width in day view with 1.0.33. #1287

Closed
RobertZenz opened this issue Dec 27, 2022 · 15 comments
Closed

"All Day" events collapse to zero width in day view with 1.0.33. #1287

RobertZenz opened this issue Dec 27, 2022 · 15 comments

Comments

@RobertZenz
Copy link
Contributor

RobertZenz commented Dec 27, 2022

"All Day" events are being displayed at the top of the day view, however with 1.0.33 they collapse to have no width, they only appear as colored bars ~4 pixel wide at the left edge with no text. They can still be selected normally, though, so the space is allocated to them and they can be edited. This does only appear to happen with single day events, if they span multiple days they are displayed normally.

1.0.30 does not show this issue, reverting back and forth between 30 and 33 reliable shows the issue. The events are sourced from a DAVx5 synchronized calendar, if that is of any interest, I'm seeing this on a phone and a tablet with Android 10.

@RobertZenz
Copy link
Contributor Author

RobertZenz commented Dec 27, 2022

Without knowing anything, 215c4d8 "Show multiday events with corrent start and end points" sounds like a good candidate.

My guess would be that

            if (endDay > lastDay) {
                endDay = lastDay;
                rightoffset = 0;
            } else {
                rightoffset =
                    ((MINUTES_PER_DAY - event.endTime) * cellWidth) / MINUTES_PER_DAY;
            }

is incorrect, as the last day matches the ending day if the "All Day" event only spans a single day and so does the view. But that's a guess.

@Gitsaibot
Copy link
Contributor

Can you send a Screenshot. Can't repoduce on my phone with Android 10. @jspricke Can you reproduce this?

@RobertZenz
Copy link
Contributor Author

RobertZenz commented Dec 27, 2022

Sure.

etar-all-day-events

BEGIN:VCALENDAR
PRODID:-//Nextcloud calendar v1.5.7
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20180108T170738Z
UID:cf1c3d2175feb9dbb742cc725b171d4f@feiertage-deutschland.de
SUMMARY:1. Weihnachtstag (§)
DTSTART;VALUE=DATE:20221225
DTEND;VALUE=DATE:20221225
LOCATION:Alle Bundesländer
DESCRIPTION:Der erste und zweite Weihnachtsfeiertag sind in ganz Deutschlan
 d gesetzliche Feiertage.
URL:http://www.feiertage-deutschland.de/weihnachten/
END:VEVENT
END:VCALENDAR

@jspricke
Copy link
Member

Can't see that on Android 9 with Etar .33 from F-Droid nor with CalyxOS 4.4.0 (Android 13).

@RobertZenz
Copy link
Contributor Author

I just noticed same happens in the week view, month view is fine, though.

Well then, could it be related to the data? Like my calendar events are somehow malformed?

@Gitsaibot
Copy link
Contributor

Somehow strange. What happens if you create a new allday event with etar?

@RobertZenz
Copy link
Contributor Author

RobertZenz commented Dec 27, 2022

Those are displaying fine.

Well, saving them ones does fix the display. So the event above before saving it with Etar

BEGIN:VCALENDAR
PRODID:-//Nextcloud calendar v1.5.7
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20180108T170738Z
UID:cf1c3d2175feb9dbb742cc725b171d4f@feiertage-deutschland.de
SUMMARY:1. Weihnachtstag (§)
DTSTART;VALUE=DATE:20221225
DTEND;VALUE=DATE:20221225
LOCATION:Alle Bundesländer
DESCRIPTION:Der erste und zweite Weihnachtsfeiertag sind in ganz Deutschlan
 d gesetzliche Feiertage.
URL:http://www.feiertage-deutschland.de/weihnachten/
END:VEVENT
END:VCALENDAR

After saving it with Etar:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:DAVx5/4.2.6-ose ical4j/3.2.5 (ws.xsoh.etar)
BEGIN:VEVENT
DTSTAMP:20221227T150816Z
UID:cf1c3d2175feb9dbb742cc725b171d4f@feiertage-deutschland.de
SEQUENCE:1
SUMMARY:1. Weihnachtstag (§)
LOCATION:Alle Bundesländer
URL:http://www.feiertage-deutschland.de/weihnachten/
DESCRIPTION:Der erste und zweite Weihnachtsfeiertag sind in ganz Deutschlan
 d gesetzliche Feiertage.
DTSTART;VALUE=DATE:20221225
DTEND;VALUE=DATE:20221226
CLASS:PUBLIC
STATUS:TENTATIVE
END:VEVENT
END:VCALENDAR

Difference is that DTEND is now +1 day...wait a minute, that does sound familiar somehow...

@RobertZenz
Copy link
Contributor Author

RobertZenz commented Dec 27, 2022

Yeah, that would be it I guess. There seems to be some confusion as to whether DTEND +1 day means two days or not, as of the spec:

 The "VEVENT" is also the calendar component used to specify an
 anniversary or daily reminder within a calendar.  These events
 have a DATE value type for the "DTSTART" property instead of the
 default value type of DATE-TIME.  If such a "VEVENT" has a "DTEND"
 property, it MUST be specified as a DATE value also.  The
 anniversary type of "VEVENT" can span more than one date (i.e.,
 "DTEND" property value is set to a calendar date after the
 "DTSTART" property value).

Anyway, the bug does also happen with events which only specify DTSTART, which is a valid case, as far as I can see:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:DAVx5/4.2.6-ose ical4j/3.2.5 (net.dinglisch.android.taskerm)
BEGIN:VEVENT
DTSTAMP:20221227T073955Z
UID:daca0bcb-aabe-470c-b48a-b77395c9b27d
SUMMARY:TEST
DTSTART;VALUE=DATE:20221227
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR

@RobertZenz
Copy link
Contributor Author

RobertZenz commented Dec 27, 2022

I still believe that the problem lays in the commit cited above:

                rightoffset =
                    ((MINUTES_PER_DAY - event.endTime) * cellWidth) / MINUTES_PER_DAY;

I'm guessing that event.endTime defaults to "00:00", which would mean it would subtract a whole day in the case if the event starts and ends on the same day (or does not have an end-date?).

@Gitsaibot
Copy link
Contributor

I still believe that the problem lays in the commit cited above

Yes definitely.

I'm guessing that event.endTime defaults to "00:00"

Probably. Maybe a check if event.endTime is greater than 0 will help. Do you have the possibility to test this?

@RobertZenz
Copy link
Contributor Author

Maybe a check if event.endTime is greater than 0 will help. Do you have the possibility to test this?

Arr, I guess so. I'll give it a try.

@RobertZenz
Copy link
Contributor Author

Maybe a check if event.endTime is greater than 0 will help.

I think the proper way would be to check whether time is available at all, as in if DTEND was specified as DATE or not, but I don't know the library you're using and if that is supported. I'll look into it when testing.

RobertZenz added a commit to RobertZenz/Etar-Calendar that referenced this issue Dec 27, 2022
RobertZenz added a commit to RobertZenz/Etar-Calendar that referenced this issue Dec 27, 2022
@RobertZenz
Copy link
Contributor Author

See #1290 for the PR.

RobertZenz added a commit to RobertZenz/Etar-Calendar that referenced this issue Dec 28, 2022
Gitsaibot pushed a commit that referenced this issue Dec 28, 2022
@RobertZenz
Copy link
Contributor Author

What's the procedure, do you keep the issues around until the release or should this one be closed?

@Gitsaibot
Copy link
Contributor

Normally the issue is closed automatically with the next release.

mebitek pushed a commit to mebitek/Etar-Calendar that referenced this issue Mar 31, 2023
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

No branches or pull requests

3 participants