Skip to content

fix theme/template hide feature + more embed data table info, ref #290577#172

Merged
avoinea merged 4 commits into
masterfrom
develop
Sep 15, 2025
Merged

fix theme/template hide feature + more embed data table info, ref #290577#172
avoinea merged 4 commits into
masterfrom
develop

Conversation

@razvanMiu
Copy link
Copy Markdown
Contributor

No description provided.

@razvanMiu razvanMiu requested a review from avoinea September 15, 2025 07:44
@avoinea
Copy link
Copy Markdown
Member

avoinea commented Sep 15, 2025

@greptile

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR implements two key improvements to the volto-plotlycharts add-on. First, it enhances the embed data table functionality by transforming the previously hidden EmbedData component into a comprehensive, visible data presentation. The component now displays structured chart information including page titles, chart titles/subtitles, axis labels, and metadata in a user-friendly format. A new stripHtml utility function was added to safely extract text content from HTML strings for clean data table display. Second, it fixes the theme/template hide feature by properly handling the 'hidden' property throughout the widget lifecycle - ensuring that when templates are edited and saved, their visibility state is preserved correctly by excluding the 'hidden' property from visualization data while maintaining it at the template level for UI state management.

These changes integrate well with the existing Volto framework architecture, following established patterns for widget state management and component composition. The improvements enhance both accessibility (making chart data visible to screen readers) and user experience (better data presentation and reliable hide/show functionality). The version has been appropriately bumped to 13.0.10 following semantic versioning conventions for bug fixes.

Important Files Changed

Changed Files
Filename Score Overview
package.json 5/5 Standard patch version bump from 13.0.9 to 13.0.10 for bug fix release
CHANGELOG.md 5/5 Added version 13.0.10 entry documenting embed data table improvements and theme/template hide feature fixes
src/PlotlyComponent/PlotlyComponent.jsx 4/5 Enhanced EmbedData component with visible structured data presentation and added stripHtml utility function
src/Widgets/ThemesWidget.jsx 4/5 Added comprehensive hide/show functionality for themes with proper state management and UI controls
src/Widgets/TemplatesWidget.jsx 5/5 Fixed template hide feature by properly preserving 'hidden' property during template save operations

Confidence score: 4/5

  • This PR is safe to merge with low risk as it primarily addresses UI improvements and fixes existing functionality
  • Score reflects solid implementation of accessibility improvements and proper state management, though the PlotlyComponent changes are substantial
  • Pay close attention to src/PlotlyComponent/PlotlyComponent.jsx for the significant EmbedData component restructuring

Sequence Diagram

sequenceDiagram
    participant User
    participant TemplateWidget
    participant ThemeWidget
    participant PopupMenu
    participant StateManager
    participant UI

    User->>TemplateWidget: "Click context menu (...) on template"
    TemplateWidget->>PopupMenu: "Show popup with Hide/Show option"
    User->>PopupMenu: "Click Hide/Show menu item"
    PopupMenu->>TemplateWidget: "Call onHide() or onShow()"
    TemplateWidget->>StateManager: "Update template.hidden property via onChange()"
    StateManager->>TemplateWidget: "Return updated value array"
    TemplateWidget->>UI: "Re-render with hidden class applied"

    User->>ThemeWidget: "Click context menu (...) on theme"
    ThemeWidget->>PopupMenu: "Show popup with Hide/Show option"
    User->>PopupMenu: "Click Hide/Show menu item"
    PopupMenu->>ThemeWidget: "Call onHide() or onShow()"
    ThemeWidget->>StateManager: "Update theme.hidden property via onChange()"
    StateManager->>ThemeWidget: "Return updated value array"
    ThemeWidget->>UI: "Re-render with hidden class applied"

    User->>TemplateWidget: "View embed data table"
    TemplateWidget->>PlotlyComponent: "Request embed data preparation"
    PlotlyComponent->>PlotlyComponent: "Call prepareEmbedData() with metadata"
    PlotlyComponent->>UI: "Render enhanced data table with metadata sections"
Loading

5 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@avoinea
Copy link
Copy Markdown
Member

avoinea commented Sep 15, 2025

The changes look safe to merge. Here's what Claude found:

Safe changes:

  • Version bump to 13.0.10 in package.json
  • Changelog updates documenting new features
  • Enhancement to embed data table with chart titles, subtitles, and axis labels
  • Addition of hide/show functionality for themes and templates
  • New stripHtml utility function to clean HTML from text
  • Data attributes added for chart identification

No breaking changes detected:

  • All changes are additive features
  • No removal of existing functionality
  • No changes to public APIs
  • Code follows existing patterns and conventions

The changes implement legitimate feature enhancements (better embed data display and theme/template visibility controls) and appear to be well-tested based on the
commit history. Safe to merge.

@avoinea avoinea merged commit a94b756 into master Sep 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants