Plugins with externally defined options component#185
Conversation
This visualization shows the code counts grouped for each source. Nice! It was quite complicated to create the data object for plotly. I think it would be better to create a kind for R-like DATAFRAME in the API, so that all visualization plugins can use this, because otherwise you really have to make sure that you don't introduce errors.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…into feature/wordcloud-lists
Co-authored-by: Copilot <[email protected]>
|
@kadewe @alessandrobelli @hohse this is now complete and copilot issues are fixed, please do a final fix on the staging server and let me know if anything is still bothering or approve if you think we are ready to merge this |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the plugin architecture to enable visualization plugins to define options without being responsible for rendering the UI container. The host system now provides a SideOverlay component that plugins can use to display their options.
- Plugins now receive a
menucomponent prop and show/hide state from the host system - Plugin options are rendered in a consistent sidebar overlay managed by the host
- The visualization API has been extended to support menu controls
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| web/resources/js/Pages/analysis/visualization/useVisualizerPlugins.js | Added state management for menu visibility and options detection |
| web/resources/js/Pages/analysis/visualization/VisualizeCoding.vue | Removed old AutoForm rendering, injected SideOverlay component into plugins |
| web/resources/js/Pages/AnalysisPage.vue | Added Options button and menu control functionality |
| web/resources/js/Components/layout/SideOverlay.vue | Enhanced overlay component with better props validation and styling |
| web/plugins/visualization/src/portrait/CodePortrait.vue | Migrated to use external menu component with comprehensive options |
| web/plugins/visualization/src/list/ListView.vue | Updated to use external menu component |
| web/plugins/visualization/src/groupedBar/GroupedBarChart.vue | New comprehensive bar chart plugin with extensive customization options |
| web/plugins/visualization/src/cloud/WordCloudView.vue | Migrated to use external menu component with enhanced word filtering |
| web/plugins/visualization/src/bar/BarChart.vue | Removed old bar chart implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
kadewe
left a comment
There was a problem hiding this comment.
i already commented this - i think we should go with BarChart for the new component (so we rename the new GroupedBarChart to BarChart, because i think that the new BarChart plugin does it all: grouped and not grouped. see my comments in the last PR review
|
@kadewe this is now refactored into |
kadewe
left a comment
There was a problem hiding this comment.
looks good to me and it works as expected
A big struggle was to have plugins define options but without defining the component to display them (sidebar in this case).
This PR now injects the Sidebar as component prop into the visualization plugins and allows them to render their options without caring about where they will be displayed (as this is the job of the host system).