sverweij / mscgen_js

text => sequence charts
https://mscgen.js.org
GNU General Public License v3.0
207 stars 25 forks source link

Feature request: Option to add labels to bottom of the chart #236

Closed oboff closed 8 years ago

oboff commented 8 years ago

I'd like to have ability to see the label boxes on bottom row of chart in addition to top row.

sverweij commented 8 years ago

How would that help you? In what situations would you use this option?

(B.t.w. I assume you mean something like this?): like this?

oboff commented 8 years ago

Yes, exactly that. Especially on mobile, as you go down on sufficiently large diagram, easier to look down and see labels than have to scroll up and lose context tracking back.

sverweij commented 8 years ago

Ah, so you're looking to alleviate that 'hunting around' on bigger diagrams.

Duplicating the entities on the bottom is one of the solutions; I'll look into it. I'm also looking for other options to improve the 'hunting around' situation. E.g. Freezing the first row. Or an onionskin overlay which shows the entities on hover (/ activate)?

(b.t.w. => do you use sequence charts on mobile/ small displays a lot?)

sverweij commented 8 years ago

Onion skin doodad: onion-skin

sverweij commented 8 years ago

Change of plan - see next comment

@oboff I've created a PR which adds a mirrorentitiesonbottom option to the msgenny and xu languages. By default it is off; enable it like so:

mirrorentitiesonbottom=true;

Alice => Bob : do something funny;
Bob => pocket : fetch (nose flute);
Bob >> Alice : PHEEE!;
Alice => Alice: hihihi;

I've deployed the feature branch for you to play with:

=> Let me know what you think!

Some notes:

  • You'll see the syntax highlighting doesn't recognize it yet - codemirror's mscgen mode (which also covers msgenny and xù) isn't updated (yet).
  • I have some doubts whether I should keep this as part of the language(s) or a separate render option (like the experimental stylesheet feature in the atom mscgen preview package)
  • I have tried the onion skin thing and while the concept still appeals (and is a potentially better solution), getting the UX right is not easy.
sverweij commented 8 years ago

@oboff a little change in plans:

Here's a [simple sample](https://mscgen.js.org/branches/feature/big-chart-navigation/index.html?lang=msgenny&mirrorentities=true&msc=Alice %3D> Bob %3A do something funny%3B%0ABob %3D> pocket %3A "fetch %28nose flute%29"%3B%0ABob >> Alice %3A PHEEE!%3B%0AAlice %3D> Alice%3A hihihi%3B), and here's a less simple sample

miror

oboff commented 8 years ago

That's perfect!