Skip to content

Fix/prompt card styling - #21

Merged
NaviAndrei merged 2 commits into
mainfrom
fix/prompt-card-styling
Jul 2, 2026
Merged

Fix/prompt card styling#21
NaviAndrei merged 2 commits into
mainfrom
fix/prompt-card-styling

Conversation

@NaviAndrei

Copy link
Copy Markdown
Owner

No description provided.

- ExportModal.tsx: new portal modal with backdrop + Escape close,
  reusing TemplateManager's createPortal/.modal-overlay pattern
- PromptList.tsx: drop onExportMD/onExportJSON, add single onExport;
  .prompt-actions reduced from 6 to 5 buttons
- Verified: open/close/backdrop/Escape/320px no overflow
- .prompt-list.list .prompt-card: add shadow-sm + 3px primary border-left
- .prompt-list.grid .prompt-header h4: move height:3rem clamp here only
- Verified: 375/768/1024 light+dark, grid unchanged, 320px no overflow
@NaviAndrei NaviAndrei self-assigned this Jul 2, 2026
Copilot AI review requested due to automatic review settings July 2, 2026 14:33
@NaviAndrei
NaviAndrei merged commit b1b8f65 into main Jul 2, 2026
4 checks passed
@NaviAndrei
NaviAndrei deleted the fix/prompt-card-styling branch July 2, 2026 14:36

Copilot AI 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.

Pull request overview

This PR updates prompt card presentation across grid/list views and refactors per-prompt export into a single “Export” action that opens a dedicated modal to choose the export format.

Changes:

  • Moves title clamping/alignment styling to apply only in grid view, and adds additional list-view card styling.
  • Replaces the two export buttons on each prompt card with a single export action that opens a new ExportModal.
  • Introduces a new export modal UI offering Markdown and JSON download options.

Reviewed changes

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

File Description
src/index.css Adjusts prompt-card styling for grid/list modes, including title clamping and list-card accents.
src/components/PromptList.tsx Refactors export interactions to open a modal and wires in the new modal state.
src/components/ExportModal.tsx Adds a new modal component to choose Markdown vs JSON export.

Comment thread src/index.css
Comment on lines +1069 to +1076
.prompt-list.grid .prompt-header h4 {
height: 3rem;
display: -webkit-box;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
Comment on lines +19 to +25
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') onClose();
};
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
}, [onClose]);
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