umple / umple

Umple: Model-Oriented Programming - embed models in code and vice versa and generate complete systems
https://www.umple.org
MIT License
258 stars 196 forks source link

Add a separate scrollbar for generated code section in UmpleOnline #1698

Open shoevancar opened 3 years ago

shoevancar commented 3 years ago

Summary

Within the UmpleOnline, the users can generate code (e.g. Java, C++, etc) based on the models. In a sample scenario, a user can create a large model and generate the source code accordingly. For a large model, the source code is expected to be large also. Therefore, it becomes very tough for the users to scroll all the way down to peek at the source code, and then again scrolling all the way up to change the model. As the model development is an incremental process, scrolling up/down to the entire webpage can affect the user's efficiency.

Steps to Reproduce

  1. Click the "Tools" menu item, select the example as "Class Diagrams >> Afghan Rain Design".
  2. Under the "Generate" section, select the target programming language as "Java Code". Click "Generate It". image
  3. Scroll down and look at the source code at line # 2489. This is the implementation of "WorkerRole" model. image
  4. Now, scroll up to the "WorkerRole" model and add a new attribute called "has_manager".
  5. Click the "Generate It" and scroll down to line # 2489 again to see the changes in the source code.

As the scrollbar is applied to the entire website, the users cannot easily navigate (scroll up) to the model section and change it. It takes a while to go to the top and do any required changes.

Expected Feature

There should a separate scrollbar for the generated source code section. The separate scrollbar is already implemented for the diagram and UML code section at the top. But it is missing for the "generated code" section. In this way, the webpage should always have a fixed length. Scrolling up/down between the code and modeling sections should be much faster.

TimLethbridge commented 3 years ago

I think this would not be a wise change.

Firstly, the total scroll distance in the website is dominated by the length of the generated code, so "It takes a while to go to the top and do any required changes." would be very similar

Secondly, after generating, the 'back' button gets the user back to the Umple model area. Granted this might not be obvious.

Thirdly, with modern browsers a gesture (e.g. two finger swipe) can 'whip' the user rapidly to the top.

Adding a scrollbar would actually make reaching the top of the model with a gesture a two step process as a separate scrollbar would only take the user to the top of the generated code, where, they would have to scroll again.

Finally, the generated code is not normally intended to be a 'model' then 'look at generated code changes' repeated loop. Most of the time people would just model. If they generate we expect it to be mostly for downloading and occasional examination only.

If anything similar to this issue ends up being doing, it would have to be after extensive user studies (observation, plus surveying).

TimLethbridge commented 3 years ago

Do not do this issue without discussion with the team and after analysis with users.