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: Set file reminders #39685

Merged
merged 36 commits into from
Aug 9, 2023
Merged

feat: Set file reminders #39685

merged 36 commits into from
Aug 9, 2023

Conversation

Pytal
Copy link
Member

@Pytal Pytal commented Aug 3, 2023

Summary

  • Register action
  • Set reminder
  • Clear reminder
  • Service for OCS API
  • DateTime utils

TODO

  • Fix tests
  • Adjust "Later today"

Screenshots

Screenshot
File action image
Set reminder image
Notification image

Checklist

@Pytal Pytal added this to the Nextcloud 28 milestone Aug 3, 2023
@Pytal Pytal self-assigned this Aug 3, 2023
@Pytal Pytal changed the title feat: File reminders frontend feat: Set file reminders Aug 3, 2023
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

Looks good, just a minor indention issue. And maybe use icon components instead of wrapped svgs (otherwiese on every mount sanitizeSVG is executed).

Base automatically changed from feat/files-reminders to master August 3, 2023 23:38
@Pytal Pytal mentioned this pull request Aug 3, 2023
3 tasks
@Pytal Pytal force-pushed the feat/integrate-files-reminders branch 2 times, most recently from 9d8a2eb to 1340464 Compare August 4, 2023 01:01
@Pytal Pytal marked this pull request as ready for review August 4, 2023 01:03
@Pytal Pytal force-pushed the feat/integrate-files-reminders branch from 1340464 to f65ef72 Compare August 4, 2023 17:32
@Pytal Pytal requested review from nfebe and skjnldsv August 4, 2023 18:24
@Pytal Pytal force-pushed the feat/integrate-files-reminders branch from 8de5468 to 3825051 Compare August 4, 2023 22:05
@skjnldsv
Copy link
Member

skjnldsv commented Aug 5, 2023

/backport to stable27

Copy link
Contributor

@nfebe nfebe left a comment

Choose a reason for hiding this comment

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

Looks good!

@Pytal Pytal force-pushed the feat/integrate-files-reminders branch from 3825051 to ac8b662 Compare August 8, 2023 23:08
Pytal added 22 commits August 9, 2023 10:41
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
@Pytal Pytal force-pushed the feat/integrate-files-reminders branch from ac8b662 to 1d2ec6b Compare August 9, 2023 18:27
@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 9, 2023
@Pytal Pytal merged commit 7c7a3be into master Aug 9, 2023
37 checks passed
@Pytal Pytal deleted the feat/integrate-files-reminders branch August 9, 2023 19:16
@backportbot-nextcloud
Copy link

The backport to stable27 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable27
git pull origin stable27

# Create the new backport branch
git checkout -b fix/foo-stable27

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

return OC.imagePath('files_reminders', 'alarm.svg')
},
permissions: OC.PERMISSION_READ,
actionHandler: function(_filename, _context) {},
Copy link
Member

Choose a reason for hiding this comment

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

Hey @Pytal, why is there no action handler here?

Copy link
Member

@skjnldsv skjnldsv Aug 23, 2023

Choose a reason for hiding this comment

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

Ah, I get it now, why not registering the action from apps/files_reminders/src/main.ts ? ^^
OCA.Files.App.fileList.fileActions.registerAction()

Copy link
Member Author

Choose a reason for hiding this comment

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

🤯 never saw that usage

Though since we're going f2v would be best to let legacy be legacy 🙈

Copy link
Member

@skjnldsv skjnldsv Aug 23, 2023

Choose a reason for hiding this comment

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

This is legacy :)

the f2v way is: https://nextcloud-libraries.github.io/nextcloud-files/functions/registerFileAction.html

import { registerFileAction } from `@nextcloud/files`
registerFileAction({...})

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, by f2v I meant when we implement this action with the future nested actions API not the implementation added in this PR ;)

Copy link
Member

Choose a reason for hiding this comment

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

AH yes! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish backport-request enhancement feature: files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants