Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: for color of edges and ports. #3

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions text/0000_colored-input-output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
- Feature Name: `colored-input-output`
- Start Date: 2024-02-07
- RFC PR: [lf-lang/rfcs#0000](https://github.com/lf-lang/rfcs/pull/0000)
- Tracking Issue(s): [lf-lang/lingua-franca#0000](https://github.com/lf-lang/lingua-franca/issues/0000)

# Abstract
[abstract]: #abstract

Magnition mentioned that input and output ports are hard to differentiate if they are placed on the same reactor side.
Additionally, edges become hard to follow if in large diagrams.
This is currently not solved by the highlighting mechanism since it highlights the edges by making them thick, which results in the same thickness as the busses.

# Motivation
[motivation]: #motivation

We want to add color to make it easier to work with large LF models to make them easier to recognize ports or edges if many objects are on the screen.
This is even more important if we trade layout stability for edge crossings.

Moreover, I want to test this process with a smaller RFC and see if it fits.
I my opinion this is something to be discussed but I intentionally put two different things in here, since I do not want to do an RFC for them both and they are both effect the color scheme.
soerendomroes marked this conversation as resolved.
Show resolved Hide resolved

# Guide-level explanation
[guide-level-explanation]: #guide-level-explanation

The different colors for ports and a proper highlighting for edges improve the readability for browsing big hierarchical models.

When browsing large hierarchical models, which are simplified to have same-side input/output ports, when additionally improves the readability by adding different port colors.
soerendomroes marked this conversation as resolved.
Show resolved Hide resolved

If one wants to follow an edge, you click on it and is highlighted in a bright color.
This also occurs them clicking the port of an edge.

TODO a picture?
soerendomroes marked this conversation as resolved.
Show resolved Hide resolved

# Reference-level explanation
[reference-level-explanation]: #reference-level-explanation

This could be added as a hook in the synthesis to add the necessary options and color the elements as required.

# Drawbacks
[drawbacks]: #drawbacks

Too much color might be distracting and additional synthesis options might clutter of the sidebar.
However, edge highlighting would only occur when one clicks on an edge.
More synthesis options might not be that distracting once klighd-vscode adds favorites to the sidebar.

# Rationale and alternatives
[rationale-and-alternatives]: #rationale-and-alternatives

- We could also experiment different port shapes to differentiate them.

# Prior art
[prior-art]: #prior-art

- SCCharts uses a light blue to highlight clicked edges


# Unresolved questions
[unresolved-questions]: #unresolved-questions

- I would suggest either a blue or orange for highlighting but I am not fixed on that decision
- Colors for ports are still up for discussion, maybe black for input and black border with white fill for outputs?

# Future possibilities
[future-possibilities]: #future-possibilities

This would be the first step to optimize LF for large models that might be used in industry.

I needed roughly 30min for this RFC, just as a reference.