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

Qalendar fixes #587

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Qalendar fixes #587

merged 3 commits into from
Sep 16, 2024

Conversation

devmount
Copy link
Collaborator

Description of the Change

  • List of pending events on the calendar page now only shows future pending events (which reduces the list to a reasonable length, but let me know if this not wanted)
  • First day of week is now locale aware (Monday for German, Sunday for English). In a future iteration this should be a user setting keeping these as defaults.
  • I tried to fix Week view is squished to the top #544 and spent quite some time debugging Qalendar for this. It turns out, that it's an issue with computed / reactive properties and Qalendar not updating their UI accordingly.

Benefits

Consistent height of events after a change of the day boundary.

Applicable Issues

#544

@devmount devmount self-assigned this Jul 30, 2024
@devmount devmount marked this pull request as draft July 30, 2024 07:30
Copy link
Collaborator Author

@devmount devmount left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelissaAutumn I found the cause for the squished / streched calendar week / day views, but still no solution, since it's kind of a Qalendar issue imo.

Comment on lines -315 to +338
dayBoundaries: dayBoundary,
dayBoundaries: {
start: dayBoundary.value.start,
end: dayBoundary.value.end
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the point of initializing this config object, dayBoundary.value holds the default values 0, 24 making Qalendar span the container element over that range. Updating the boundary later in the watcher causes Qalendar to recalculate the displayed time rows, but it doesn't update the row height.

Comment on lines +347 to 366
// TODO: This does update the boundary values, but does NOT update the container height!
qalendarRef.value.time.DAY_START = dayBoundary.value.start * 100;
qalendarRef.value.time.DAY_END = dayBoundary.value.end * 100;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any ideas how to trigger a UI rerender of Qalendar at this point?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to adjust our fork, and then pull in our fork. But I'm not sure 🤔

@@ -361,7 +363,6 @@ watch(route, () => {
</script>
<template>
<div
class="w-full"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also set on the parent. Removing the duplicated class here.

Copy link
Member

@MelissaAutumn MelissaAutumn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased and will be merging this in to get the locale aware day of week. Thanks!

@MelissaAutumn MelissaAutumn marked this pull request as ready for review September 16, 2024 16:39
@MelissaAutumn MelissaAutumn merged commit 439ece1 into main Sep 16, 2024
4 checks passed
@MelissaAutumn MelissaAutumn deleted the bugs/544-qalendar-fixes branch September 16, 2024 16:40
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.

Week view is squished to the top
2 participants