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

feat(caldav): Add calendar timezone picker #4935

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Jan 30, 2023

https://www.rfc-editor.org/rfc/rfc4791#section-5.2.2

Description: The CALDAV:calendar-timezone property is used to
specify the time zone the server should rely on to resolve "date"
values and "date with local time" values (i.e., floating time) to
"date with UTC time" values. The server will require this
information to determine if a calendar component scheduled with
"date" values or "date with local time" values overlaps a CALDAV:
time-range specified in a CALDAV:calendar-query REPORT. The
server will also require this information to compute the proper
FREEBUSY time period as "date with UTC time" in the VFREEBUSY
component returned in a response to a CALDAV:free-busy-query
REPORT request that takes into account calendar components
scheduled with "date" values or "date with local time" values. In
the absence of this property, the server MAY rely on the time zone
of their choice.

Ref #4778 (comment)

Todo

  • Make it work
  • Make it pretty

Bildschirmfoto vom 2023-01-30 20-13-27

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst added 2. developing Work in progress enhancement New feature request feature: caldav labels Jan 30, 2023
@ChristophWurst ChristophWurst self-assigned this Jan 30, 2023
@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Base: 22.25% // Head: 22.15% // Decreases project coverage by -0.10% ⚠️

Coverage data is based on head (c96dfe9) compared to base (2692d49).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4935      +/-   ##
============================================
- Coverage     22.25%   22.15%   -0.10%     
  Complexity      334      334              
============================================
  Files           227      227              
  Lines         10789    10837      +48     
  Branches       2045     2054       +9     
============================================
  Hits           2401     2401              
- Misses         8388     8436      +48     
Flag Coverage Δ
javascript 14.15% <0.00%> (-0.08%) ⬇️
php 64.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/components/AppNavigation/EditCalendarModal.vue 0.00% <0.00%> (ø)
src/store/calendars.js 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

const jCal = ICAL.parse(this.calendar.timezone)
const iCalComp = new ICAL.Component(jCal)
const tzComp = TimezoneComponent.fromICALJs(iCalComp)
this.calendarTimezone = tzComp.getFirstComponent('VTIMEZONE').getFirstProperty('TZID').value
Copy link
Member

Choose a reason for hiding this comment

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

question (non-blocking): Do we need to validate the value? Maybe use calendar-js' TimezoneManager.hasTimezoneForId() before assigning it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature request feature: caldav
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants