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

Tooltip for Information that is not rendered because we have an opinionation in place

Open do4gr opened this issue 4 years ago • 1 comments

In several spots we decided to not render information into the datamodel if it matches some internal opinionation. This is done to keep the datamodel simple and not pollute it with too much information for beginners. In these cases it would be nice to have a hover tooltip that spells out the suppressed information.

Example: Native types.

model Test{
    int   Int       @db.Integer
    text String @db.VarChar(1337)
}

We would not render the @db.Integer because that's our default type for that scalartype. The native type on the text field would be rendered though since it deviates from the default.

There are similar mechanics for index names I think.

Also m2m relations are an opinionation which could explain how they're implemented.

do4gr avatar Jan 28 '21 19:01 do4gr

I'm sure if we ask around a bit we can find more cases where this would be helpful.

do4gr avatar Jan 28 '21 19:01 do4gr