anyproto / anytype-ts

Official Anytype client for MacOS, Linux, and Windows
https://anytype.io
Other
3.63k stars 215 forks source link

Notion-like 'Formulas' (code snippets?) #642

Open Hydrafig opened 3 months ago

Hydrafig commented 3 months ago

Have you read a contributing guide?

Clear and concise description of the problem

One of the main reasons that people use Notion (atleast in my experience) is the addition of 'formulas', as they call it, which allow you to do calculations with your various properties and such, giving you a much better insight into your data. This is what drew me to Notion at first, but Anytype is a much better, open-source solution.

I am most certainly not fluent in code, but I think this would be a great addition to Anytype. Notion Formulas are most certainly the 'killer app' and it's probably why a lot of people use it. For more boring usecases, you can use it to perhaps track your finances (credit to Thomas Frank). For something that already exists and is advertised within Anytype, a powerful habit tracker would be a more general use-case. Imagine this habit tracker: (credits to whoever took this screenshot at Anytype!)

2024 03 30 - 15 15 07 49

- but you could add a graph at the top showing your progress that dynamically updates as you check each box, or track your quality of sleep across the week or month and get an average of how it was. Seriously, possibilities are endless here.

Suggested solution

To accomplish this, Anytype could provide an integration with either an already-existing programming language or create their own for usage with the app. Now, I understand that allowing users to run unsigned code is probably a VERY bad idea, hence why you could make your own 'language' of sorts (like Notion did) which integrates nicely with your collections and notes and such.

These could be in the form of relations that give data e.g. with a habit tracker, you could add a relation that gets a boolean of tasks you've done (0/false if it's unchecked or not done, 1/true if it's checked or done) and tell you how many tasks you've completed out of the total amount of tasks there is.

Alternative

Theoretically, you could just... do it manually. You could make your own graphs or do your own calculations and add them into your notes.

Additional context

This article from the Notion team gives the basics on how their Formulas work.

joezimjs commented 2 weeks ago

YES! I was coming here to add this same feature request.