Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the Ability to Share Database Diagrams via Links #75

Open
Javekson opened this issue Apr 29, 2024 · 3 comments
Open

Adding the Ability to Share Database Diagrams via Links #75

Javekson opened this issue Apr 29, 2024 · 3 comments

Comments

@Javekson
Copy link

We propose adding a feature that allows users to create links to their database diagrams and share them with other participants. This will enable users to quickly and easily exchange their data models, facilitating collaboration and learning.

@micatonge
Copy link

Hi! Id like to work on this :)

@1ilit
Copy link
Member

1ilit commented Apr 29, 2024

Hi @micatonge, how do you plan on implementing this

@micatonge
Copy link

@1ilit
In the ControlPanel.jsx file, I added a button component wrapped in a tooltip to enable users to share links to their database diagrams. When clicked, the shareLink function constructs the full URL of the diagram by appending the unique diagramId to the base URL obtained from window.location.origin. Then, it copies this URL to the clipboard using the navigator.clipboard.writeText() method. Upon successful copying, I set the tooltipVisible state to true, displaying a tooltip indicating that the link has been copied. After 3 seconds, the tooltip is hidden again. This functionality allows users to easily share their diagrams with others for collaboration and learning purposes.

In the App.jsx file, I updated the React Router configuration to include a dynamic route parameter :diagramId in the path /editor/:diagramId. This allows the application to handle URLs with specific diagram identifiers. When a user navigates to a URL like /editor/1, React Router matches it to the corresponding route and passes the diagramId as a parameter to the Editor component. This enables the Editor component to load the corresponding diagram based on the provided diagramId, facilitating seamless navigation and collaboration within the application.

In addition to enabling users to share links to their database diagrams, I believe it's essential to incorporate authorization mechanisms to ensure data security and privacy. Similar to the UI/UX design of Canva, where shared documents can only be accessed by users with appropriate permissions, our application should implement similar functionality.

When a user shares a link to a database diagram, the link should be associated with specific access permissions. This could involve generating unique tokens or access codes tied to the shared diagram, which are then validated upon access. Additionally, users should have the ability to set permissions when sharing a diagram, specifying whether recipients can view, edit, or comment on the diagram.

From a UI/UX perspective, this authorization process can be seamlessly integrated into the sharing workflow. When generating a share link, users should be presented with options to configure access permissions. This could be achieved through intuitive dropdown menus or checkboxes allowing users to specify who can access the diagram and what actions they can perform.

Furthermore, the application should provide clear notifications and prompts to users when accessing shared diagrams, indicating the level of access granted and prompting users to sign in or authenticate if necessary. By prioritizing data security and user privacy in the sharing feature's design, we can enhance user trust and confidence in our application.

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

No branches or pull requests

3 participants