[Feature] Add default propConfig and Tooltip to a custom component?

Is it possible to add in default propConfigs for a perspective component?
Ive made a module and every instance of it requires some bindings (and custom props) with a value and runs a project script.
Is it be possible to add in propsConfig as default? Its easy enough to add in default props but i dont think i can add bindings there? the structure seems quite equal enough in the resource files.

im guessing something like the resource files for props.json, events.json is there also one for propconfig and custom? Im guessing there could be, and how would i bind this to the component?
for props i use com.inductiveautomation.ignition.common.jsonschema.JsonSchema;
for events com.inductiveautomation.ignition.common.gson.JsonObject;

am i missing something in the ComponentDescriptor?
setDefaultProps?
PropertySetConfig?

It doesn’t look like this is currently directly possible; everything is set up with the assumption that the config is locked (from the designer) before any view (and thus component) actually gets created.
You could maybe work around it by registering a custom com.inductiveautomation.perspective.designer.api.ComponentDesignDelegate; see com.inductiveautomation.perspective.designer.DesignerHook#getComponentDesignDelegateRegistry. You might be able to do something in one of the panel creation methods there, but it’s a bit of a hack.

1 Like

Uhh i can see this might work however, the javadocs are … lacking xd
Is there a way for me to view the java files themselves? im doing an import so it has to come from somewhere. I can find the folder easily enough for the persective js in the nodemodules. But where are they for the java files? Where is this map/package “com.inductiveautomation.perspective” located? Im probably missing something simple xd

Ah nvm found them in C:\Users\victor.gradle\caches\modules-2\files-2.1\com.inductiveautomation.perspective

uhh its so hard working around all the private and protected fields xd i had no idea i cant even acces private fields when i inhert a class… never payed to much attention to those private/protected fields in school xD
ill probably have to copy everything and adjust it like that instead of trying to mix with the original packages… sigh maybing adding in a few bindings everytime isnt that much work afterall xD

or use an exteral script… editing json is so much easier xd

Maybe you can add this functionallity together with a default tooltip one?