Skip to content

Conversation

Copy link

Copilot AI commented Dec 31, 2025

YASQE Button Redesign

This PR modernizes the YASQE editor buttons with improved visual hierarchy, Font Awesome icons, and keyboard shortcuts displayed in tooltips.

Changes Made

  • 1. Research Font Awesome icon SVGs for missing icons (fa-save, fa-left-align)
  • 2. Add missing SVG icons to imgs.ts
    • Added save icon (Font Awesome fa-save/floppy-disk)
    • Updated format icon to Font Awesome fa-align-left
  • 3. Update button order in index.ts (Run query, Share, Save, Format, Full screen)
  • 4. Make Run query button include text "Run query" + play icon
  • 5. Add keyboard shortcut hints to button tooltips:
    • Run query: Ctrl+Enter
    • Share: (no keyboard shortcut)
    • Save: Ctrl+S
    • Format: Shift+Ctrl+F
    • Fullscreen: F11
  • 6. Update button styles in buttons.scss for modern look
    • Modern blue button style for Run query with hover effects
    • Consistent icon button styling with hover states
    • Improved visual hierarchy
    • Fixed button alignment and consistent sizing (36px height for all buttons)
    • Fixed icon overlap in Run query button - reduced icon size and adjusted spacing
    • Fixed fullscreen icon appearing smaller - increased from 24px to 26px
  • 7. Add F11 keyboard binding for fullscreen toggle
  • 8. Test changes in dev environment
  • 9. Build and validate
  • 10. Take screenshots of UI changes
  • 11. Add aria-hidden attributes to decorative icons for accessibility
    • Added to Run query button icons (play, warning, loading)
    • Added to Share icon
    • Added to Save icon
    • Added to Fullscreen icons (expand, compress)

Visual Changes

Final Button Design with All Fixes:

YASQE Buttons - Final Fix

The buttons now display correctly with:

  1. Run query - Blue button with proper text/icon spacing (91px × 36px, Ctrl+Enter)
    • Icon reduced to 14px to prevent overlap
    • Gap reduced to 6px for better fit
    • Padding adjusted to 7px 12px
  2. Share - Icon button (36px × 36px, 24px icon)
  3. Save - Icon button with floppy disk (36px × 36px, 24px icon, Ctrl+S)
  4. Format - Icon button with align-left (36px × 36px, 24px icon, Shift+Ctrl+F)
  5. Fullscreen - Icon button with properly sized icon (36px × 36px, 26px icon, F11)

Technical Details

Final Button Fixes:

  • Run query button: Reduced icon from 18px to 14px, gap from 8px to 6px, and adjusted padding to prevent text/icon overlap
  • Fullscreen icon: Increased from 24px to 26px to match visual size of other icons (compensates for different viewBox scaling)
  • All icon buttons maintain consistent 36px × 36px dimensions
  • Proper spacing with no overlaps
  • All icons now visually balanced and aligned

Accessibility Improvements:

  • Added aria-hidden="true" to all decorative icon elements
  • Icons are purely visual and button meaning is conveyed through button text and aria-label attributes
  • Prevents screen readers from announcing redundant icon information

Other Improvements:

  • All icons use Font Awesome SVG paths for consistency
  • Button tooltips display keyboard shortcuts
  • Modern CSS styling with smooth transitions and hover effects
  • F11 keyboard shortcut added for fullscreen functionality
Original prompt

This section details on the original issue you should resolve

<issue_title>Redesign yasqe buttons</issue_title>
<issue_description>The 'execute', 'share', 'fullscreen', ... should be redesigned/modernised. All icons should also have a keyboard binding and that should be shown in the hover tooltip.

Since we are not depending on font-awesome or another icon supplier, but define the icons as svg in our own stylesheets, I would copy the svg defintion of the font-awesome I mention besides the function below. Also change the position of the buttons as follows:

  • Run query / fa-play (make this a button that includes the text 'Run query' and the icon)
  • Share / fa-share
  • Save / fa-save
  • Format / fa-left-align
  • Full screen / fa-expand</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Copilot AI changed the title [WIP] Redesign and modernize yasqe buttons Redesign YASQE buttons with modern styling and keyboard shortcuts in tooltips Dec 31, 2025
Copilot AI requested a review from MathiasVDA December 31, 2025 23:17
@MathiasVDA
Copy link
Collaborator

@copilot the icons are not well aligned and of the same size. The run query text overlaps with the play icon

Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 1, 2026

@copilot the icons are not well aligned and of the same size. The run query text overlaps with the play icon

Fixed the button alignment and sizing issues. All icon buttons are now consistently 36px × 36px, and the Run query button text no longer overlaps with the play icon. Changes in commit 1d357e5.

Fixed Button Alignment

@MathiasVDA
Copy link
Collaborator

@copilot the "Run query" text still overlaps with the play icon and the fullscreenicon looks much smaller than the other icons. Is there a padding applied?

Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 1, 2026

@copilot the "Run query" text still overlaps with the play icon and the fullscreenicon looks much smaller than the other icons. Is there a padding applied?

Fixed both issues in commit 5988a2a:

  • Reduced Run query icon from 18px to 14px and adjusted spacing to eliminate text overlap
  • Increased fullscreen icon from 24px to 26px to match the visual size of other icons

Fixed Buttons

@MathiasVDA MathiasVDA marked this pull request as ready for review January 1, 2026 21:05
@MathiasVDA MathiasVDA requested a review from Copilot January 1, 2026 21:06
Copy link

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 modernizes the YASQE editor buttons with improved visual hierarchy, Font Awesome 7.1.0 icons, and keyboard shortcuts displayed in tooltips. The redesign replaces custom SVG icon handling with Font Awesome icon fonts, implements a prominent "Run query" button with text and icon, and adds consistent button styling across the interface.

Key changes:

  • Migration from custom SVG icons to Font Awesome 7.1.0 icon fonts
  • Redesigned "Run query" button with blue background, text label, and dynamic icon states (play/warning/loading)
  • Added keyboard shortcut hints to all button tooltips (Ctrl+Enter, Ctrl+S, Shift+Ctrl+F, F11)
  • Implemented F11 keyboard binding for fullscreen toggle
  • Removed deprecated utility functions drawSvgStringAsElement and drawFontAwesomeIconAsSvg

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
packages/yasqe/src/index.ts Replaced SVG icon rendering with Font Awesome <i> elements; added save button with event emission; reordered buttons; added F11 fullscreen support
packages/yasqe/src/scss/buttons.scss Modernized button styling with consistent 36px height, blue Run query button, icon-only buttons with hover states
packages/yasqe/src/defaults.ts Added F11 keyboard binding for fullscreen toggle
packages/yasqe/src/imgs.ts Removed file - custom SVG icons no longer needed
packages/yasqe/src/scss/yasqe.scss Imported Font Awesome CSS; removed SVG-specific styles
packages/yasr/src/index.ts Replaced SVG icons with Font Awesome icons in download, fullscreen, and documentation buttons
packages/yasr/src/main.scss Imported Font Awesome CSS; updated icon styling from SVG to font icons
packages/yasr/src/imgs.ts Removed file - custom SVG icons no longer needed
packages/yasr/src/plugins/response/index.ts Updated download button icon to Font Awesome
packages/yasr/src/plugins/response/index.scss Updated download button icon styling
packages/yasr/src/plugins/boolean/index.ts Replaced check/cross SVG icons with Font Awesome icons
packages/yasr/src/plugins/boolean/index.scss Updated boolean result icon styling
packages/yasr/package.json Updated @fortawesome/free-solid-svg-icons from ^5.14.0 to ^7.1.0
packages/yasgui/src/index.scss Imported Font Awesome CSS at root level
packages/yasgui/src/Tab.ts Removed duplicate save button creation code; added updateSaveButtonVisibility() method; updated icons to Font Awesome
packages/yasgui/src/TabElements.ts Replaced inline SVG icons with Font Awesome for query browser toggle
packages/yasgui/src/TabElements.scss Updated button icon styling
packages/yasgui/src/tab.scss Updated tab button icon styling for Font Awesome
packages/yasgui/src/TabSettingsModal.ts Replaced inline SVG icons with Font Awesome for settings, prefix insert, and theme toggle buttons
packages/yasgui/src/TabSettingsModal.scss Removed SVG-specific sizing
packages/yasgui/src/queryManagement/QueryBrowser.ts Replaced inline SVG with Font Awesome icons
packages/yasgui/src/queryManagement/QueryBrowser.scss Updated icon styling
packages/yasgui/src/endpointSelect.scss Updated icon sizing for Font Awesome
packages/yasgui/src/themes.scss Replaced fill properties with color for Font Awesome icons
packages/utils/src/index.ts Removed drawSvgStringAsElement and drawFontAwesomeIconAsSvg utility functions
package.json Added @fortawesome/fontawesome-free ^7.1.0 dependency
package-lock.json Updated Font Awesome dependencies to version 7.1.0
docs/developer-guide.md Removed references to SVG icon rendering utilities
Comments suppressed due to low confidence (1)

packages/yasgui/src/Tab.ts:1355

  • The initSaveManagedQueryIcon method is no longer called anywhere in the codebase but is still defined. This is dead code that should be removed since the save button is now created directly in the YASQE package (see yasqe/src/index.ts lines 548-562) and its visibility is controlled via updateSaveButtonVisibility().
  private initSaveManagedQueryIcon() {
    if (!this.yasqe) return;

    const wrapper = this.yasqe.getWrapperElement();
    const buttons = wrapper?.querySelector(".yasqe_buttons");
    if (!buttons) return;

    // Avoid duplicates if Yasqe ever re-renders
    if (buttons.querySelector(".yasqe_saveManagedQueryButton")) return;

    const queryBtn = buttons.querySelector(".yasqe_queryButton");
    if (!queryBtn) return;

    const saveBtn = document.createElement("button");
    saveBtn.type = "button";
    saveBtn.className = "yasqe_saveManagedQueryButton";
    saveBtn.title = "Save managed query";
    saveBtn.setAttribute("aria-label", "Save managed query");
    saveBtn.innerHTML = '<i class="fas fa-save" aria-hidden="true"></i>';

    saveBtn.addEventListener("click", (e) => {
      e.preventDefault();
      e.stopPropagation();
      void this.saveManagedQueryOrSaveAsManagedQuery();
    });

    buttons.insertBefore(saveBtn, queryBtn);
  }

MathiasVDA and others added 6 commits January 1, 2026 22:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MathiasVDA
Copy link
Collaborator

@copilot apply changes based on:
this feedback,
this feedback,
this feedback and
this feedback

Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 1, 2026

@copilot apply changes based on:
this feedback,
[this feedback](#106 (comment)...

Applied all four accessibility improvements in commit b4a092a:

  • Added aria-hidden="true" to Run query button icons (play, warning, loading)
  • Added aria-hidden="true" to Share icon
  • Added aria-hidden="true" to Save icon
  • Added aria-hidden="true" to Fullscreen icons (expand, compress)

All decorative icons are now properly hidden from screen readers, with button meaning conveyed through text labels and aria-label attributes.

@MathiasVDA MathiasVDA merged commit eacf2c1 into main Jan 1, 2026
2 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.

Redesign yasqe buttons

2 participants