Skip to content

UI enhancements: hover indicators, category labels, delete confirmations, and improved item management#18

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/ui-enhancements-checklist-interaction
Draft

UI enhancements: hover indicators, category labels, delete confirmations, and improved item management#18
Copilot wants to merge 3 commits intomainfrom
copilot/ui-enhancements-checklist-interaction

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 11, 2025

Summary

This PR implements several UI improvements to enhance checklist interaction and item management, making the interface more intuitive and accessible while removing the priority system in favor of a simpler category-based organization.

Changes Made

Checklist Overview Page

  • Added hover underline to checklist names to provide visual feedback that they are clickable
  • Added edit and delete icons that appear on hover in the top-right corner of checklist cards
    • Edit icon (pencil) opens the checklist for editing
    • Delete icon (trash) triggers the delete confirmation dialog
    • Both icons fade in smoothly on hover with transition effects

Checklist Detail Page

  • Replaced "New Checklist" with "Delete Checklist" button when viewing a checklist, providing contextually appropriate actions
  • Added in-page confirmation dialog for checklist deletion that displays a clear warning message with Delete/Cancel buttons
  • After deletion confirmation, the user is automatically redirected to the checklist overview

Item Management

  • Removed priority property entirely from the codebase - priority field has been removed from:

    • Type definitions (Item and ItemResponse)
    • Add item form (no priority selector)
    • Item display and edit views
  • Category labels now fully replace priority with improved functionality:

    • Categories are displayed as clickable blue labels on item rows
    • Clicking either the item name or category label opens edit mode
    • Category field is editable from both the item edit form and checklist view
    • Category field defaults to blank (no "Miscellaneous" prepopulation)
  • Added hover underline to item names to indicate they are clickable for editing

  • Implemented in-page confirmation for item deletion - clicking delete shows a confirmation panel with Delete/Cancel buttons instead of a browser popup

Documentation

  • Updated .github/copilot-instructions.md to reflect new UI patterns and interaction models
  • Updated README.md to document the implemented features accurately

Screenshots

Checklist Overview with Hover Icons:

Checklist with Category Label:

Item Edit Mode with Category Field:

Item Delete Confirmation (In-Page):

Checklist Delete Confirmation (In-Page):

Technical Details

Files Modified:

  • frontend/src/types/checklist.ts - Removed priority from Item type, made category optional
  • frontend/src/components/checklist/ChecklistOverview.tsx - Added hover styles, edit and delete icons with hover effects
  • frontend/src/components/checklist/ChecklistPage.tsx - Added delete checklist button with in-page confirmation
  • frontend/src/components/checklist/ItemRow.tsx - Replaced priority with category label, added in-page delete confirmation, hover indicators
  • frontend/src/components/checklist/AddItemForm.tsx - Removed priority selector, blank category default
  • frontend/src/components/ChecklistDemo.tsx - Updated demo to remove priority references

Testing

  • ✅ All existing tests pass (34/34)
  • ✅ Linting successful
  • ✅ Build successful
  • ✅ Manual testing completed with visual verification

Accessibility Improvements

  • Replaced browser confirm() popups with in-page confirmation dialogs for better accessibility and keyboard navigation
  • Maintained ARIA labels on all interactive elements
  • Added visual hover indicators to improve discoverability of interactive elements
Original prompt

This section details on the original issue you should resolve

<issue_title>UI enhancements for checklist interaction and item management</issue_title>
<issue_description>This issue outlines several UI improvements for checklist functionality:

  • Checklist Overview Page:

    • Underline the checklist name on mouse hover to indicate it's clickable.
  • Checklist Scope:

    • Underline the item name on mouse hover to indicate it's clickable.
    • Change the "new checklist" button to "delete checklist" when viewing a checklist. Clicking "delete checklist" should prompt for in-page confirmation (not a popup), and on confirmation, delete the checklist and redirect to the checklist overview page.
  • Checklist Item Management:

    • When adding checklist items, the category field should be blank by default (not prepopulated with "Miscellaneous").
    • Remove the priority property entirely. Instead, display and use the category label/tag, which should be visible in the checklist view (like priority labels previously) and be clickable/editable from the checklist view (no need to drill down to the item). The category label should also be editable from the scope of an individual checklist item.
    • Deleting a checklist item should use an in-page confirmation (not a popup).
  • Documentation Update:

    • Update Copilot instructions and README files to reflect these changes. Remove any outdated information, but do not add new README files.

Acceptance Criteria:

  • All UI changes are implemented as described above.
  • Category label fully replaces priority property and is editable from both checklist overview and item scope.
  • All delete actions use in-page confirmation.
  • Documentation is updated as required.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #16


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… category labels, in-page confirmations

Co-authored-by: robpitcher <13648061+robpitcher@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance UI for checklist interaction and item management UI enhancements: hover indicators, category labels, delete confirmations, and improved item management Oct 11, 2025
Copilot AI requested a review from robpitcher October 11, 2025 15:05
@robpitcher
Copy link
Copy Markdown
Owner

@copilot I still want the edit and trash can icon in the top right of the checklist box when mouse hovering a checklist on the checklist overview page.

Co-authored-by: robpitcher <13648061+robpitcher@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 19, 2025

@copilot I still want the edit and trash can icon in the top right of the checklist box when mouse hovering a checklist on the checklist overview page.

Added edit (pencil) and delete (trash) icons that appear on hover in the top-right corner of checklist cards. The edit icon opens the checklist for editing, and the delete icon triggers the delete confirmation. Both icons fade in smoothly when hovering over the card.

Checklist Overview with Hover Icons

Commit: Added in the latest commit

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 implements UI enhancements to improve checklist interaction by removing the priority system in favor of category-based organization, adding visual feedback with hover indicators, and replacing browser popups with in-page confirmation dialogs for better accessibility.

Key changes:

  • Removed priority field entirely from Item and ItemResponse types, replacing it with enhanced category functionality
  • Added in-page confirmation dialogs for delete actions (items and checklists in detail view)
  • Added hover indicators (underlines) on clickable elements and hover-visible edit/delete icons on checklist cards
  • Made category labels clickable and editable from both checklist view and item edit mode

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
frontend/src/types/checklist.ts Removed priority field from Item and ItemResponse types; made category optional
frontend/src/components/checklist/ItemRow.tsx Added in-page delete confirmation, category editing via clickable label, hover underline on item names, and category field in edit mode
frontend/src/components/checklist/ChecklistPage.tsx Replaced "New Checklist" with "Delete Checklist" button when viewing a checklist, added in-page delete confirmation, updated category default to empty string
frontend/src/components/checklist/ChecklistOverview.tsx Added hover underline to checklist names, added edit/delete icons with hover effects in card top-right corner
frontend/src/components/checklist/AddItemForm.tsx Removed priority selector, changed category default to empty string, kept category parameter for backward compatibility
frontend/src/components/ChecklistDemo.tsx Removed priority references from demo items
README.md Updated feature list to reflect category-based organization and in-page confirmations
.github/copilot-instructions.md Updated implemented features list with new UI patterns

Comment on lines 4 to +11
interface AddItemFormProps {
checklistId: string;
category: string;
category?: string; // Optional, not used but kept for backward compatibility
onAdd: (checklistId: string, item: Omit<Item, 'id'>) => Promise<void>;
onCancel?: () => void;
}

export function AddItemForm({ checklistId, category, onAdd, onCancel }: AddItemFormProps) {
export function AddItemForm({ checklistId, onAdd, onCancel }: AddItemFormProps) {
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

The category parameter is still defined but no longer used in this component. The comment on line 6 acknowledges this is for "backward compatibility," but since this is an internal component (not a public API), there's no need to maintain backward compatibility. The parameter should be removed entirely from the interface and the function signature to keep the code clean and avoid confusion.

Copilot uses AI. Check for mistakes.
<AddItemForm
checklistId={currentChecklist.id}
category="Miscellaneous"
category=""
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Since the category parameter is no longer used in AddItemForm, passing it here (even as an empty string) is unnecessary and creates dead code. Remove the category="" prop entirely to match the updated component interface.

Suggested change
category=""

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +99
// In-page confirmation for delete
const handleDeleteClick = () => {
setIsDeleting(true);
};

const handleConfirmDelete = async () => {
await onDelete(checklistId, item.id);
};

const handleCancelDelete = () => {
setIsDeleting(false);
};

if (isDeleting) {
return (
<div className="p-3 border border-red-500 rounded bg-red-50">
<div className="space-y-3">
<p className="text-sm text-gray-900">
Delete "{item.name}"?
</p>
<div className="flex gap-2">
<button
onClick={handleConfirmDelete}
className="px-3 py-1 bg-red-600 text-white rounded hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-600"
aria-label="Confirm delete"
>
Delete
</button>
<button
onClick={handleCancelDelete}
className="px-3 py-1 bg-gray-400 text-white rounded hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-gray-400"
aria-label="Cancel delete"
>
Cancel
</button>
</div>
</div>
</div>
);
}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

The new in-page delete confirmation functionality lacks test coverage. Since the repository has comprehensive test infrastructure (Vitest + RTL) and the copilot instructions explicitly recommend adding UI component tests for checklist functionality, this new behavior should be tested. Consider adding tests that verify:

  • Clicking the delete button shows the confirmation UI
  • Clicking "Cancel" dismisses the confirmation
  • Clicking "Delete" calls the onDelete handler and removes the item

Copilot uses AI. Check for mistakes.
Comment on lines +189 to 196
{item.category && (
<span
className={`inline-block mt-1 px-2 py-0.5 text-xs rounded ${
item.priority === 'high'
? 'bg-warning/20 text-warning'
: item.priority === 'optional'
? 'bg-gray-200 text-gray-600'
: 'bg-blue-100 text-blue-600'
}`}
onClick={() => setIsEditing(true)}
className="inline-block mt-1 px-2 py-0.5 text-xs rounded bg-blue-100 text-blue-600 hover:bg-blue-200 cursor-pointer"
>
{item.priority}
{item.category}
</span>
)}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

The category label editing functionality (clicking the category label to enter edit mode) lacks test coverage. Since the repository has comprehensive test infrastructure and this is a key new feature, add tests to verify:

  • Clicking the category label opens edit mode
  • The category field is populated with the current value
  • Saving updates the category correctly
  • Empty category values are stored as undefined

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

UI enhancements for checklist interaction and item management

3 participants