🎨 Palette: Improve workspace accessibility and safety#33
Conversation
This commit introduces several micro-UX and accessibility enhancements to the tool runners and workspace: - Added descriptive ARIA labels and titles to all icon-only buttons (Remove, Preview, Move Up/Down) in `PdfMergeTool` and `ImageResizeTool`, including the filename for context. - Replaced plain text 'x' and '×' markers with proper Lucide icons for better visual consistency. - Implemented a confirmation dialog for the 'Clear All' action in `ToolWorkspace` to prevent accidental loss of uploaded files. - Improved the 'Clear All' button label by removing the underscore. - Ensured all changes are under the 50-line limit per file. ♿ Accessibility: Icon-only buttons are now screen-reader friendly and have helpful tooltips. 🎯 Why: Prevents accidental data loss and ensures a consistent, accessible experience across tool runners.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)✅ Unit Test PR creation complete.
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/features/tools/runners/common/ToolWorkspace.jsx (1)
171-183: Good safety measure for destructive action.The confirmation dialog prevents accidental loss of uploaded files, and the ARIA attributes improve accessibility. This is a solid implementation.
One optional enhancement: the confirmation message could include the file count for better context (e.g., "Are you sure you want to clear all 5 files?").
💡 Optional: More contextual confirmation message
onClick={() => { - if (window.confirm('Are you sure you want to clear all files? This action cannot be undone.')) { + if (window.confirm(`Are you sure you want to clear all ${files.length} file${files.length !== 1 ? 's' : ''}? This action cannot be undone.`)) { onReset(); } }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/features/tools/runners/common/ToolWorkspace.jsx` around lines 171 - 183, Update the onClick handler's window.confirm message to include the current file count so users see context before clearing; retrieve the count from the component's props/state (e.g., files.length or workspaceFiles.length depending on the component variable in this file) inside the onClick, build a pluralized message like "Are you sure you want to clear all 1 file?" vs "…clear all 5 files?", and use that string in window.confirm before calling onReset; also consider updating the title/aria-label if you want the count reflected there as well.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/features/tools/runners/common/ToolWorkspace.jsx`:
- Around line 171-183: Update the onClick handler's window.confirm message to
include the current file count so users see context before clearing; retrieve
the count from the component's props/state (e.g., files.length or
workspaceFiles.length depending on the component variable in this file) inside
the onClick, build a pluralized message like "Are you sure you want to clear all
1 file?" vs "…clear all 5 files?", and use that string in window.confirm before
calling onReset; also consider updating the title/aria-label if you want the
count reflected there as well.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 41f8ef1e-03be-4100-bf77-9a306c3d7973
📒 Files selected for processing (3)
src/features/tools/runners/common/ToolWorkspace.jsxsrc/features/tools/runners/image/ImageResizeTool.jsxsrc/features/tools/runners/pdf/PdfMergeTool.jsx
|
@coderabbitai is this ready to merge |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 9676
The only feedback I left was a nitpick (optional, non-blocking): the The core changes — ARIA labels, Lucide icons, and the Clear All confirmation dialog — all look solid. You're good to go! 🚀 |
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
✅ Created PR with unit tests: #37 |
Micro-UX and accessibility improvements for AnyFileForge workspace and tool runners. Includes ARIA labels, icons, and safety confirmations.
PR created automatically by Jules for task 6650210719635703917 started by @Sumit-5002
Summary by CodeRabbit
Bug Fixes
Style