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

Open calendar notifications in the browser. #4684

Merged
merged 2 commits into from
Jan 30, 2023
Merged

Conversation

camilasan
Copy link
Member

@camilasan camilasan commented Jun 29, 2022

Addresses #519.

@nextcloud/calendar @nickvergessen

  1. subject_rich always holds extra information about the notification.... so couldn't we have the a link to the calendar in the link of the notification instead of hidden in subject_rich? Maybe I am missing something.
  2. Why for your own calendars you get 'event' and for other user's calendars you get 'event1'? Couldn't we always use 'event'?

@camilasan
Copy link
Member Author

/backport to stable-3.5

@nickvergessen
Copy link
Member

subject_rich always holds extra information about the notification.... so couldn't we have the a link to the calendar in the link of the notification instead of hidden in subject_rich? Maybe I am missing something.

That should work just fine. It is just not available on delete activities (as we can not link to the event because it was deleted)
https://github.com/nextcloud/server/blob/master/apps/dav/lib/CalDAV/Activity/Backend.php#L484-L487

Why for your own calendars you get 'event' and for other user's calendars you get 'event1'? Couldn't we always use 'event'?

We always "use" event. What you are observing comes from the event merging, e.g. if a user creates two events, there will be only 1 activity entry saying "X created event A and B"

But the mechanism is incremental and when you only modified the same entry twice, you get "X updated event A" with A being event1 instead of event.
https://github.com/nextcloud/server/blob/master/lib/private/Activity/EventMerger.php#L203

But you should never assume the placeholder name. Instead you can loop over the parameters and then you check the type of the parameters to be calendar-event

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #4684 (8ffaf34) into master (8ffaf34) will not change coverage.
The diff coverage is n/a.

❗ Current head 8ffaf34 differs from pull request most recent head 664288d. Consider uploading reports for the commit 664288d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4684   +/-   ##
=======================================
  Coverage   57.99%   57.99%           
=======================================
  Files         139      139           
  Lines       17728    17728           
=======================================
  Hits        10282    10282           
  Misses       7446     7446           

Copy link
Collaborator

@mgallien mgallien left a comment

Choose a reason for hiding this comment

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

if I understand correctly in case of merged events you will get a link to the second one ?

src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
@camilasan
Copy link
Member Author

if I understand correctly in case of merged events you will get a link to the second one ?

Yes, that is what I understood too.

@sonarcloud
Copy link

sonarcloud bot commented Jul 11, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

76.9% 76.9% Coverage
0.0% 0.0% Duplication

src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
@allexzander
Copy link
Contributor

@camilasan I've added some nitpicks

Copy link
Collaborator

@claucambra claucambra left a comment

Choose a reason for hiding this comment

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

No additional comments from me, just agree with Alex's comments :)

@sonarcloud
Copy link

sonarcloud bot commented Sep 23, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

78.6% 78.6% Coverage
0.0% 0.0% Duplication

@camilasan camilasan force-pushed the bugfix/issue-519 branch 4 times, most recently from 9456b78 to 606123f Compare November 2, 2022 18:20
@mgallien mgallien self-requested a review November 8, 2022 08:51
src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
test/testactivitydata.cpp Outdated Show resolved Hide resolved
@camilasan camilasan force-pushed the bugfix/issue-519 branch 2 times, most recently from 7898f0f to 30e8a83 Compare November 15, 2022 19:42
@sonarcloud
Copy link

sonarcloud bot commented Nov 15, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

86.7% 86.7% Coverage
0.0% 0.0% Duplication

Copy link
Collaborator

@claucambra claucambra left a comment

Choose a reason for hiding this comment

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

One small comment, otherwise looks good :)

src/gui/tray/activitydata.cpp Outdated Show resolved Hide resolved
@camilasan
Copy link
Member Author

/rebase

@camilasan
Copy link
Member Author

/rebase

Copy link
Collaborator

@claucambra claucambra left a comment

Choose a reason for hiding this comment

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

I think this is mergeable, but I have a tiny comment :)

src/gui/tray/activitydata.cpp Show resolved Hide resolved
@camilasan
Copy link
Member Author

/rebase

Camila added 2 commits January 27, 2023 12:30
Signed-off-by: Camila <hello@camila.codes>
Signed-off-by: Camila <hello@camila.codes>
@sonarcloud
Copy link

sonarcloud bot commented Jan 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

86.7% 86.7% Coverage
0.0% 0.0% Duplication

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-4684-b4882ae5c7d2caf5f52f04f231a3f38501472aa7-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

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.

6 participants