-
Notifications
You must be signed in to change notification settings - Fork 26
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 hide tree edges #7296
Conversation
@fm3 (or @frcroth) I am struggling with the tracing store as the newly added skeleton update action The tracingstore currently throws the following error: Could you please help me out here and add the necessary changes? And maybe you know whether wklibs needs to be adjusted to comply with the newly added property. |
Sure, we can add that. Just to make sure I’m understanding this correctly: There is a new update action that sets for a specific tree the I’m wondering if the boolean’s naming is ideal. Since trees also have Related: Should we also adapt the NML format? In this case, we could indeed also adapt the python libs to get/set this boolean. But I’d say adapting the libs not super important/urgent. |
I hope so, yes 😅. But we can talk about my changes a little before you start so you only make the necessary changes. You text me when you want to start :)
I noticed the same thing in the middle of coding these changes. Thus I simply applied your suggestion and renamed the property to
Oh yeah, that's right. I think I already adjusted the reading nml in the frontend. But the writer still needs to be adjusted 👍. I added the point to the ToDos. |
@MichaelBuessemeyer I added the backend changes, please see if they work for you as intended :) Note that we decided against adapting NML (and thus the python libs) for the moment, compare https://scm.slack.com/archives/C5AKLAV0B/p1693224632337739?thread_ts=1684748763.542109&cid=C5AKLAV0B Looks like the snapshot tests fail, possibly because the proto is now slightly different with the new property? Let me know if I need to change anything for that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me overall 👍 why didn't you need to adapt the edge_shader, though? don't the edges support alpha and 0.5 is then interpreted as 0, anyway? I think, you will need to change this, since the #7136 PR added alpha support for edges (because these can get half-transparent when going from one t value to another).
And another note: We have a generic update-tree-action which could have been used for updating the edgesAreVisible parameter. However, now that we have the dedicated update action, it's also fine :)
@@ -721,6 +722,7 @@ export function parseNml(nmlString: string): Promise<{ | |||
isVisible: _parseFloat(attr, "color.a") !== 0, | |||
groupId: groupId >= 0 ? groupId : DEFAULT_GROUP_ID, | |||
type: _parseTreeType(attr, "type", TreeTypeEnum.DEFAULT), | |||
edgesAreVisible: _parseBool(attr, "edgesAreVisible", true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only for parsing right? what about serialization? can be invoked via the trees-tab ("save selected trees as nml" or sth like that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I did not take care of serialization. Internally we agreed to postpone the support of the new edgesAreVisible
field in nmls. Thus I did not implement any NML support besides what is needed for typescript. This line is needed because the created object currentTree
in line 712
, because the field edgesAreVisible
is required by this object. Alternatively, I could set the value to always be true, if you prefer this variation over already trying to parse a value that is not yet serialized, I would also be fine with that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, makes sense :)
Exactly 👍
Ok, I'll find a way 👍
🤔 I was following the way the visibility of the whole tree is updated. This has its own action. But this is potentially due to multiple of these update actions later being combined into a single action. |
I think there is no harm in the dedicated update action. I’m not certain anymore, but I think the update action for the tree visibility was introduced because of backwards compatibility. There are old update actions stored in fossildb, as they are applied lazily in the backend. When applying those, we would have to interpret the missing field, and consider whether it should mean the visibility is not changed, or is set to true. While introducing that logic would be fine by me as well, the dedicated action is fine for me as well. The only downside might be a busier history. Philipp, if you think it would be better to unify this into the update tree action, we can certainly do it as well. |
This pr works perfectly together with the changes of the nd dataset pr. There were no changes needed from my side and it still works 💯
I also fixed the icon in dark mode and increased the size of the rectangles a little. |
Yes, I agree.
Awesome 👍 Will test now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, works great for me :)
This PR makes it possible for users to hide the edges of tree and also persist this setting.
URL of deployed dev instance (used for testing):
Steps to test:
TODOs:
[ ] Maybe also adapt wklibs client (as the trees have a new property)decided to defer that[ ] Adapt NML reading & writingdecided to defer thatIssues:
(Please delete unneeded items, merge only when none are left open)