Skip to content

Conversation

@jjroelofs
Copy link
Collaborator

@jjroelofs jjroelofs commented Jan 7, 2026

Linked issues

Related PRs

  • dxpr/dxpr_theme_helper#34 (backend implementation)

Solution

Add frontend UI for AI-powered font selection in theme settings. This allows users to describe desired typography and receive AI-generated font recommendations from the backend service in dxpr_theme_helper.

New files:

  • js/dist/settings-admin/theme-settings-fonts.js: Frontend handler for AI font generation

Modified files:

  • fonts-theme-settings.inc: Add AI prompt textarea and generate button
  • dxpr-theme.admin.themesettings.scss: Add .ai-font-generator styles
  • theme-settings-colors.js: Change rainbow border to show during generation (UX fix)

Features:

  • Ctrl/Cmd+Enter keyboard shortcut to submit prompt
  • Loading state with disabled button during generation
  • Rainbow border animation on font selects during generation
  • Error display for failed requests
  • Success flash on completion

Checklist

  • I have read the CONTRIBUTING.md document.
  • My commit messages follow the contributing standards and style of this project.
  • My code follows the coding standards and style of this project.
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Need to run update.php after code changes
  • Requires a change to end-user documentation.
  • Requires a change to developer documentation.
  • Requires a change to QA tests.
  • Requires a new QA test.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Jurriaan Roelofs added 4 commits January 7, 2026 11:10
Add frontend UI for AI-powered font selection in theme settings.
This allows users to describe desired typography and receive
AI-generated font recommendations.

New files:
- js/dist/settings-admin/theme-settings-fonts.js: Frontend handler
  for AI font generation including loading states and form updates

Modified files:
- fonts-theme-settings.inc: Add AI prompt textarea and generate button
  to Fonts settings vertical tab
- dxpr-theme.admin.themesettings.scss: Add .ai-font-generator styles
  matching the existing color palette generator UI

Features:
- Ctrl/Cmd+Enter keyboard shortcut to submit prompt
- Loading state with disabled button during generation
- Rainbow border animation on font selects during generation
- Error display for failed requests
- Success flash on completion
- Automatic select field updates via change event dispatch
Change rainbow border animation timing from post-generation flash
to during-generation indicator. This provides better visual feedback
that AI is working on the request.

Before: Rainbow borders appeared briefly AFTER colors were applied
After: Rainbow borders show WHILE generation is in progress

This creates a consistent UX pattern with the new AI font generator
which already shows the animation during generation.
Compiled artifacts from Docker build process:
- css/dxpr-theme.admin.themesettings.css: Compiled SCSS with
  .ai-font-generator styles
- dxpr-theme-settings-admin.js: Updated admin JS bundle
- dxpr-theme-settings-admin.bundle.min.js: Minified production bundle
Integrate font live preview feature from 8.x branch.
Resolved conflict in minified bundle by rebuilding.
@jjroelofs jjroelofs changed the base branch from 6.x to 8.x January 7, 2026 11:05
@jjroelofs jjroelofs merged commit c8422be into 8.x Jan 7, 2026
3 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