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

Add option to item-directive to hide specific relation-types #389

Merged
merged 12 commits into from
Dec 18, 2024

Conversation

SteinHeselmans
Copy link
Collaborator

@SteinHeselmans SteinHeselmans commented Dec 12, 2024

Add option to item-directive to hide specific relation-types in the rendered item definition.

@Letme
Copy link
Member

Letme commented Dec 12, 2024

Can you also add a test for your new feature?

Should be something short, where no-show would not have link relationship there, while without it by default it would (be asserted). Maybe noshow could be better name as hiderelationship or hidelinks ? What is your use case?

@SteinHeselmans
Copy link
Collaborator Author

I'll check if i can add a test for it, and consider another name. Not a fan of 'hiderelationship' as you might want to reuse it for hiding attributes as well in the future.

Use case: I have documentation items for every release, and for every feature that we implement. Those link to eachother to mark which features go into which release. We also have documentation items for the V-model stuff (requirements, design, test, ...). The V-model-items link to the feature-item that impacts (added/altered) the feature implementation. So that way, we have some sort of history in our V-model doc. Now, you can imagine that the feature-items can have a lot of links as they link to everything in the V-model documentation. To make those links easier to interpret, i added an item-matrix for every layer in the V-model: feature to requirement, feature to design, feature to test, ... These tables give more sorted output and is more organized compared to what we see on the item rendering itself. So i want to hide (or notshow ;-) ) the relations to the V-model on the epic, to remove this clutter.

@Letme
Copy link
Member

Letme commented Dec 13, 2024

If I am looking over the docs then we have a lot of hide stuff, so :hidesource: ,hidetarget, :hidetitle: in item-matrixes so maybe better would be :hidelinks: ?

Looking deeper, we also do have :nocaptions: and :nooverwrite: for example (yay, no consistency) so we could have :nolinks: or noattributes. You do not want to mix attributes and relationships in one flag, so I would keep in mind we want hideattributes option if there would be a use case for this.

In traceability we have sourcetype so :hidetype: (or :notype: since items have no - dont like this one)?

@SteinHeselmans
Copy link
Collaborator Author

I think hidelinks is most consistent amongst what you found, and indeed hideattributes might be a good addition if we ever need it. The hardest part is done, we found a name ;-)

Still working on a new test...

@Letme Letme changed the title Add noshow option to selectively show relations on items Add hidelinks option to selectively show relations on items Dec 13, 2024
@Letme Letme changed the title Add hidelinks option to selectively show relations on items Add hidelinks option to selectively filter rendered relations on items Dec 13, 2024
doc/usage.rst Outdated Show resolved Hide resolved
Co-authored-by: Crt Mori <[email protected]>
@JasperCraeghs
Copy link
Member

JasperCraeghs commented Dec 13, 2024

Hi Stein! I hope you are well. Thank you for contributing.

We never use the term "link" in the name of an option. I am strongly in favor of hidetype.

$ grep -F 'type:' -r mlx -I
mlx/traceability/directives/item_relink_directive.py:        if not reverse_type:
mlx/traceability/directives/item_relink_directive.py:         :type: relationship_type
mlx/traceability/directives/item_link_directive.py:         :type: relationship_type
mlx/traceability/directives/item_tree_directive.py:         :type: <<relationship>> ...
mlx/traceability/directives/item_2d_matrix_directive.py:         :type: <<relationship>> ...
mlx/traceability/directives/item_pie_chart_directive.py:         :sourcetype: <<relationship>> ...
mlx/traceability/directives/item_pie_chart_directive.py:         :targettype: <<relationship>> ...
mlx/traceability/directives/item_pie_chart_directive.py:         :splitsourcetype:
mlx/traceability/directives/item_matrix_directive.py:         :type: <<relationship>> ...
mlx/traceability/directives/item_matrix_directive.py:         :sourcetype: <<relationship>> ...

doc/usage.rst Outdated Show resolved Hide resolved
doc/usage.rst Outdated Show resolved Hide resolved
@SteinHeselmans
Copy link
Collaborator Author

i think all comments are handled, i also added a test. this became an end-to-end test running sphinx completely, as i didn't want to be bothered implementing a test cycling through the docutils objects...

Copy link
Member

@Letme Letme left a comment

Choose a reason for hiding this comment

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

Love the whole sphinx path test. Thanks for your contribution and for improving our test coverage 😉

I will let Jasper do another review as he had more comments, but LGTM.

@SteinHeselmans SteinHeselmans changed the title Add hidelinks option to selectively filter rendered relations on items Add option to selectively hide/show relation-types on items Dec 17, 2024
@JasperCraeghs JasperCraeghs changed the title Add option to selectively hide/show relation-types on items Add option to item-directive to hide specific relation-types Dec 18, 2024
@JasperCraeghs JasperCraeghs merged commit a21db07 into melexis:master Dec 18, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants