Skip to content

Renderer resolution order #348

Open
Open
@altavir

Description

@altavir

Consider the following situation: two jupyter integration have a renderer for the same type and are imported to the classpath. Currently, there are no wats to find, which one will be used. Obviously, the situation is not far-fetched. There could be different renderers for commonly used classes like a Map.

In VisionForge I am solving a similar problem by assigning a rating number and then selecting a renderer with the highest rating:

https://github.com/mipt-npm/visionforge/blob/3caa22f8bf0bad62ea9d2b123e4f60a1b89eeaf1/visionforge-core/src/jsMain/kotlin/space/kscience/visionforge/elementOutput.kt#L15

Libraries could declare renderers with higher than default rating allowing developers to declare that one renderer is better than the default one. There could be other solutions as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions