-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
WIP: Calendar / Timeline app and service #790
base: main
Are you sure you want to change the base?
Conversation
To continue our conversation, I would propose that we think of how to patch what is currently #353 into accepting calendar events. I would wait for it to be finalized first though. It's not technically difficult, but we would have to move a few things around and figure out what is a "calendar event". What data is needed, what can be optional? What might people use, if we make it possible? |
Fine by me
Here are a few thoughts... Bare minimumThe bare minimum to display and sync a calendar consists of :
iCalendar formatWe can look at existing standards. I think the obvious one is iCalendar as it is probably the most popular and will probably work with a lot of calendar apps. So we can either support all of iCalendar fields or a subset. At least, if we use the same names and format when possible, it will probably reduce the friction with companion apps. A big advantage to using iCalendar is that it paves the way for the other types. I am sure users will want InfiniTime to handle todos at some time... iCalendar events can be really big. If we decide to follow that path, we will probably need to specify some limitations. I do not think a user expects its watch to have its memory filled by a calendar description.
Watch-generated eventsShould the companion app be able to extract/display watch-generated events in its calendar? Multiple calendarsSupport for multiple calendars? I use different calendars to separate contexts, I think it would be useful to be able to display events in different colors. |
Now that this part is done (tested with the Gadgetbridge fork and it works), let's focus on the core : a generic timeline manager for all event types and all apps on the watch. @Avamander I dived deeper in your code now in order to merge what we have in common a code a first draft of generic timeline. I have a few questions to clarify my understanding, if you have the time.
|
Yes, but that assumes that an event is valid from the start of it being pushed to the watch. It might be that an event is valid only for an hour tomorrow. For example currently it's something like
It has to follow some kind of reasonable precision. E.g. weather is not the same for a week, or for a second.
Say we have two a) Then the most recent one
This actually might be more complex, because you might not wish to clean up an event from the timeline the moment it ends. So
Yes. That is on the current roadmap. To have wipe and deletion.
That is very difficult. I would just caution companions to wipe things they can't replace. |
It is now possible to test this feature using my fork of InfiniSim. Just run : git clone --recursive -b timeline_integration https://github.com/Zorvalt/InfiniSim.git |
@Avamander Thank you for the feedback
I agree with your argument but I am not convinced it represents a significant part of the possible event types. I think that "most of the time"(TM),
Ok so I'll move that in the generic timeline code
It sounded less complicated in my mind but reading it again now, I agree with you. |
I guess this could be written down. "Field |
@Zorvalt Friendly bump 🙏 |
Hi @devnoname120, I will have some time this summer. It is probably as frustrating for me as it is for you. I initially developed this because I need it on my watch so I promise I want this to be merged. I just lack the time :-/ As the feature has been "functional" for about two years now, I hope this year is the one. I will at least rebase it on develop and we'll see if I have enough time to get the generic timeline to work. I plan to start working on this in July. To anyone reading this. I am still not the best designer in the world (see the picture above, haha). Any suggestion, even a quick drawing on the corner of a piece of paper is welcomed :-) |
@Zorvalt I want to implement something like MeetingBar but for InfiniTime in a watchface: I'll probably use your calendar service as a base. |
@devnoname120 The idea is to integrate events inside a more generic "timeline" based on what @Avamander did for the weather app. That's the reason it's taking so long to be merged. So I think you will need to read events from there, in the end. Your idea is good and I would greatly appreciate such a feature. More incentives for me to work on this PR ;-) There already are a few helpers such as GetTodayMaxTemp(). Your use-case is great as it allows to think about how applications should access timeline objects. I think we can boil it down to two possiblities : either add another helper (maybe |
@Zorvalt Thank you for your thoughtful reply. I think I'll go for the easiest solution at first: iterate through How many events should I expect It's likely that it would be OK though as I would only need to reiterate when the calendar is updated. Otherwise I can just update the current countdown from the current event entry and current time. Once the timeline is ready, I could switch to it to make the code more intuitive & improve performances (assuming your timeline data structure is sorted by start or end datetime). What would you think of splitting up this PR so as to only add the Calendar service in the first PR? |
In theory the function already exists in Weather, it just expects to filter weather-related timeline item types. I haven't had a need to test it very throughly though. But it would work.
I'd say 5 events is sufficient, more can be synced on-demand later on, RAM is really quite tight already.
Can't be assumed with Weather and it's intentional. Iterating is quite fast with so few elements and demands vary immensely (do I want what's to come, what is or what was?).
This would work. |
@Avamander Any updates on this? 🙏 |
This PR is a proof-of-concept for a calendar/timeline app and its service. It will be split in smaller PRs when the maturity of the PR allows it.
Current state (based on InfiniTime 0.14.1) :
Although there is a working base, the direction is not fixed. Do not hesitate to suggest fundamental changes or start brainstorms :-)
More information on the fork wiki : https://github.com/Zorvalt/InfiniTime/wiki/Calendar-and-timeline:-first-ideas-and-implementation