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

(Feature request) Multiple calendar roots for day notes #2959

Closed
eliandoran opened this issue Jul 3, 2022 · 2 comments
Closed

(Feature request) Multiple calendar roots for day notes #2959

eliandoran opened this issue Jul 3, 2022 · 2 comments

Comments

@eliandoran
Copy link
Collaborator

eliandoran commented Jul 3, 2022

Describe feature

I am currently using Trilium Notes for both personal and professional purposes. In order to better separate the two, I have split the notes into multiple workspaces and this has been working out great for a few months now.

The only improvement I could see in my process at the moment is to find a way to have the "day notes” functionality ("Today" button, “Calendar” button) in both workspaces. Currently the daily notes are only in the Personal workspace, but they would be more than useful in the Work workspace as well. From what I saw in the implementation, this feature looks for #calendarRoot which does not take into consideration workspaces.

It makes sense that the calendar root has to be unique, as it is also specified in the documentation, but I believe it is a very good use case to add support for multiple calendar roots in order to accommodate the user's personal and work environments.

I would attempt to implement such a solution, as it would greatly benefit me and I would gladly share with you, however I would have two main questions:

  • Would this feature be of any interest to you? I am interested if it aligns with the future development plans of the application.
  • What would be the best approach in this case? I will provide two different options below.

Possible solutions

  • Implement workspace-aware date notes
    • Currently (from what I understand), the notes are obtained by looking for the calendarRoot label or directly for the day's attribute (dateNote).
    • Allowing one #calendarRoot per workspace would involve changing both the client and the server (ETAPI) to optionally pass the user's current workspace. In doing so, we can limit the search for the calendarRoot or dateNote by the workspace.
    • Having a unique calendar root per workspace makes the most sense in the current context and it would be less complex.
    • It would require little changes to the existing infrastructure, calendarRoot and dateNote attributes would remain. Same with the getTodayNote() implementation.
  • Allow unlimited calendar roots
    • This would be tougher to implement and perhaps it would not bring as much value as the previous solution, although it would be much more flexible since it would allow the user to define as many calendar roots as they would like.
    • I believe this can be implemented by allowing different labels like #calendarRoot, such as workCalendarRoot, personalCalendarRoot. The switching between them would be achieved by adding new, optional parameters which allow changing the desired root label. This would also involve the day note searches to be done under the root element, so it might introduce some additional complexity.

Thank you for your time, @zadam .

Additional Information

No response

@zadam
Copy link
Owner

zadam commented Jul 3, 2022

Hi, you're right that this would fit into the concept of workspaces, and several other features are already implemented like this. My main reason to hesitate with "workspace-scoped" features is that I don't know how much would these be used and if they are bringing net benefit. Even though on the implementation side it's not very complicated, it does become somewhat complex on the product side, needing to explain all this in the documentation.

There are also some corner cases, e.g. web clipper sends notes to the calendar, but there's no way to choose to which one. Adding support for that would increase implementation work and web clipper complexity. Another possibility is to keep the limitation that webclipper (and Trilium Sender) can send only to the "primary" calendar.

Having said that, I'm not against the idea.

@zadam zadam closed this as completed in 3ebfaec Jul 31, 2022
@eliandoran
Copy link
Collaborator Author

Hello, @zadam .

I've just checked the beta version with this feature implemented. It works great, I have already started to move my notes into the dedicated work calendar root.

Thank you for your time and taking the initiative to implement it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants