feat: Display diagram ID in URL for better sharing and navigation#777
Open
feat: Display diagram ID in URL for better sharing and navigation#777
Conversation
- Add updateUrlWithDiagramId method to update URL with current diagram ID - Modify setCurrentItem to update URL when opening/switching diagrams - Ensure new items get IDs in createNewItem method - Ensure forked items get new IDs in forkItem method - Handle lastCode items to have IDs for URL display - Use replaceState to avoid cluttering browser history - Skip URL updates for desktop app environment This allows users to see and share direct links to specific diagrams.
- Add comprehensive documentation explaining the new URL feature - Include implementation details and testing instructions - Document benefits and technical considerations
🚨 Bugbot Trial ExpiredYour Bugbot trial has expired. Please purchase a license in the Cursor dashboard to continue using Bugbot. |
- Remove blocking alert when multiple tabs are opened - Gracefully fallback to non-persistent mode for additional tabs - First tab gets persistence, subsequent tabs work without persistence - Change tracking from 'multiTabError' to 'multiTabFallback' - Maintain full functionality in all tabs while allowing concurrent usage - Improve user experience by removing tab limitation Fixes the longstanding issue where opening the app in multiple browser tabs was blocked with an error message. Now users can work with multiple diagrams simultaneously across different tabs.
- Add multi-tab support section to documentation - Document the graceful Firestore persistence fallback approach - Update implementation details and technical notes - Include both URL feature and multi-tab support in overview
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.
🎯 What this PR does
This PR implements the ability to display the current diagram ID in the URL, making it easier for users to share direct links to specific diagrams and bookmark them.
✨ Key Features
🔧 Technical Implementation
Core Changes
updateUrlWithDiagramId()method usingwindow.history.replaceState()setCurrentItem()to automatically update URL when diagrams are loadedcreateNewItem()to ensure new items get unique IDsforkItem()to generate new IDs for forked diagramsURL Format
https://app.zenuml.com/?id=<diagram-id>https://app.zenuml.com/(clean URL)🧪 Testing
The feature has been tested on the development server (http://localhost:3001). Expected behavior:
?id=<new-id>📋 Checklist
🎨 User Experience Benefits
📝 Files Changed
src/components/app.jsx: Core URL updating logicFEATURE-URL-DIAGRAM-ID.md: Comprehensive documentationReady for review! 🚀