language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Relation information tooltip

Open janpio opened this issue 3 years ago • 2 comments

Right now we do not do anything special about relations besides making the models clickable.

We could display all the information we have about it (type [1:1, 1:n, m:n], target, all the info from @relation) in a tooltip that would help identify relations and their properties.

Soph & Serhii: maybe display complete referenced model on hover as well?

Internal discussion: https://prisma-company.slack.com/archives/C02FNFLDUS3/p1655748050883529

janpio avatar Jun 21 '22 07:06 janpio

Right now we do not do anything special about relations besides making the models clickable.

@janpio Can you elaborate on this ? Looking at the first example here https://www.prisma.io/docs/concepts/components/prisma-schema/relations even in VS Code, I don't see anything that indicates that the Post relation in User model is "clickable". Did you refere to like the Goto Definition or something ?

UltraInstinct05 avatar Jun 26 '22 06:06 UltraInstinct05

In VSCode you can Ctrl/Cmd+Click on the relation names to go to the definition of that model. (You can also use F12 or Right click -> Go to definition to achieve the same.)

janpio avatar Jun 26 '22 21:06 janpio