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 Activity Swimlanes aren't visible #2996

Merged
merged 4 commits into from
Jan 10, 2024
Merged

Fix Activity Swimlanes aren't visible #2996

merged 4 commits into from
Jan 10, 2024

Conversation

amolenaar
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

Any item with a Box shape and no children, does not draw.
This goes for Swimlanes (partitions), but also rectangles.

Issue Number: #2988

What is the new behavior?

Swimlanes are shown again.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The Box shape had a `__len__` attribute, that rendered the Box
false-ish.
@amolenaar amolenaar requested a review from danyeaw January 9, 2024 16:16
@github-actions github-actions bot added the python Pull requests that update Python code label Jan 9, 2024
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Great fix @amolenaar!

I'm not sure if this is related to this bug, but shouldn't be make the default size of Swimlanes a bit larger?
image

@danyeaw danyeaw added fix A fix for a bug and removed python Pull requests that update Python code labels Jan 9, 2024
@amolenaar
Copy link
Member Author

That should not be too hard.

@amolenaar amolenaar linked an issue Jan 9, 2024 that may be closed by this pull request
3 tasks
@amolenaar
Copy link
Member Author

This is also a regression. In 2.22.1 the lanes are wider by default.

Add some dummy boxes to ensure a minimal width.
@github-actions github-actions bot added the python Pull requests that update Python code label Jan 9, 2024
@amolenaar
Copy link
Member Author

@danyeaw I added some dummy boxes to ensure a minimal width. This broke since empty boxes no longer yield false in if-stamenets, hence the update code of ElementPresentation was executed, updating the min_width property.

The proper solution is to break it up in shapes, for text and the actual swimlanes. I think we lack a few features there still.

@danyeaw danyeaw merged commit cee1bbf into main Jan 10, 2024
20 checks passed
@danyeaw danyeaw deleted the fix-swimlanes branch January 10, 2024 01:07
@danyeaw danyeaw changed the title Fix swimlanes Fix Activity Swimlanes aren't visible Jan 10, 2024
@danyeaw danyeaw mentioned this pull request Jan 10, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Swimlanes aren't displayed
2 participants