-
Notifications
You must be signed in to change notification settings - Fork 2
Redesign YASQE buttons with modern styling and keyboard shortcuts in tooltips #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
|
@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>
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. |
|
@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>
Fixed both issues in commit 5988a2a:
|
There was a problem hiding this 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
drawSvgStringAsElementanddrawFontAwesomeIconAsSvg
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
initSaveManagedQueryIconmethod 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 viaupdateSaveButtonVisibility().
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);
}
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>
|
@copilot apply changes based on: |
Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Applied all four accessibility improvements in commit b4a092a:
All decorative icons are now properly hidden from screen readers, with button meaning conveyed through text labels and aria-label attributes. |


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
imgs.tssaveicon (Font Awesome fa-save/floppy-disk)formaticon to Font Awesome fa-align-leftindex.ts(Run query, Share, Save, Format, Full screen)buttons.scssfor modern lookVisual Changes
Final Button Design with All Fixes:
The buttons now display correctly with:
Technical Details
Final Button Fixes:
Accessibility Improvements:
aria-hidden="true"to all decorative icon elementsaria-labelattributesOther Improvements:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.