drawio icon indicating copy to clipboard operation
drawio copied to clipboard

Feature: Allow embedding one page in another

Open lukas-mertens opened this issue 1 year ago • 4 comments

  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Is your feature request related to a problem? Please describe. I am using draw.io to create mockups a lot. Sometimes I create complex components which are shown in different areas of my application. Copy & Pasting them is not really maintainable. When changes are done to the original component, I have to do the changes to all other versions of the component as well.

Describe the solution you'd like Allow embedding one page in another. This could be as simple as a rectangle which can be scaled larger/smaller which provides a "view only" rendering of another pages content scaled in a object-fit: contain way if you understand what I mean. Powerpoint has a similar feature which allows you to render one slide inside another slide

Describe alternatives you've considered Alternatives could be

  • Linked Groups: A feature to link groups and it's copies together. When changes are done to one copy of the group they are reflected in all copies. This would probably be even better, but probably harder to develop?

lukas-mertens avatar May 06 '24 12:05 lukas-mertens

Why doesn't background pages currently meet your requirements.

davidjgraph avatar May 06 '24 15:05 davidjgraph

@davidjgraph Even though I didn't know this feature (looks nice) it doesn't quite solve what I need. Let's make an example:

Let's say I design some fancy chat component: CleanShot 2024-05-06 at 20 19 35@2x and a fancy video player: CleanShot 2024-05-06 at 20 20 05@2x

Now I create multiple pages which all feature the video player and the chat component at different locations. I could only select one of the two, either the chat or the video player.

CleanShot 2024-05-06 at 20 22 24@2x CleanShot 2024-05-06 at 20 22 46@2x

This could be solved if the image component had the exact same option though (to set a background from another page). Then you could add multiple "images" which are just rendered versions of other pages. This would also allow rescaling if you want to embed the other page slightly smaller than the original for example

lukas-mertens avatar May 06 '24 18:05 lukas-mertens

Thanks for the clarification. It's a relatively complex feature to implement and would benefit few users, so I deem it unlikely it would be implemented.

davidjgraph avatar May 07 '24 05:05 davidjgraph

@davidjgraph I understand where you are coming from and can totally understand that there are probably a lot of other things to do, but to me it felt like "draw.io is such a powerful tool, how is it that this is missing"? The reason: Every major mockup solution, e.g. Adobe XD, Figma etc. has a solution to easily reuse stuff. Now I understand: draw.io is mainly about diagrams. Mockups are a niche usecase. But let me just go into a few other usecases if we would change this feature a bit:

Let's change the feature request a bit: We add a new property to shapes: SyncedGroup. It is a text field in which I can enter any identifier. Now, when duplicating the group, we sync all changes to this shape and all its children, except position, scale and page, to all other instances which have the same syncedgroup identifier. This way you could use this feature for a lot of other usecases as well. Let's say I make an object diagram of some datastructure, e.g. a tree: CleanShot 2024-05-07 at 09 01 28@2x

Now I would like to rename TreeNode to TreeObject for some reason. I would have to go into every shape and change it individually. If they were all synced, I could simply change the text in one and it would synced to all other instances.

Next step: I want to visualize something like e.g. an interface and want to add a circle for some reason: CleanShot 2024-05-07 at 09 03 21@2x

If they were synced it would be replicated to all instances. As it is right now I have to copy manually. I hope you can see the amount of usecases that such a feature would have, but if you need additional examples, I could go on :) I am happy to hear your thoughts about this!

lukas-mertens avatar May 07 '24 07:05 lukas-mertens

You have made your point extensively, but we're not going to implement this. Thank you for the suggestion.

davidjgraph avatar May 14 '24 12:05 davidjgraph