typedb / typedb-studio

TypeDB Studio (IDE)
https://typedb.com
Mozilla Public License 2.0
198 stars 44 forks source link

Ability to hide inherited roles #273

Open BFergerson opened 4 years ago

BFergerson commented 4 years ago

Problem to Solve

It would be nice to disable showing the inherited roles when in the ontology editor mode.

Current Workaround

None

Proposed Solution

Add option to disable showing inherited roles when in the ontology editor mode.

Additional Information

Given the schema:

define
address sub entity,
    has address_street,
    plays is_address;
work_address sub address;
home_address sub address;
person sub entity,
    has name,
    plays has_address;
addressable sub relation,
    relates has_address,
    relates is_address;
address_street sub attribute, datatype string;
name sub attribute, datatype string;

This produces the following model: addressable_b

It would be nice to have the ability to display: addressable_b_edited

elliotsayes commented 4 years ago

In agreement with @BFergerson that this can be quite ugly when viewing some ontologies. The problem I have with @BFergerson 's solution however, is that it declutters by hiding information. Perhaps instead of (or even alongside) the option to hide inherited roles, there should be an option to instead show exceptions to natural role inheritance.

This would mean that in cases such as @BFergerson 's, it would still generate the visuals he specified. However, in cases where natural role inheritance is violated (e.g. if home_address for whatever reason was explicitly defined to not have the role is_address), instead of hiding this fact, it could display the exception to the rule explicitly in the generated visual.

Example of what I mean. This could definitely be done better but still illustrates the point: image

alexjpwalker commented 3 years ago

Thanks for the report. It sounds like this is a feature that should be settable via an IDE preference.

jamesreprise commented 2 years ago

See also: