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

Display a calendar in the date modal #8

Open
ryanjamurphy opened this issue Nov 16, 2020 · 8 comments
Open

Display a calendar in the date modal #8

ryanjamurphy opened this issue Nov 16, 2020 · 8 comments

Comments

@ryanjamurphy
Copy link
Owner

Show an interactive calendar view in the date modal when Review commands are invoked, such that the user can click on a date in addition to entering a date via text.

@ryanjamurphy
Copy link
Owner Author

This might easily be accomplished by integrating with @liamcain's Calendar plugin.

@liamcain
Copy link
Contributor

liamcain commented Dec 1, 2020

It would be nice to figure out how to show Calendar in that date-picker modal, though...

Yea yea... I see this. I'm still thinking if there's any easy way to do this.

Now that the calendar has preview/TODO support/etc I think this more value too.

@tgrosinger
Copy link

@liamcain, just wanted to check if you think making the calendar embeddable is going to be possible. I have a new modal I am working on and would love to embed your calendar in it if possible.

@tgrosinger
Copy link

And if you do, being able to provide a callback for the action when a day is clicked would be extra cool!

@liamcain
Copy link
Contributor

So, I have a general plan. My thinking is it's easiest to split the view into its own npm package. The view is already pretty reusable (it just has callbacks for onclick, etc).

The svelte runtime is pretty small so I'm not too worried about the bundle size, but could be something to consider in the future.

I want to do a further refactor to provide the calendar view with an input of sources. A source could be folder (allowing for multiple daily notes folders), a collection of Holidays, Third-party calendar info, etc. I'm thinking this abstraction could make it a lot easier for other plugins to feed different display info into it. That way you could initialize a modal with a CalendarView and specify whatever you want to display.

I could probably get part 1 done relatively quickly (aka this weekend) but part 2 is a bigger overhaul. Just pointing it out so you could start thinking about it.

@tgrosinger
Copy link

This sounds perfect. I think the first part will be the bulk of what I need anyway.

I will work on other parts of the Slated UI in anticipation. Thanks!

@liamcain
Copy link
Contributor

Small update: I have a more generalized version of the calendar mostly working. Ended up being a bigger overhaul than I originally planned. But hopefully worth it!

@liamcain
Copy link
Contributor

Okay, very experimental but I now have a repo for the Calendar UI: https://github.com/liamcain/obsidian-calendar-ui. I'm still retrofitting the calendar plugin to use the more generalized approach but I'm happy with the refactor now!

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

No branches or pull requests

3 participants