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

Added support for setting and changing reminder due date and time #80

Conversation

andylin2004
Copy link
Contributor

A previous issue discussed about adding the intelligent date and time setter like in the reminders app (see #17). This is a partial solution to that issue where users can change and set reminder due date and time manually (either below the textfield or via a popover that will apply changes once the user clicks out of the popover). English localization has also been applied for this.

@andylin2004 andylin2004 marked this pull request as ready for review October 8, 2022 20:23
Copy link
Contributor

@zydeico zydeico left a comment

Choose a reason for hiding this comment

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

LGTM but, delete changes in the .pbxproj file

reminders-menu-bar.xcodeproj/project.pbxproj Outdated Show resolved Hide resolved
Copy link
Contributor

@zydeico zydeico left a comment

Choose a reason for hiding this comment

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

LGTM

@DamascenoRafael
Copy link
Owner

Thanks for your contribution @andylin2004!
I know you've done a previous PR related to this, sorry I didn't look at this sooner, time is almost always short.

My macbook stopped turning on after an update, so I won't be able to show what I was doing and test your changes now.
But as soon as I fix it I'll look into it.

Two small observations:

  • Can you revert changes to Package.resolved? This file refers to a dependency needed by another feature.
  • Can you install SwiftLint? After installing when building the project it will display warnings regarding code style. We don't need to solve all warnings, some can be ignored, but in general the idea is to try to follow some styles.

@andylin2004
Copy link
Contributor Author

Thanks for your contribution @andylin2004! I know you've done a previous PR related to this, sorry I didn't look at this sooner, time is almost always short.

My macbook stopped turning on after an update, so I won't be able to show what I was doing and test your changes now. But as soon as I fix it I'll look into it.

Two small observations:

  • Can you revert changes to Package.resolved? This file refers to a dependency needed by another feature.
  • Can you install SwiftLint? After installing when building the project it will display warnings regarding code style. We don't need to solve all warnings, some can be ignored, but in general the idea is to try to follow some styles.

I have installed SwiftLint and adjusted my code to conform to the proper code style. Package.resolved isn't being tracked, so I think Xcode is autogenerating that.

@DamascenoRafael
Copy link
Owner

Hi, @andylin2004. I finally got my mac back.

The Package.resolved file is tracked, but you deleted it in your branch.
You can run the git command below to restore the master file to your branch:

git checkout origin/master reminders-menu-bar.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

I was working on an edit popover (similar to the one in Apple Reminders) allowing to edit the reminder's title, notes, date/time and priority.

Screenshot 2022-10-29 at 15 38 10

My idea is to combine this work (from the image above) with the possibility you created to add date/time when creating a reminder (image below). Sound good to you?

image

If it's ok I will merge your branch into a separate branch to combine these works and release this feature soon.

@andylin2004
Copy link
Contributor Author

andylin2004 commented Oct 29, 2022

Sounds good! The initial version of this type of PR had that, but I thought that was problematic because multiple popovers would then be needed.

@DamascenoRafael DamascenoRafael changed the base branch from master to feature-due-date October 30, 2022 02:59
@DamascenoRafael DamascenoRafael merged commit 36f0a88 into DamascenoRafael:feature-due-date Oct 30, 2022
@DamascenoRafael
Copy link
Owner

@andylin2004 can you please explain to me the advantage of using the LegacyReminderTitleTextFieldView instead of the default TextField in macOS versions below 12.0 (before macOS Monterey)?

@andylin2004
Copy link
Contributor Author

The default textfield on macOS 11 will automatically create a reminder with the text in the textbook as the reminder name when the cursor clicks on the add date button (which is what we don't want to do, because people will probably adjust the due date multiple times).

LegacyReminderTitleTextFieldView basically fixes this issue by expecting an enter key to be hit before the contents of the textbook is used to create a reminder

@DamascenoRafael
Copy link
Owner

Great! Thanks for the clarification. Didn't know about these behaviors on Big Sur.

DamascenoRafael added a commit that referenced this pull request Dec 3, 2022
* Add support for setting and changing reminder due date and time (#80)

* Add popover for reminder editing

* Simplify createNew method in ReminderService

* Adjustments to create a reminder based on RmbReminder

* Remove unused variable in LegacyReminderTextFieldView

* Improve behavior of remind me in date/time options

* Configure dueDateComponents and alarms properties in EKReminder

* Using custom DatePicker (NSViewRepresentable)

* Fix conversion to DateComponents for reminders

* Change RmbDatePicker to customize font through modifier

* Fix updating reminder's due date

* Renaming some views in FormNewReminderView

* Keeping the calendars menu and the plus icon at the top of the form

* Using withAnimation and removing previous animation

* Changing preview of FormNewReminderView

* Changing RemindDateOptionView appearance in FormNewReminderView

* Resetting reminder when text field is empty

* Creating single view to replace RemindDate and ReminderTime optionView

* Fix wrong argument type

* Adding missing translations for due date editing

* Minor changes and code organization

* Add missing translations for Brazilian Portuguese

* Updating TODO for translation

Co-authored-by: Andy Lin <60021592+andylin2004@users.noreply.github.com>
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.

3 participants