Skip to content

[clang][dataflow] Show triangle in <details> element. #67431

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
merged 3 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions clang/lib/Analysis/FlowSensitive/HTMLLogger.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,21 @@ code.line:has(.bb-select):before {
font-size: x-small;
flex-grow: 1;
}
.value summary {
.value > summary {
background-color: #ace;
display: flex;
justify-content: space-between;
cursor: pointer;
}
.value > summary::before {
content: '►';
margin-right: 0.5em;
font-size: 0.9em;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this, the triangle seemed a bit too big.

Copy link
Collaborator

Choose a reason for hiding this comment

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

no accounting for taste I suppose :-)

}
.value[open] > summary::before {
content: '▼';
}
.value > summary > .location {
Copy link
Collaborator

Choose a reason for hiding this comment

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

the second > here is a little confusing to me, it doesn't seem to solve a problem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, it doesn't solve a problem ("space" would work just as well), but as the .location is always a direct child of the <summary>, it seemed more specific to do it this way.

Is "descendant", rather than "child", considered to be the default in CSS? The former is syntactically shorter, but "child" is arguably the simpler concept. Or is "child" problematic because it makes the CSS more brittle (i.e. less resilient in the fact of changes to the HTML)?

margin-left: auto;
}
.value .address {
font-size: xx-small;
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Analysis/FlowSensitive/HTMLLogger.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<template data-if="v.value_id"><span class="address">#{{v.value_id}}</span></template>
</span>
<template data-if="v.location">
<span>{{v.type}} <span class="address">@{{v.location}}</span></span>
<span class="location">{{v.type}} <span class="address">@{{v.location}}</span></span>
</template>
</summary>
<template
Expand Down