feat: allow renaming history entries#1918
Open
mvanhorn wants to merge 4 commits intomermaid-js:developfrom
Open
feat: allow renaming history entries#1918mvanhorn wants to merge 4 commits intomermaid-js:developfrom
mvanhorn wants to merge 4 commits intomermaid-js:developfrom
Conversation
✅ Deploy Preview for mermaidjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Add an edit button next to each history entry name. Clicking it turns the name into an editable text input. Press Enter or click away to save, Escape to cancel. The rename persists to localStorage via the existing store pattern. Fixes mermaid-js#967
9cfaf91 to
1d9695d
Compare
Member
|
Hi @mvanhorn, PR looks good, need some more tweaks to handle edge cases.
|
… tests - Make rename input required and reject empty names in both UI and store - Add CSS truncation with ellipsis for long entry names (max 150px) - Move edit button inline next to name text, smaller icon - Add rename test coverage (rename manual, auto, targeted entry) - Fix pre-existing eslint error on external revision link (add rel=external)
Author
|
Addressed in 47649f6:
|
Member
Member
- Edit icon now appears inline to the right of the name (like GitHub) - Name truncation uses flex + min-w-0 instead of hardcoded 150px - Name grows within available space, only truncates when needed
Author
|
Addressed both in 9c4acc3:
|
Member
Remove min-w-fit from history list container and add overflow-hidden to the name row so long names truncate with ellipsis instead of pushing action icons off screen. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
Fixed in c15c0f2 - the |
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.






History entries get random slug names, making it hard to find a specific save point. This adds a rename button so you can give entries meaningful names.
Click the edit icon next to any entry name. The name turns into a text input. Hit Enter or click away to save. Escape to cancel. The new name persists to localStorage through the existing store.
Two files changed:
Per @sidharthv96's UX spec in #967.
Fixes #967
This contribution was developed with AI assistance (Codex).