prismaliser icon indicating copy to clipboard operation
prismaliser copied to clipboard

Don't format things on top of each other

Open zygopleural opened this issue 2 years ago • 4 comments

Not looking for any smart formatting based on relationships, but defaulting to everything just being centred and on top of each other makes me sad 🥲

Love the app though, great work ❤️

Screenshot 2022-04-27 at 11 50 00

zygopleural avatar Apr 27 '22 10:04 zygopleural

Glad to hear you enjoy it!

I have been wanting a "smart spread" of sorts that spreads out the nodes based on relations, need to see if I can find any examples of it out in the wild though since I have no idea how that'd work out atm. I suppose I could add a simple fully-random spread in the interim just so it doesn't have everything stuffed on top of each other for now, better that nothing I guess 😛

Ovyerus avatar Apr 30 '22 00:04 Ovyerus

@Ovyerus first of all great work on the tool, I love it!

I've been working with Prisma for some time also on a larger project - it's great to have an option to visualise it but it's hard to do without spread of the models. I went ahead and added the spread using elkjs (by clicking the new control icon in the bottom). I've also added a few additional features for managing larger schema:

  • having large enums expandable
  • option to navigate to the relation on field name click
  • farther zoom out

It's still not a final feature (not covering all the cases and without tests etc) - I wanted first to catch up with you if that's something you'd like to include in prismaliser.

You can find the repo at https://github.com/MariannaKrzewinska/prismaliser

Let me know what you think!

MariannaKrzewinska avatar Jul 25 '22 06:07 MariannaKrzewinska

@MariannaKrzewinska yeah that all sounds great! Definitely would love to make managing large schemas easier to work with. 👍

Ovyerus avatar Jul 25 '22 10:07 Ovyerus

+1 for this. Great tool but this would make it awesome! As an example dbdiagram has an 'auto arrange' feature which does this very well. https://dbdiagram.io/

In addition to this, after rearranging the models, it would be great to 'save' the location of them

AntieJ avatar Aug 02 '22 13:08 AntieJ

Finally got the spread button pushed to production, sorry for the huge delay. Will try get position saving done as soon as I can.

Ovyerus avatar Jan 21 '23 04:01 Ovyerus