mnfst / manifest

Effortless backends ✨
https://manifest.build
MIT License
576 stars 36 forks source link

On the documentation, add StackBlitz example buttons for `Relations` #177

Open SebConejo opened 6 days ago

SebConejo commented 6 days ago

The aim is to give developers direct access to a demo on stackblitz showing how relations works in a real use case.

Docs on relations: https://manifest.build/docs/relations

Just below this code, We could provide the button. So the developer could see the result. :

😃 User:
properties:
  - name

😺 Cat:
  properties:
    - name
  belongsTo:
    - User

Then, other stackblitz buttons can bring the user directly to the front-end that loads relations and filters them. Capture d’écran 2024-09-24 à 11 04 39

For the frontend, don't pull it with too much style code. Use a neutral library like shadcn/ui toolkit without applying extra css code.

uchiha-vivek commented 6 days ago

@SebConejo Sir i got the issue , My understanding : we need to create the button which would show the long syntax(which include params) for the short syntax provided above , Sir please correct me if i am wrong.

SebConejo commented 5 days ago

Hi @uchiha-vivek,

I was thinking more of making a demo that immediately shows the 2 ways of making a relationship (the short way AND the long way). For example, with a use case that has 2 relations, we'd show the 1st relationship with the short one, and the second with the long one. And we'd add a comment explaining that the 2 ways of doing things work and give the same result.

uchiha-vivek commented 5 days ago

@SebConejo Thank you sir for clarity.