Skip to content

icons tidy#149

Merged
eviltester merged 3 commits into
masterfrom
icons
Jun 2, 2026
Merged

icons tidy#149
eviltester merged 3 commits into
masterfrom
icons

Conversation

@eviltester

@eviltester eviltester commented Jun 2, 2026

Copy link
Copy Markdown
Owner

amend icons to use a consistent framework

Summary by CodeRabbit

  • New Features

    • Replaced legacy text glyphs with standardized inline SVG icons across UI (grid headers, generator buttons, help icons, instruction items)
    • Grid header actions now use accessible buttons with clear titles/aria-labels
  • Style

    • Updated icon and header-control styles for consistent sizing, alignment, and hover/focus states
  • Documentation

    • Added icon standardization plan
  • Tests

    • Added/updated tests verifying icon rendering, accessibility attributes, and header action behavior

Copilot AI review requested due to automatic review settings June 2, 2026 17:07
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@eviltester, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 35 minutes. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ae3694c-50d5-49ea-aa5e-a9b9e69be6ab

📥 Commits

Reviewing files that changed from the base of the PR and between 6356758 and 3c43948.

📒 Files selected for processing (1)
  • apps/web/src/tests/browser/app/abstractions/components/grid-editor.component.js
📝 Walkthrough

Walkthrough

Adds a shared SVG icon primitive and migrates header controls, generator controls, instruction rendering, help icons, CSS, and tests to render and consume accessible inline SVG icons with updated button markup and Playwright selector scoping.

Changes

Icon Standardization Migration

Layer / File(s) Summary
Shared icon primitive foundation
packages/core-ui/js/gui_components/shared/primitives/icon/index.js, packages/core-ui/src/tests/shared/icon-primitive.test.js
New ICONS registry and helpers: escapeAttribute, getIconDefinition, createIconElement, renderIconHtml, decorateIconContainer. Unit tests cover SVG attributes, HTML output, idempotent decoration, and unknown-icon errors.
Grid headers and generator controls
packages/core-ui/js/gui_components/data-grid-editor/ag-grid/customHeader-ag-grid.js, packages/core-ui/js/gui_components/data-grid-editor/data-grid-component-view.js, packages/core-ui/js/gui_components/data-grid-editor/tabulator/customHeader-tabulator.js, packages/core-ui/js/gui_components/generator/controls/generator-controls-view.js, packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js, packages/core-ui/src/tests/grid/*.test.js, packages/core-ui/src/tests/generator/*.test.js
AG Grid/Tabulator header controls and generator UI now render icons via renderIconHtml() inside <button type="button"> elements with aria-label/title attributes. Generator row click handling now uses event.target.closest('[data-action]'). Tests updated to assert BUTTON tags, SVG presence, and labels.
Instructions UI and help icon decoration
packages/core-ui/js/gui_components/shared/instructions/instructions-view.js, packages/core-ui/js/gui_components/shared/instructions/app-page-instructions.js, packages/core-ui/js/help/help-tooltips.js, packages/core-ui/src/tests/shared/instructions-view.test.js, packages/core-ui/src/tests/utils/help-tooltips.test.js
InstructionsView supports object items with optional icons (rendered via helper), app instructions rewritten to structured items, .helpicon[data-help] elements decorated with circle-help SVG via decorateIconContainer(), and tests added/updated for icon rendering and unknown-icon fallback.
CSS updates and Playwright selector scoping
apps/web/styles.css, apps/web/src/tests/browser/app/abstractions/components/grid-header.component.js, apps/web/src/tests/browser/app/abstractions/components/grid-editor.component.js, apps/web/src/tests/browser/app/functional/grid-editor/column-operations/add-columns.spec.js, apps/web/images/.gitkeep
New/refined CSS classes: .app-icon, .header-icon-button, .instruction-item-icon, .instruction-action-icon, .helpicon/.helpicon-svg, simplified .generator-file-icon, and .icon-button centering. Playwright locators scoped to toolbar and header actions now match aria-label/title via a centralized actionTitleMap. Kept images dir tracked.
Icon standardization documentation
docs/icon-standardization-plan.md
New plan documenting goals, icon mapping, accessibility rules (aria-label on controls, aria-hidden on decorative SVGs), implementation approach, and verification checklist.
🎯 3 (Moderate) ⏱️ ~20 minutes

Possibly related PRs

  • eviltester/grid-table-editor#119: Modifies GridHeaderComponent action resolution and UI flows; overlaps with header/action selector changes in this PR.
  • eviltester/grid-table-editor#31: Related work on how "Clear sort" and header sort actions are surfaced and wired, which this PR also adjusts via labels and controls.

"🐰
I stitched small svgs, one by one,
Now headers gleam beneath the sun,
Buttons hum with tidy aria lore,
Helpicons sparkle, icons soar,
A hop, a click — the UI's fun!"

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "icons tidy" is vague and does not clearly convey the scope or nature of the changes. While related to icons, it lacks specificity about what was changed. Consider revising the title to be more descriptive, such as "Refactor icons to use standardized Lucide-style SVG framework" or "Implement shared icon primitive for UI standardization."
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch icons

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 standardizes UI icons across core grid/editor/generator/help surfaces by introducing an app-owned inline-SVG icon primitive (Lucide-style) and migrating existing ad hoc text/Unicode/CSS/Font Awesome-based icons to the shared helper, with accompanying accessibility-focused test updates.

Changes:

  • Added a shared icon primitive that renders an allowlisted set of inline SVG icons as DOM nodes or HTML strings.
  • Replaced legacy header/help/schema/generator icons with the shared SVG approach and updated CSS to style the new icon system.
  • Updated Jest + Playwright tests (and page abstractions) to assert on new icon markup and accessible labels; removed the legacy Font Awesome SVG asset.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core-ui/src/tests/utils/help-tooltips.test.js Updates tooltip tests to assert new inline-SVG help icon rendering and tippy-unavailable fallback.
packages/core-ui/src/tests/shared/instructions-view.test.js Asserts instruction items now render standardized icons with expected selectors/titles.
packages/core-ui/src/tests/shared/icon-primitive.test.js Adds unit tests for the new shared icon primitive (DOM + HTML rendering, idempotence, unknown icon errors).
packages/core-ui/src/tests/grid/tabulator-custom-header.test.js Updates Tabulator header popup tests for button-based icon controls and accessibility attributes.
packages/core-ui/src/tests/grid/data-grid-component-view.test.js Adds assertions for standardized header icon markup and accessible labels in generated header HTML.
packages/core-ui/src/tests/grid/ag-grid-header-components.test.js Updates AG Grid header tests to validate new button + SVG icon markup.
packages/core-ui/src/tests/generator/generator-controls-view.test.js Updates generator controls tests to assert the standardized file icon SVGs exist.
packages/core-ui/src/tests/generator/data-generator-schema-ui.test.js Adds assertions for schema row action aria-labels and icon SVG presence.
packages/core-ui/js/help/help-tooltips.js Ensures help icons render even without tippy by decorating containers with shared SVG icons before attaching tooltips.
packages/core-ui/js/gui_components/shared/primitives/icon/index.js Introduces shared allowlisted inline-SVG icon rendering utilities (DOM + HTML string).
packages/core-ui/js/gui_components/shared/instructions/instructions-view.js Renders instruction list items with standardized icons via renderIconHtml.
packages/core-ui/js/gui_components/shared/instructions/app-page-instructions.js Converts app instruction items from legacy glyphs to {icon,title,text} objects aligned with the new icon system.
packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js Replaces schema row glyphs with standardized inline SVG icons and adds aria-labels/type=button.
packages/core-ui/js/gui_components/generator/controls/generator-controls-view.js Replaces CSS-drawn file icon with standardized file-plus inline SVG icon.
packages/core-ui/js/gui_components/data-grid-editor/tabulator/customHeader-tabulator.js Replaces popup header action glyphs with button-based SVG icon controls.
packages/core-ui/js/gui_components/data-grid-editor/data-grid-component-view.js Replaces Tabulator header icons with standardized SVGs and adds aria-label/title attributes to action elements.
packages/core-ui/js/gui_components/data-grid-editor/ag-grid/customHeader-ag-grid.js Replaces AG Grid header action glyphs with standardized SVG icon buttons (keeps AG Grid chrome icons).
docs/icon-standardization-plan.md Documents the icon standardization goals, mapping, and verification approach.
apps/web/styles.css Adds shared icon/button styling and updates help/generator/header icon styles; removes legacy help-icon background image usage.
apps/web/src/tests/browser/app/functional/grid-editor/column-operations/add-columns.spec.js Updates Playwright assertions to locate header actions via aria-label instead of legacy title.
apps/web/src/tests/browser/app/abstractions/components/grid-header.component.js Updates header action lookup logic to prefer aria-label (fallback to title).
apps/web/images/readme.md Removes obsolete documentation referencing the old Font Awesome SVG.
apps/web/images/circle-question-solid.svg Removes the legacy Font Awesome help icon asset.

Comment thread packages/core-ui/js/gui_components/data-grid-editor/data-grid-component-view.js Outdated
Comment thread packages/core-ui/js/gui_components/data-grid-editor/data-grid-component-view.js Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
docs/icon-standardization-plan.md (1)

16-20: 💤 Low value

Consider varying sentence structure for readability.

The repeated "Do not" beginnings make the constraints clear but could be varied for better flow. This is purely a style suggestion.

📝 Optional style improvement
 ## Non-Goals
 
-- Do not redesign grid behavior, sorting, filtering, or column editing while replacing icons.
-- Do not replace Tabulator or AG Grid as part of this work.
-- Do not remove visible text from primary text buttons such as `Add Row` unless the button is intentionally converted to an icon-only control with accessible labeling.
-- Do not rewrite existing components solely to fit the icon work unless a local component boundary is already being touched.
-- Do not replace Tippy itself; this plan keeps the existing tooltip service contract.
+- Avoid redesigning grid behavior, sorting, filtering, or column editing while replacing icons.
+- Tabulator and AG Grid replacement are out of scope for this work.
+- Preserve visible text from primary text buttons such as `Add Row` unless the button is intentionally converted to an icon-only control with accessible labeling.
+- Avoid rewriting existing components solely to fit the icon work unless a local component boundary is already being touched.
+- Keep the existing Tippy tooltip service contract; replacement is not in scope.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/icon-standardization-plan.md` around lines 16 - 20, Revise the repeated
"Do not" sentence openings in the constraints list (e.g., the bullets starting
"Do not redesign grid behavior, sorting, filtering, or column editing...", "Do
not replace Tabulator or AG Grid...", "Do not remove visible text from primary
text buttons such as `Add Row`...", "Do not rewrite existing components solely
to fit the icon work...", and "Do not replace Tippy itself; this plan keeps the
existing tooltip service contract.") to vary sentence structure for improved
readability—rewrite some items to use affirmative or mixed phrasing (e.g., "Keep
grid behavior, sorting, filtering, and column editing unchanged" or "Preserve
Tabulator and AG Grid") while preserving the same constraints and meaning.
packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js (1)

339-349: ⚡ Quick win

Harden generator row action click handler against nested icon targets

handleGeneratorRowButtonClick (lines 339-349) reads event.target.getAttribute('data-action'/'data-row-id'). Today this is likely safe because the SVGs come from renderIconHtml() with the default app-icon class, and apps/web/styles.css sets .app-icon { pointer-events: none; }, so clicks land on the <button>.

Still fragile: make the handler resolve the actual button via closest('[data-action]') (same robustness pattern used for drag).

Proposed change
 function handleGeneratorRowButtonClick({ event, schemaRows, addRowAfter, removeRow, moveRow }) {
-  const action = event.target.getAttribute('data-action');
+  const actionButton = event.target?.closest?.('[data-action]');
+  const action = actionButton?.getAttribute('data-action');
   if (!action || action === 'drag') {
     return;
   }
 
-  const rowId = event.target.getAttribute('data-row-id');
+  const rowId = actionButton.getAttribute('data-row-id');
   const index = schemaRows.findIndex((row) => row.id === rowId);
   if (index < 0) {
     return;
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js`
around lines 339 - 349, The click handler handleGeneratorRowButtonClick is
fragile because it reads attributes from event.target which can be a nested SVG
or icon; change it to find the actual button element first (e.g., const btn =
event.target.closest('[data-action]') or similar) and then read
btn.getAttribute('data-action') and btn.getAttribute('data-row-id'); if closest
returns null keep the existing early return logic and continue using
schemaRows.findIndex(...). This mirrors the robustness used for drag handling
and prevents missing attributes when icons are clicked.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/styles.css`:
- Line 236: Several CSS declarations use the keyword "currentColor" with
uppercase C, which triggers the stylelint value-keyword-case rule; update each
occurrence (e.g., the declarations currently written as "color: currentColor;"
at the spots you added) to use the lowercase keyword "currentcolor" so they
conform to the project's linting convention; search for the exact token
"currentColor" in the stylesheet and replace with "currentcolor" across all
occurrences (including the ones referenced at lines around 236, 380, 463–464,
and 554).

In `@packages/core-ui/js/gui_components/shared/instructions/instructions-view.js`:
- Around line 26-33: The template's call to renderIconHtml using item.icon can
throw and abort rendering; update the template() logic around iconName/item.icon
to fail soft by validating or try/catching renderIconHtml (the code that sets
iconHtml) so that on an unknown icon you set iconHtml to an empty string (i.e.
render text-only) instead of letting renderIconHtml throw; reference
renderIconHtml, iconName/item.icon and the instruction-item-icon HTML generation
when making the change.

---

Nitpick comments:
In `@docs/icon-standardization-plan.md`:
- Around line 16-20: Revise the repeated "Do not" sentence openings in the
constraints list (e.g., the bullets starting "Do not redesign grid behavior,
sorting, filtering, or column editing...", "Do not replace Tabulator or AG
Grid...", "Do not remove visible text from primary text buttons such as `Add
Row`...", "Do not rewrite existing components solely to fit the icon work...",
and "Do not replace Tippy itself; this plan keeps the existing tooltip service
contract.") to vary sentence structure for improved readability—rewrite some
items to use affirmative or mixed phrasing (e.g., "Keep grid behavior, sorting,
filtering, and column editing unchanged" or "Preserve Tabulator and AG Grid")
while preserving the same constraints and meaning.

In
`@packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js`:
- Around line 339-349: The click handler handleGeneratorRowButtonClick is
fragile because it reads attributes from event.target which can be a nested SVG
or icon; change it to find the actual button element first (e.g., const btn =
event.target.closest('[data-action]') or similar) and then read
btn.getAttribute('data-action') and btn.getAttribute('data-row-id'); if closest
returns null keep the existing early return logic and continue using
schemaRows.findIndex(...). This mirrors the robustness used for drag handling
and prevents missing attributes when icons are clicked.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c6a71dbe-72a5-43f2-b211-78e451cea223

📥 Commits

Reviewing files that changed from the base of the PR and between b1c5e68 and 0885f33.

⛔ Files ignored due to path filters (1)
  • apps/web/images/circle-question-solid.svg is excluded by !**/*.svg
📒 Files selected for processing (22)
  • apps/web/images/readme.md
  • apps/web/src/tests/browser/app/abstractions/components/grid-header.component.js
  • apps/web/src/tests/browser/app/functional/grid-editor/column-operations/add-columns.spec.js
  • apps/web/styles.css
  • docs/icon-standardization-plan.md
  • packages/core-ui/js/gui_components/data-grid-editor/ag-grid/customHeader-ag-grid.js
  • packages/core-ui/js/gui_components/data-grid-editor/data-grid-component-view.js
  • packages/core-ui/js/gui_components/data-grid-editor/tabulator/customHeader-tabulator.js
  • packages/core-ui/js/gui_components/generator/controls/generator-controls-view.js
  • packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js
  • packages/core-ui/js/gui_components/shared/instructions/app-page-instructions.js
  • packages/core-ui/js/gui_components/shared/instructions/instructions-view.js
  • packages/core-ui/js/gui_components/shared/primitives/icon/index.js
  • packages/core-ui/js/help/help-tooltips.js
  • packages/core-ui/src/tests/generator/data-generator-schema-ui.test.js
  • packages/core-ui/src/tests/generator/generator-controls-view.test.js
  • packages/core-ui/src/tests/grid/ag-grid-header-components.test.js
  • packages/core-ui/src/tests/grid/data-grid-component-view.test.js
  • packages/core-ui/src/tests/grid/tabulator-custom-header.test.js
  • packages/core-ui/src/tests/shared/icon-primitive.test.js
  • packages/core-ui/src/tests/shared/instructions-view.test.js
  • packages/core-ui/src/tests/utils/help-tooltips.test.js
💤 Files with no reviewable changes (1)
  • apps/web/images/readme.md

Comment thread apps/web/styles.css Outdated
Comment thread packages/core-ui/js/gui_components/shared/instructions/instructions-view.js Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/web/src/tests/browser/app/abstractions/components/grid-editor.component.js (1)

21-21: 💤 Low value

Update checkbox selector to an accessible contract
id="uniqueColumnNamesCheckbox" exists, but the checkbox is wrapped by a <label> with the text “Unique Column Names”, so it has an accessible name. Prefer this.toolbar.getByRole('checkbox', { name: 'Unique Column Names' }) (or getByLabel('Unique Column Names')) instead of locator('#uniqueColumnNamesCheckbox') to match the rest of the abstraction and avoid DOM-internal IDs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/web/src/tests/browser/app/abstractions/components/grid-editor.component.js`
at line 21, Replace the direct ID-based locator for the checkbox with an
accessible query to follow the abstraction contract: update the assignment to
use this.toolbar.getByRole('checkbox', { name: 'Unique Column Names' }) (or
this.toolbar.getByLabel('Unique Column Names')) instead of
this.toolbar.locator('`#uniqueColumnNamesCheckbox`') so the component uses the
accessible name and avoids depending on internal DOM IDs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@apps/web/src/tests/browser/app/abstractions/components/grid-editor.component.js`:
- Line 21: Replace the direct ID-based locator for the checkbox with an
accessible query to follow the abstraction contract: update the assignment to
use this.toolbar.getByRole('checkbox', { name: 'Unique Column Names' }) (or
this.toolbar.getByLabel('Unique Column Names')) instead of
this.toolbar.locator('`#uniqueColumnNamesCheckbox`') so the component uses the
accessible name and avoids depending on internal DOM IDs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 93bf309d-6ec0-4acc-90b2-40519b9d7dbc

📥 Commits

Reviewing files that changed from the base of the PR and between 0885f33 and 6356758.

📒 Files selected for processing (9)
  • apps/web/images/.gitkeep
  • apps/web/src/tests/browser/app/abstractions/components/grid-editor.component.js
  • apps/web/styles.css
  • packages/core-ui/js/gui_components/data-grid-editor/data-grid-component-view.js
  • packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js
  • packages/core-ui/js/gui_components/shared/instructions/instructions-view.js
  • packages/core-ui/src/tests/generator/data-generator-schema-ui.test.js
  • packages/core-ui/src/tests/grid/data-grid-component-view.test.js
  • packages/core-ui/src/tests/shared/instructions-view.test.js
✅ Files skipped from review due to trivial changes (1)
  • apps/web/images/.gitkeep
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/core-ui/src/tests/grid/data-grid-component-view.test.js
  • packages/core-ui/js/gui_components/shared/instructions/instructions-view.js
  • apps/web/styles.css
  • packages/core-ui/js/gui_components/data-grid-editor/data-grid-component-view.js
  • packages/core-ui/js/gui_components/generator/schema/data-generator-schema-ui.js

@eviltester eviltester merged commit d743afb into master Jun 2, 2026
14 checks passed
@eviltester eviltester deleted the icons branch June 2, 2026 19:27
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