Render Components Only If Available#57
Conversation
…gable-components-in-fe
…gable-components-in-fe
There was a problem hiding this comment.
@tahierhussain LGTM overall.
However, I still see references to plugin functionalities in FE code. Take eval metrics for example - sortEvalMetricsByType function, evalMetrics variable, etc are still present outside of plugins.
Can we move all such references across all plugins to the plugins folder itself?
|
@tahierhussain Can you also please confirm if the build process succeeded with and without plugins, under Notes on Testing? |
Done, @hari-kuriakose |
…ack/unstract into feature/pluggable-components-in-fe
@hari-kuriakose I have made further changes and moved the logic/functions to the plugins folder. However, in some cases, it won't be easy to avoid references to |
@tahierhussain Yes, the aim is to move all "defnition" references inside the plugin, leaving only "usage" references at max in the OSS code. This seems to be mostly achieved now, which is good enough. |
hari-kuriakose
left a comment
There was a problem hiding this comment.
@tahierhussain LGTM overall.
* Render component only when available * Handle the usage of plugin components in the FE * Updated .gitignore * Minor fix * Moved the eval related functions to the plugins folder --------- Co-authored-by: Hari John Kuriakose <hari@zipstack.com>
* Render component only when available * Handle the usage of plugin components in the FE * Updated .gitignore * Minor fix * Moved the eval related functions to the plugins folder --------- Co-authored-by: Hari John Kuriakose <hari@zipstack.com>
What
Some of the components may or may not be available in the FE repo. For such cases, we need to gracefully handle it in the UI if the components are not available.
...
Why
We need to handle the UI if the components are not available.
...
How
Using try-catch to import the component or ignore (if not available).
...
Relevant Docs
NA
Related Issues or PRs
https://github.com/Zipstack/unstract-cloud/pull/5
Dependencies Versions / Env Variables
NA
Notes on Testing
Tested it by building the FE with and without the plugins folder. Below are the screenshots for both the cases (Please check the URLs as a proof of the builds),
1. FE without the plugins folder:

2. FE with the plugins folder:

...
Screenshots
Please refer Notes on Testing for screenshots.
...
Checklist
I have read and understood the Contribution Guidelines.