Skip to content

Comments

Plugins with externally defined options component#185

Merged
jankapunkt merged 20 commits intomainfrom
feature/wordcloud-lists
Sep 2, 2025
Merged

Plugins with externally defined options component#185
jankapunkt merged 20 commits intomainfrom
feature/wordcloud-lists

Conversation

@jankapunkt
Copy link
Member

@jankapunkt jankapunkt commented Aug 25, 2025

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).

  • plugins use external component to wrap options
  • merge updated BarChart plugin
  • resolve all Vue warnings
  • updated developer documentation

@jankapunkt jankapunkt self-assigned this Aug 25, 2025
@jankapunkt jankapunkt added this to the 1.1.0 milestone Aug 25, 2025
@jankapunkt jankapunkt linked an issue Aug 25, 2025 that may be closed by this pull request
jankapunkt and others added 9 commits August 25, 2025 16:36
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.
@jankapunkt jankapunkt marked this pull request as ready for review August 29, 2025 06:32
@jankapunkt jankapunkt added the live (staging) This is live and ready to be field-tested on our staging system label Aug 29, 2025

This comment was marked as outdated.

@jankapunkt
Copy link
Member Author

@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

@jankapunkt jankapunkt requested a review from Copilot August 29, 2025 13:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 menu component 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.

Copy link
Contributor

@kadewe kadewe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jankapunkt jankapunkt requested a review from kadewe August 29, 2025 16:03
@jankapunkt
Copy link
Member Author

@kadewe this is now refactored into BarChart

Copy link
Contributor

@kadewe kadewe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me and it works as expected

@jankapunkt jankapunkt merged commit efb68d6 into main Sep 2, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

live (staging) This is live and ready to be field-tested on our staging system plugins UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wordlist in Wordcloud

2 participants