Skip to content

Label empty font options as “Default” in Classic chart settings#1303

Closed
Copilot wants to merge 2 commits intodevelopmentfrom
copilot/add-default-font-value
Closed

Label empty font options as “Default” in Classic chart settings#1303
Copilot wants to merge 2 commits intodevelopmentfrom
copilot/add-default-font-value

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 2, 2026

Font family/size dropdowns in the Classic chart settings currently expose a selectable empty option with no label. This updates those empty options to display “Default” while preserving the existing empty value behavior.

  • Scope

    • Classic editor only (no Gutenberg changes).
    • Applies to both chart libraries where this UI appears.
  • UI changes

    • Replaced blank placeholder options (<option></option>) with localized Default labels (<option value="">Default</option>) in:
      • Google charts general font family/size settings
      • ChartJS general font family/size settings
      • ChartJS legend labels font family/size settings
      • ChartJS linear axis font family/size settings (X/Y)
  • Coverage update

    • Added a focused E2E assertion in tests/e2e/specs/admin.spec.js to verify fontName and fontSize first options render as Default in Classic settings.
echo '<select name="fontName" class="control-select">';
echo '<option value="">', esc_html__( 'Default', 'visualizer' ), '</option>';

Screenshot reference from issue report:
https://github.com/Codeinwp/visualizer/assets/86592992/34ea21e2-5e7c-487a-aade-9c08bad69047

Agent-Logs-Url: https://github.com/Codeinwp/visualizer/sessions/430cefd8-53f0-427b-9bfb-ed1692347b7e

Co-authored-by: HardeepAsrani <2649903+HardeepAsrani@users.noreply.github.com>
Copilot AI changed the title [WIP] Add default value for font settings Label empty font options as “Default” in Classic chart settings Apr 2, 2026
Copilot AI requested a review from HardeepAsrani April 2, 2026 14:05
@HardeepAsrani HardeepAsrani marked this pull request as ready for review April 2, 2026 14:09
@HardeepAsrani
Copy link
Copy Markdown
Member

This was only for testing, so closing it.

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.

Add a Default value for font settings

2 participants