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

Fix some issues in diagrams #369

Merged
merged 5 commits into from
Jan 8, 2024
Merged

Fix some issues in diagrams #369

merged 5 commits into from
Jan 8, 2024

Conversation

ewuerger
Copy link
Member

@ewuerger ewuerger commented Dec 22, 2023

Several changes needed for the realization_view diagram feature in the context-diagrams project.

@Wuestengecko
Copy link
Member

Wuestengecko commented Jan 2, 2024

This PR is a draft with no activity for a while. Did you mean to submit it for review, or is there still work to be done here?

(Also, as first review comment: the last commit message is cut off.)

@@ -31,7 +31,7 @@ class Styling:
def __init__(
self, diagram_class: str | None, class_: str, prefix: str = "", **attr
):
self._diagram_class = diagram_class
self._diagram_class = diagram_class or ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems unnecessary. Is this a left-over from a previous iteration, or is it actually needed somewhere I can't see/find?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diagram_class can be None. There was a point were I didn't want to do the or ... stuff repetitively, which was removed again. So it is not needed anymore.

}
if "class" in builder.label:
textattrs["class_"] = builder.label["class"]

if transform := getattr(builder.labelstyle, "transform", None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing a detail in this new branch, but how does this handle multi-line labels? The new code doesn't seem to call any functions related to that. Are those calls not needed here after all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are probably needed, but I only tested it on single line text labels.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll simply raise an error for all unsupported cases for now. Something to worry about later. :)

@Wuestengecko Wuestengecko changed the title Fix-diagrams Fix some issues in diagrams Jan 8, 2024
@Wuestengecko Wuestengecko merged commit 1a1d604 into master Jan 8, 2024
6 checks passed
@Wuestengecko Wuestengecko deleted the fix-diagrams branch January 8, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants