XS-1632 adding icons for equipment checkout and return - #436
Conversation
📝 WalkthroughWalkthroughTwo React SVG icons for equipment checkout and return are added, tagged, re-exported from the icons index, and included in the package’s TypeScript declarations. ChangesEquipment icons
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@src/icons/src/EquipmentCheckoutIcon.jsx`:
- Around line 13-18: Fix Prettier formatting for the short path elements in
EquipmentCheckoutIcon.jsx lines 13-18 and EquipmentReturnIcon.jsx lines 13-18 by
collapsing each path’s attributes onto a single line, without changing their
values or behavior.
- Around line 4-6: Replace the anonymous renderer passed to createIcon in
EquipmentCheckoutIcon.jsx (lines 4-6) with a named functional component, and
make the same change for the renderer in EquipmentReturnIcon.jsx (lines 4-6).
Preserve each SVG’s existing props and markup while ensuring both components
follow the repository’s named-functional-component convention.
- Around line 4-6: Add or update Storybook stories under src/stories/ for both
EquipmentCheckoutIcon and EquipmentReturnIcon, covering the new or changed icon
components. Ensure each icon has Storybook coverage instead of adding Jest
tests; the affected component sites require no direct changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 61ae38e1-b873-4902-a56d-33320729de30
📒 Files selected for processing (4)
index.d.tssrc/icons/index.jssrc/icons/src/EquipmentCheckoutIcon.jsxsrc/icons/src/EquipmentReturnIcon.jsx
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
xola/x2-seller(manual)xola/x2-checkout(manual)xola/jslint(auto-detected)
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
src/**/*.jsx
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.jsx: Implement components as named functional components using hooks, with the formconst ComponentName = (props) => { ... }.
Useprop-typesinstead of TypeScript for component props, and define aPropTypesentry for every public prop, includingchildrenandclassName.
Destructure component props in the function signature rather than accessing properties throughprops.x.
Useclsxfor conditionalclassNameconstruction; do not use template literals or string concatenation.
Keep JSX indentation to a maximum of six levels.
Avoid custom CSS and inlinestyleprops; if Tailwind cannot express a design, flag it rather than routing around the limitation.
Do not add dark mode support.
Files:
src/icons/src/EquipmentCheckoutIcon.jsxsrc/icons/src/EquipmentReturnIcon.jsx
**/*.{js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{js,jsx}: Use theuseMount,useUnmount, anduseMemoizedFnhooks fromahooksinstead of hand-rolleduseEffectoruseCallbackequivalents.
Always clean upuseEffectside effects, including event listeners, timers, tippy/nouislider instances, and subscriptions, when components unmount.
Do not suppressreact-hooks/exhaustive-deps.
Write comments only to explain why code exists or behaves a certain way, not what the code does.
Use named color-scale classes fromtailwind.config.jssuch asbg-primary,text-gray-dark, andborder-gray-light; never use Tailwind's default numbered palette such astext-gray-600.For new or changed components, add or update a Storybook story under
src/stories/instead of adding a Jest test; component behavior is covered by Chromatic visual regression.
Files:
src/icons/src/EquipmentCheckoutIcon.jsxsrc/icons/index.jssrc/icons/src/EquipmentReturnIcon.jsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.claude/rules/commenting.md)
**/*.{js,jsx,ts,tsx}: Write self-explanatory code and add comments only when necessary to explain why rather than what. Use comments for complex Tailwind class reasoning, non-obvious prop-types validation, third-party library workarounds, performance trade-offs, or fragile invariants.
Do not add obvious, redundant, dead-code, changelog, caller, ticket, or divider comments.
Use TODO, FIXME, HACK, NOTE, and PERF prefixes for work-in-progress, workaround, assumption, and performance annotations.
Use JSDoc for shared public helpers, documenting their purpose, parameters, and return values.
Before adding a comment, prefer clearer names or self-documenting code, and add the comment only when it explains non-obvious reasoning that will help future maintainers.
Files:
src/icons/src/EquipmentCheckoutIcon.jsxsrc/icons/index.jssrc/icons/src/EquipmentReturnIcon.jsxindex.d.ts
index.d.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Maintain consumer-facing type declarations manually in
index.d.ts.
Files:
index.d.ts
🪛 GitHub Check: View Lint Report
src/icons/src/EquipmentCheckoutIcon.jsx
[failure] 13-18: src/icons/src/EquipmentCheckoutIcon.jsx#L13-L18
[prettier/prettier] Replace ⏎················d="M20.0328·16.8691H15.1685"⏎················stroke="currentColor"⏎················strokeLinecap="round"⏎················strokeLinejoin="round"⏎··········· with ·d="M20.0328·16.8691H15.1685"·stroke="currentColor"·strokeLinecap="round"·strokeLinejoin="round"
[error] 13-18: ESLint (prettier/prettier) formatting error. Replace the multi-line SVG attributes with d="M20.0328 16.8691H15.1685" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round".
src/icons/src/EquipmentReturnIcon.jsx
[failure] 13-18: src/icons/src/EquipmentReturnIcon.jsx#L13-L18
[prettier/prettier] Replace ⏎················d="M4.14107·6.10742H9.00537"⏎················stroke="currentColor"⏎················strokeLinecap="round"⏎················strokeLinejoin="round"⏎··········· with ·d="M4.14107·6.10742H9.00537"·stroke="currentColor"·strokeLinecap="round"·strokeLinejoin="round"
[error] 13-18: ESLint (prettier/prettier) formatting error. Replace the multi-line SVG attributes with d="M4.14107 6.10742H9.00537" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round".
🔇 Additional comments (4)
src/icons/src/EquipmentCheckoutIcon.jsx (1)
1-2: LGTM!Also applies to: 7-12, 19-30
src/icons/src/EquipmentReturnIcon.jsx (1)
1-2: LGTM!Also applies to: 7-12, 19-30
src/icons/index.js (1)
102-103: LGTM!index.d.ts (1)
119-120: LGTM!
Summary by CodeRabbit
EquipmentCheckoutIconfor inventory and equipment checkout workflows.EquipmentReturnIconfor inventory and equipment return workflows.