Skip to content

Control visibility of requirements #3249

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

Merged

Conversation

teunhoevenaars
Copy link
Contributor

@teunhoevenaars teunhoevenaars commented Apr 13, 2024

PR that addresses feature request to support controlling visibility of requirement's text

PR Checklist

Please check if your PR fulfills the following requirements:

Additionally:

  • I have added unit tests around new feature

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?

  • requirement text is always visible on diagram
  • requirement box (on diagram) automatically expands in height when more text is added, but does not reduce in height when text is removed

Issue Number: #2967

What is the new behavior?

  • requirement is added to diagram as item (similar to blocks)
  • Whether requirement text is shown on diagram can be toggled in property window of requirements
  • Upon a change in text the height is automatically cropped to the minimum required.

Does this PR introduce a breaking change?

hopefully not, but would love to hear your verdict :)

  • Yes
  • No

Other information

@github-actions github-actions bot added the python Pull requests that update Python code label Apr 13, 2024
covering use of button and auto-reset of height upon text change
@teunhoevenaars teunhoevenaars changed the title Draft: Control visibility of requirements Control visibility of requirements Apr 13, 2024
@teunhoevenaars
Copy link
Contributor Author

hi @marek-piirikivi, I recently discovered gaphor and as an exercise to get to know this library a little better I picked up your feature request (given the first-timers-only flag)! I would love to here if this PR addresses your request adequately :). Many thanks in advance for your feedback.

@teunhoevenaars teunhoevenaars marked this pull request as draft April 13, 2024 20:16
@teunhoevenaars teunhoevenaars marked this pull request as ready for review April 13, 2024 20:39
Copy link
Contributor Author

@teunhoevenaars teunhoevenaars left a comment

Choose a reason for hiding this comment

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

I had some questions while working on this PR, would be fantastic if someone could point me towards the answer

Copy link
Member

@amolenaar amolenaar left a comment

Choose a reason for hiding this comment

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

This looks pretty good already. Really nice to see.

separate Requirement properties from RequirementItem properties
@teunhoevenaars
Copy link
Contributor Author

Thanks a lot for the review @amolenaar! I believe I've processed all your comments :)

@amolenaar
Copy link
Member

Thanks @teunhoevenaars. The code looks really good and it works perfectly!

@all-contributors: Add @teunhoevenaars for code.

@amolenaar amolenaar merged commit f8718c5 into gaphor:main Apr 17, 2024
@teunhoevenaars teunhoevenaars deleted the control_visibility_of_requirements branch April 27, 2024 06:32
@danyeaw danyeaw added feature A new feature and removed python Pull requests that update Python code labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants