threat-dragon icon indicating copy to clipboard operation
threat-dragon copied to clipboard

v2 - reduce window white space for bigger model display

Open injcristianrojas opened this issue 4 years ago • 12 comments

When working with bigger models, the model working area is too small, and it also replicates in the generated PDF. It even shows when zooming in. I include an example:

image

Describe the solution you'd like:

  • More space to work, and less blank space.
  • (Optional) zoom controls just for the model.

Working on Fedora Linux 33, using RPM version from the repo.

injcristianrojas avatar Jan 06 '21 20:01 injcristianrojas

Hello @injcristianrojas This is a very good point, and it has been a problem for some time - thanks for putting it so clearly.

The root cause is that we are using the open version of jointjs, and this has a lot of limitations for Threat Dragon. We would like to migrate to using draw.io whicch would give the ability to properly zoom in and out, drag sections of the diagram, and so on. All the good stuff that we should expect.

The (vague) plan is to try and migrate to draw.io for version 2 of TD, and this would be done in the core of TD: https://github.com/OWASP/threat-dragon-core/projects

Are you able to help with this migration to draw.io? We could do with help in this area

jgadsden avatar Jan 09 '21 06:01 jgadsden

I will check it out.

injcristianrojas avatar Jan 09 '21 19:01 injcristianrojas

@jgadsden I don't have a way of simply launching the app on desktop (on the core repo), or should I switch to the desktop repo?

injcristianrojas avatar Jan 17 '21 18:01 injcristianrojas

Hello @injcristianrojas - the core repo is common to both the threat dragon web app at: https://github.com/OWASP/threat-dragon and the desktop app at : https://github.com/OWASP/threat-dragon-desktop

so I agree that we can not run the core repo by itself, so I tend to use the desktop app for developing / testing the core repo. I think @mike-goodwin and @andk123 tend to use the web app during development of the core, so it is a personal preference.

If you want to get started on developing threat dragon core there are some dev notes that may help: https://github.com/OWASP/threat-dragon-core/blob/main/dev-notes.md#development

We definitely need help migrating to draw.io , so anything in this area would be great

jgadsden avatar Jan 17 '21 18:01 jgadsden

Hello @injcristianrojas - I have started the project to use draw.io as the drawing package for Threat Dragon. This drawing package will sort out the working area, so you should see this when version 2.0 comes out

jgadsden avatar Jan 29 '21 16:01 jgadsden

Transferred to threat dragon repo

jgadsden avatar Jul 08 '21 07:07 jgadsden

With version 2.0 of Threat Dragon we see the same problem, screenshot attached. We need the 'Properties' and 'Threats' Panes to be docked with the lower edge of the window, so that the drawing area and 'Entities' panes can expand to fill the gap.

Note that this also happens with the web app version, just zoom out to see the effect.

threat-dragon-white-space

jgadsden avatar Feb 10 '22 15:02 jgadsden

@taoyiyang1 - the tutorials/documentation for the drawing package is here : https://x6.antv.vision/en/docs/tutorial/about

Is this issue something you could help with?

jgadsden avatar Feb 11 '22 07:02 jgadsden

With version 2.0 of Threat Dragon we see the same problem, screenshot attached. We need the 'Properties' and 'Threats' Panes to be docked with the lower edge of the window, so that the drawing area and 'Entities' panes can expand to fill the gap.

I'm hoping we can do better with the placement of these panes as well! As it is, it's not looking so great on smaller screens. :(

If memory serves me, the height for the graph is currently hard-coded in pixels. This could even be as simple as changing it to use view-height as the unit with a min-size property?

lreading avatar Feb 11 '22 22:02 lreading

Hello @lreading - absolutely agree, and you are best placed to do this one My thought here was that @taoyiyang1 could help out with the actual tutorials and documentation for antv? As 陶一阳 does not have a language barrier here

Could we assign this issue to both of you?

jgadsden avatar Feb 12 '22 05:02 jgadsden

It turns out the graph area isn't super responsive by default (Google translate is leaving a little to be desired in the responsive section of the x6 docs). This means we might need to watch for window resizing events (or zoom events, if such a thing exists?) and redraw. That might have some performance implications... We could debounce the events to help mitigate that a bit.

I'm going to try to think of a better solution for this before committing anything. If anyone has ideas, please do share! :smile:

lreading avatar Feb 12 '22 18:02 lreading

你好@lreading - 绝对同意,你最适合做这个 我的想法是@taoyiyang1可以帮助提供antv 的实际教程和文档?因为陶一阳在这里没有语言障碍

我们可以把这个问题分配给你们两个吗?

@jgadsden Of course, @lreading you can consult me ​​if you have difficulty reading a certain part of the document

taoyiyang1 avatar Feb 21 '22 06:02 taoyiyang1

The diagram area is now working as required in version 2.0 : https://www.threatdragon.com/ So this can now be closed

jgadsden avatar Aug 31 '22 10:08 jgadsden