Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Component Definition Expanded #1093

Open
skhademcis opened this issue Feb 28, 2024 · 5 comments
Open

Feature request: Component Definition Expanded #1093

skhademcis opened this issue Feb 28, 2024 · 5 comments
Assignees
Labels
design-phase Design phase enhancement New feature or request

Comments

@skhademcis
Copy link

skhademcis commented Feb 28, 2024

Description

I want to have the ability to reuse REACT components from other JS projects, can the components be extended so that they can import npm modules from third party apps (perhaps via OS dependencies? https://splunk.github.io/addonfactory-ucc-generator/advanced/os-dependent_libraries/ )

From what I understand this is already possible in some capacity, if so please turn this request into a documentation update, with a detailed example of how to include third party npm packages and how to reference react component parameter throughout the framework (ex. using a hook to obtain information that could be fed into a component)

@skhademcis skhademcis added the enhancement New feature or request label Feb 28, 2024
@skhademcis
Copy link
Author

Please let me know if you need any clarification on this, the goal is to figure out how we can best use "components" in the UCC framework. Are the components wrappers around html elements and certain splunk objects (panels etc), or can they be used to render react components that would make integration with other products easier.

@vtsvetkov-splunk
Copy link
Contributor

@skhademcis
Thank you for bringing this to our attention. You're correct; our documentation currently does not include instructions for usage with custom React components. We acknowledge this gap and are actively working to update our documentation to address this

@vtsvetkov-splunk
Copy link
Contributor

We have documented the current state of extension with React components.
TL;DR: UCC does not support it, but there is a way to use it, and some addons implemented this way.
https://splunk.github.io/addonfactory-ucc-generator/custom_ui_extensions/overview/#react-component-extension

@skhademcis
Copy link
Author

skhademcis commented Mar 6, 2024

Thanks for the update, if we were to contribute/fork the framework, where would need to declare the new components?

I see the core react components here
https://github.com/splunk/addonfactory-ucc-generator/tree/develop/ui/src/components

And some declarations here as well
https://github.com/splunk/addonfactory-ucc-generator/blob/develop/splunk_add_on_ucc_framework/schema/schema.json

@artemrys
Copy link
Member

We started the design phase for a better support for custom UI components, we will share more details once the design is complete.

Meanwhile, we have open sourced an "Example TA" where you can find one of the ways to support custom UI for UCC-based TAs - https://github.com/splunk/splunk-example-ta.

@artemrys artemrys added the design-phase Design phase label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-phase Design phase enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants