Skip to content

Allowing other plugins to extend views? #123

@gakada

Description

@gakada

To give some context, there is KC3Kai/KC3Kai#2709, which is mainly a submitter for fit tests, but it also has some UI. While submitter is being added via poi-plugin-tsundb, I'm wondering if it can be possible to let that (or any other) plugin to extend views of the main program or prophet plugin (probably extending prophet is more suitable in this case, since fit tests, sorties and prophet plugin are all related).

For example, a working solution for this case is simply adding something like

window.prophetShipViewTooltipExtra && window.prophetShipViewTooltipExtra(data)

in https://github.com/poooi/plugin-prophet/blob/master/views/ship-view.es#L158, allowing other plugins to define (or extend) that function (of type data -> list of React elements).

E.g.

u

Maybe there is more idiomatic way of doing this.

Another example is poooi/poi#1839 in its initial form, that is, allowing plugins to add more info in ship tooltips, such as info based on experience FCD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions