ModelInference / perfume-frontend

Web-based frontend for Perfume tool
Other
1 stars 0 forks source link

Dagre D3 display optimization #103

Closed bestchai closed 4 years ago

bestchai commented 4 years ago

What:

Why:

How to measure completeness:

[Issue created by stanleyrya: 2015-10-20] [Last updated on bitbucket: 2015-10-27]

[Comment created by stanleyrya: 2015-10-27] Posting this link for later - it could be helpful with resizing the model

http://cpettitt.github.io/project/dagre-d3/latest/demo/etl-status.html

[Comment created by stanleyrya: 2015-10-27] :( The link you added leads to a 404.

[Comment created by ohmann: 2015-10-27] I only ask you to do this merge because there were merge conflicts in multiple files, and it would take me a lot longer than it would take you to know which of the versions is the best and newest.

[Comment created by ohmann: 2015-10-27] I fixed the model overlapping the legend in 500908f6a672, but this branch has gotten a bit out of date with us merging in a bunch of your other fixes from other branches. Can you do "hg up -r 500908f6a672" and then "hg merge default" to get this (forked off version of) issue/70 up to date? If so, I will merge it in.

[Comment created by stanleyrya: 2015-10-26] I'm still a bit confused on why this isn't working on your end. Right now what should happen is the legend will resize itself when there is not enough space to display it. So when the user is looking at a three panel view, they will usually end up seeing the first two parts of the legend on one line and then one below them. When the panel shrinks or if the screen size is smaller, the legend parts will show up vertically on top of each other.

If the panel was shrunk, the legend ends up being drawn as three small lines. Then the only way for this is to redraw the canvas, fixing the "mysterious lines" :)

I suppose we could throw in code to check the size and not display anything if the panel is below a specific size, but I don't think it is very necessary.

[Comment created by ohmann: 2015-10-27] After your merging, I made some little improvements (most importantly borders around the panes) and merged in: e994bc774017

[Comment created by stanleyrya: 2015-10-27] @ohmann:

Should be up to date with default now :) - 3e7598a216f9

[Comment created by ohmann: 2015-10-26] When the model pane is collapsed, the legend snaps to three lines (red, blue, and fuchsia) which seem out of place and meaningless. When the pane is expanded, the legend sits with the three mysterious lines, then snaps to the real legend when the expansion animation finishes.

While the old way didn't allow for as much canvas space in which to view the model, the legend was less weird and hacky seeming (it just stayed expanded always). There are advantages to this new code, but it would be nice to improve it further before we merge it in, since it's only an interface improvement rather than a mission-critical fix.

[Comment created by stanleyrya: 2015-10-26] I believe the legend should resize itself to be seen when it would be cut off. What makes the resizing look odd?

[Comment created by ohmann: 2015-10-26] Besides the overlapping issue, the changes within this branch also make the legend switch its layout oddly when the model tab is expanded or minimized. I think we should hold off merging these changes in until these things are smoothed out a little.

[Comment created by ohmann: 2015-10-27] @stanleyrya In case I wasn't clear in my previous comment, you're free to do the merging that I was talking about last night (above). Sorry for not realizing that I'd forgotten to set this up properly last night.

[Comment created by ohmann: 2015-10-27] Creating a second head for this branch is too messy and complicated, so I pushed the reset button feature into issue #81. I will then remove any related edits from this branch, and you can merge them into a branch for that issue instead. Finally, I'll be able to push the model overlapping fix.

[Comment created by stanleyrya: 2015-10-22] @ohmann:

Some of this is ready to be merged. Right now it dynamically resizes both the legend and model, however the recenter button is going to take more work. I say we sideline it until after the assignment, unless I get a chance to look into it more later.

Just for clarification, don't merge in the two most recent revisions, those are for the recenter button.

Changesets ready to merge:
e1a4fdd42c13, d0012aa9b084, d35851641616

[Comment created by ohmann: 2015-10-24] The model seems always to be displayed over the top of the legend right now. If you fix this and make a new issue for just the "reset" functionality, I'll merge this in.

[Comment created by stanleyrya: 2015-10-24] The way it is currently implemented, there is no easy way to move the model or have it be displayed under the legend. If we set it to under, there is a large white box that cuts off the model as the user moves it around near the legend.

I suggest us keeping it this way for the assignment and making another other issue for recentering like you suggested.