-
Notifications
You must be signed in to change notification settings - Fork 1
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
Hide span details in structure tab #291
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Where's that class being used? 🤔 Couldn't find reference to it anywhere.
Hiding with CSS may break if class names change in the TraceView so if we want to go this route I think we should have a test that would ensure elements are really hidden. Also, wouldn't it be nicer if we added a new property to TraceView to control it?
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.
I've added it to the trace view in the Grafana repo PR.
I've also had a look at creating a test for this e.g. render the Traces panel and make sure that some of the child components of the span detail are not visible but it's kind of tricky to mock / provide dummy data for the Structure Tab :( do you have any suggestions?
Adding a new property is a nice touch and was almost going to do that but thought it's a bit overkill for this. We already hide the minimap, header, span and resource accordions via styling in Explore Traces and wanted to hide span details in the same way rather than introduce a new prop that will probably only be used by the app and may confuse users.
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.
The risk is that if TraceView is refactored it may affect the app. Adding tests could help to catch if it happens but only if we tested the app against the latest version of Grafana so it's still quite fragile. I think it's also confusing that we have CSS classes in Grafana that are used outside of Grafana. They become part of a public contract we rely on.
To me it looks like tech debt that can fire back at some point. For backwards compatibility we may need to keep CSS hacks anyway so feel free to go with it but I'd suggest switching to something more explicit in long run 👍