Fix/prompt card styling - #21
Merged
Merged
Conversation
- 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
There was a problem hiding this comment.
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 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]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.