YukiGasai / obsidian-google-calendar

Add Google Calendar inside Obsidian
https://yukigasai.github.io/obsidian-google-calendar/
GNU General Public License v3.0
359 stars 25 forks source link

Drag and Drop events on the week view to change their time #179

Closed m-beau closed 1 year ago

m-beau commented 1 year ago

Self-explanatory feature - would be dope!

YukiGasai commented 1 year ago

I added a simple drag option. Please test it yourself.

m-beau commented 1 year ago

Thanks, that was quick!

Bug report: if you try to drag and drop an event on a different day than today, it will indeed set the time to where you dropped it but it will set the day to today, making the event jump across columns.

Enhancement suggestion 1 (related to the bug above i.e. setting the day properly): it would be great to also be able to dray the event across days, not only within a day (typical use case - I didn't get that done today, I need to report to tomorrow haha).

Suggestion 2: making the event snap to every 15 minutes (t=0, t=15, t=30...) rather than continuously across the day.

Suggestion 3: making it possible to drag the bottom of the event to only set the end time.

Here's a google calendar gif demonstrating the above: gif

YukiGasai commented 1 year ago

All the views the plugin adds are mainly to display info and where not supposed to be interactive. I added your desired features, but it is quite janky. Example: The 15-minute restriction will only take effect after the event has been updated and the view is re-rendered. Please test it yourself. If you have any improvements, a pull request is always welcome.

m-beau commented 1 year ago

That's already great! Thanks a lot, much appreciated.

I guess a last related request would be the ability to double-click anywhere on the week-view to trigger the event creation pop-up (same as the pop-up when hitting the "+" button) but pre-filled with start/end times matching the hour closest to the click-point (1h-long)?

YukiGasai commented 1 year ago

Double click to create events should work now.

m-beau commented 1 year ago

It seems like the plugin fails to install when trying to update it!

YukiGasai commented 1 year ago

My bad, I uploaded the wrong tag. Please try again.

m-beau commented 1 year ago

All good great work!