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

Handle caldav color for calendars #899

Merged

Conversation

bertrandda
Copy link
Contributor

@bertrandda bertrandda commented Oct 17, 2020

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front)
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.json) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

To synchronize color of the calendar inside CalDAV service.
julienL post: https://community.gladysassistant.com/t/calendrier-module-caldav/4598/58

image

Tested with Nexctloud, iCloud, Google Calendar

@bertrandda bertrandda changed the title Handle caldav color for calendars [WIP] Handle caldav color for calendars Oct 17, 2020
@codecov
Copy link

codecov bot commented Oct 18, 2020

Codecov Report

Merging #899 (ca62279) into master (e467c86) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #899   +/-   ##
=======================================
  Coverage   94.65%   94.65%           
=======================================
  Files         494      494           
  Lines        6552     6552           
=======================================
  Hits         6202     6202           
  Misses        350      350           
Impacted Files Coverage Δ
server/models/calendar.js 100.00% <ø> (ø)
server/seeders/20190403081927-calendar.js 100.00% <ø> (ø)
...services/caldav/lib/calendar/calendar.formaters.js 90.62% <ø> (ø)
.../services/caldav/lib/calendar/calendar.requests.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e467c86...ca62279. Read the comment docs.

@bertrandda bertrandda changed the title [WIP] Handle caldav color for calendars Handle caldav color for calendars Oct 18, 2020
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

When starting the frontend locally with a DB with existing event, I got the following crash in the UI:

Uncaught (in promise) TypeError: Cannot read property 'substring' of null
    at isBright (color.js?d8c9:2)
    at Map._this.eventPropGetter (index.js?3b01:39)
    at Object.eventProp (react-big-calendar.esm.js?496b:4411)
    at EventCell.render (react-big-calendar.esm.js?496b:268)
    at N (preact.js?10a9:1)
    at eval (preact.js?10a9:1)
    at k (preact.js?10a9:1)
    at g (preact.js?10a9:1)
    at T (preact.js?10a9:1)
    at N (preact.js?10a9:1)

@VonOx VonOx added the Feature label Dec 4, 2020
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

Thanks for your PR, it works fine!

@Pierre-Gilles Pierre-Gilles merged commit 65f501f into GladysAssistant:master Dec 4, 2020
@bertrandda bertrandda deleted the feature/caldav-calendar-color branch November 23, 2021 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants