Skip to content

Add panel colored shapes behind shuttle icons in all arcana#2817

Merged
aidanhb merged 1 commit into
mainfrom
aidan/arcana
Apr 23, 2026
Merged

Add panel colored shapes behind shuttle icons in all arcana#2817
aidanhb merged 1 commit into
mainfrom
aidan/arcana

Conversation

@aidanhb
Copy link
Copy Markdown
Contributor

@aidanhb aidanhb commented Apr 23, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added an Arcanum icon section to the icon gallery featuring a dedicated size slider (10–400px).
    • All Arcanum icons now display in a grid layout with colored containers for easy browsing and visual reference.

Walkthrough

Adds dynamic eager-loading of Arcanum SVG icons (matching arcanum-*.svg) as Solid components. Constructs a sorted ARCANUM_ICONS list from module defaults. Extends IconGallery with a new "Arcanum" section featuring an independent size slider (10–400px) and grid display of all Arcanum icons.

Changes

Cohort / File(s) Summary
Arcanum Icon Gallery Integration
js/app/packages/core/internal/IconGallery.tsx
Implements dynamic eager-loading of arcanum-*.svg icons as Solid components, builds a sorted ARCANUM_ICONS list from module defaults with derived names, and adds a new "Arcanum" UI section to IconGallery with independent arcanumSize slider (10–400px) and flex-wrapping grid display with colored square containers.
🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title does not follow the required conventional commits format (feat:, fix:, chore:, etc.). It also describes panel-colored shapes behind shuttle icons, which does not match the changeset that adds a dedicated Arcanum icon gallery section. Update the title to follow conventional commits format (e.g., 'feat: add Arcanum icon gallery section') and ensure it accurately describes the main change of adding dynamic eager-loading of Arcanum SVG icons with a UI gallery section.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to verify if it relates to the changeset. Add a pull request description that explains the purpose and scope of adding the Arcanum icon gallery section to help reviewers understand the changes.
✅ Passed checks (2 passed)
Check name Status Explanation
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.


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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@js/app/packages/core/internal/IconGallery.tsx`:
- Around line 429-439: The Arcanum slider label is missing the visible "Size:"
text; update the label that wraps the input (the block using arcanumSize() and
setArcanumSize()) to include a visible span "Size:" before the range input
(matching the primary slider's pattern) so users know what the control adjusts;
keep the same styling/utility classes used by the other slider's label/span to
ensure visual consistency with the primary icon-size slider.
- Around line 442-460: The Arcanum items are only coloring the SVG via color:
getColorStyle() but do not render a filled panel behind each icon; update the
ARCANUM_ICONS rendering so the icon has a separate backing element (e.g., create
a sibling or absolutely positioned child inside the container) that uses
background or backgroundColor: getColorStyle() and the same width/height derived
from arcanumSize(), while keeping the SVG colored via color: getColorStyle() (or
vice versa depending on the SVGs). Target the inner container that currently
sets style with getColorStyle()/arcanumSize() and icon.component, and ensure the
backing element has the desired shape (square/rounded) and appropriate
z-index/padding so the icon sits visibly on top.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b84f5af2-0ca8-4ade-8a46-9a169e83ad3a

📥 Commits

Reviewing files that changed from the base of the PR and between aadb4de and 98929c1.

⛔ Files ignored due to path filters (6)
  • js/app/packages/macro-icons/arcanum/arcanum-002.svg is excluded by !**/*.svg
  • js/app/packages/macro-icons/arcanum/arcanum-003.svg is excluded by !**/*.svg
  • js/app/packages/macro-icons/arcanum/arcanum-005.svg is excluded by !**/*.svg
  • js/app/packages/macro-icons/arcanum/arcanum-006.svg is excluded by !**/*.svg
  • js/app/packages/macro-icons/arcanum/arcanum-009.svg is excluded by !**/*.svg
  • js/app/packages/macro-icons/arcanum/arcanum-010.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • js/app/packages/core/internal/IconGallery.tsx

Comment on lines +429 to +439
<label class="flex items-center gap-2 text-xs text-ink">
<input
type="range"
min="10"
max="400"
value={arcanumSize()}
onInput={(e) => setArcanumSize(Number(e.currentTarget.value))}
class="icon-gallery-slider w-24"
/>
<span class="w-8 text-[10px] text-muted">{arcanumSize()}px</span>
</label>
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.

⚠️ Potential issue | 🟡 Minor

Add a "Size:" label to the arcanum slider for UI consistency.

The primary icon-size slider above (lines 304–315) is prefixed with a <span>Size:</span> inside its <label>. The new Arcanum slider wraps the <input> in a label but omits the visible text, so there's no textual affordance telling the user what the range controls.

Proposed fix
           <label class="flex items-center gap-2 text-xs text-ink">
+            <span>Size:</span>
             <input
               type="range"
               min="10"
               max="400"
               value={arcanumSize()}
               onInput={(e) => setArcanumSize(Number(e.currentTarget.value))}
               class="icon-gallery-slider w-24"
             />
             <span class="w-8 text-[10px] text-muted">{arcanumSize()}px</span>
           </label>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<label class="flex items-center gap-2 text-xs text-ink">
<input
type="range"
min="10"
max="400"
value={arcanumSize()}
onInput={(e) => setArcanumSize(Number(e.currentTarget.value))}
class="icon-gallery-slider w-24"
/>
<span class="w-8 text-[10px] text-muted">{arcanumSize()}px</span>
</label>
<label class="flex items-center gap-2 text-xs text-ink">
<span>Size:</span>
<input
type="range"
min="10"
max="400"
value={arcanumSize()}
onInput={(e) => setArcanumSize(Number(e.currentTarget.value))}
class="icon-gallery-slider w-24"
/>
<span class="w-8 text-[10px] text-muted">{arcanumSize()}px</span>
</label>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@js/app/packages/core/internal/IconGallery.tsx` around lines 429 - 439, The
Arcanum slider label is missing the visible "Size:" text; update the label that
wraps the input (the block using arcanumSize() and setArcanumSize()) to include
a visible span "Size:" before the range input (matching the primary slider's
pattern) so users know what the control adjusts; keep the same styling/utility
classes used by the other slider's label/span to ensure visual consistency with
the primary icon-size slider.

Comment on lines +442 to +460
<div class="flex flex-wrap gap-3">
<For each={ARCANUM_ICONS}>
{(icon) => (
<div class="inline-flex flex-col items-center rounded-[1px] border border-edge-muted p-2">
<div
class="flex items-center justify-center"
style={{
color: getColorStyle(),
width: `${arcanumSize()}px`,
height: `${arcanumSize()}px`,
}}
>
<icon.component />
</div>
<span class="mt-2 text-[8px] text-muted">{icon.name}</span>
</div>
)}
</For>
</div>
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.

⚠️ Potential issue | 🟠 Major

PR objective not implemented: no "panel colored shape" is rendered behind the arcanum icons.

The PR title is "Add panel colored shapes behind shuttle icons in all arcana", and the AI summary describes "each rendered inside a colored, square container". In the actual markup, the inner div only sets color: getColorStyle() (which maps to SVG currentColor for the icon's fill/stroke) — there is no background/background-color or any other shape behind the icon. The container's only visible chrome is the existing border border-edge-muted p-2 used by the other galleries.

If the goal is to show the selected swatch as a filled panel behind each shuttle icon (as the title implies), the Arcanum item needs its own backing element, e.g.:

Proposed fix
         <div class="flex flex-wrap gap-3">
           <For each={ARCANUM_ICONS}>
             {(icon) => (
               <div class="inline-flex flex-col items-center rounded-[1px] border border-edge-muted p-2">
                 <div
-                  class="flex items-center justify-center"
+                  class="flex items-center justify-center"
                   style={{
-                    color: getColorStyle(),
+                    background: getColorStyle(),
                     width: `${arcanumSize()}px`,
                     height: `${arcanumSize()}px`,
                   }}
                 >
                   <icon.component />
                 </div>
                 <span class="mt-2 text-[8px] text-muted">{icon.name}</span>
               </div>
             )}
           </For>
         </div>

(Or keep color for the icon and add a separate background — whichever the arcanum SVGs expect.)

Please confirm whether the colored "shape behind" was intended to land in this PR, or if it's deferred to a follow-up; if deferred, consider updating the title/description so reviewers aren't misled.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div class="flex flex-wrap gap-3">
<For each={ARCANUM_ICONS}>
{(icon) => (
<div class="inline-flex flex-col items-center rounded-[1px] border border-edge-muted p-2">
<div
class="flex items-center justify-center"
style={{
color: getColorStyle(),
width: `${arcanumSize()}px`,
height: `${arcanumSize()}px`,
}}
>
<icon.component />
</div>
<span class="mt-2 text-[8px] text-muted">{icon.name}</span>
</div>
)}
</For>
</div>
<div class="flex flex-wrap gap-3">
<For each={ARCANUM_ICONS}>
{(icon) => (
<div class="inline-flex flex-col items-center rounded-[1px] border border-edge-muted p-2">
<div
class="flex items-center justify-center"
style={{
background: getColorStyle(),
width: `${arcanumSize()}px`,
height: `${arcanumSize()}px`,
}}
>
<icon.component />
</div>
<span class="mt-2 text-[8px] text-muted">{icon.name}</span>
</div>
)}
</For>
</div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@js/app/packages/core/internal/IconGallery.tsx` around lines 442 - 460, The
Arcanum items are only coloring the SVG via color: getColorStyle() but do not
render a filled panel behind each icon; update the ARCANUM_ICONS rendering so
the icon has a separate backing element (e.g., create a sibling or absolutely
positioned child inside the container) that uses background or backgroundColor:
getColorStyle() and the same width/height derived from arcanumSize(), while
keeping the SVG colored via color: getColorStyle() (or vice versa depending on
the SVGs). Target the inner container that currently sets style with
getColorStyle()/arcanumSize() and icon.component, and ensure the backing element
has the desired shape (square/rounded) and appropriate z-index/padding so the
icon sits visibly on top.

@aidanhb aidanhb merged commit d02bee1 into main Apr 23, 2026
24 checks passed
@aidanhb aidanhb deleted the aidan/arcana branch April 23, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant