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

Flamegraph: Various clean-up in prep for d3.flameGraph update #215

Merged
merged 3 commits into from
Nov 19, 2017

Conversation

Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Nov 13, 2017

No description provided.

@@ -1,14 +1,13 @@
.d3-flame-graph rect {
stroke: #fff;
stroke: #EEEEEE;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unknown property 'stroke'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(false-negative)

fill-opacity: .8;
}

.d3-flame-graph .frame {
.d3-flame-graph rect:hover {
stroke: #474747;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unknown property 'stroke'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(false-negative)

.d3-flame-graph .frame {
.d3-flame-graph rect:hover {
stroke: #474747;
stroke-width: 0.5;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unknown property 'stroke-width'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(false-negative)

/* Use white stroke instead of grey, to make them invisible on our background */
body .d3-flame-graph rect,
body .d3-flame-graph rect:hover {
stroke: #fff;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unknown property 'stroke'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(false-negative)

body .d3-flame-graph rect,
body .d3-flame-graph rect:hover {
stroke: #fff;
stroke-width: 1px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unknown property 'stroke-width'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(false-negative)

background: #fff;
border-radius: 6px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(0, 0, 0, 0.2);
Copy link
Contributor

Choose a reason for hiding this comment

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

Fallback border (hex or RGB) should precede RGBA border.

}
/**
* PATCH(xhgui): Remove all .d3-flame-graph-tip styles
* We have our own tip styles in xhgui.css instead.
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this comment long term?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it'd make sense to keep yeah.

I'm working on another pull request that updates d3 to version 4, and updates d3-tip and d3-flameGraph. As part of such file-replacing commits, seeing the two PATCH comments in the removal diff is a reminder that the file was modified and needs to be re-modified the same way.

Ideally we wouldn't have these patches (undocumented fork, modification of lib files) as it wouldn't be possible in the first place if this were installed via npm or bower. But given we have the local patch for now, rather than the file just missing it and accidentally adding it back when updating the file, we need to document it.

Alternatively, I could move the d3-flameGraph to a separate directory with a PATCHES file. If you prefer that.

@markstory markstory self-assigned this Nov 15, 2017
This is already loaded from layout/base.twig, and currently ends up
being included (and executed) twice.
Follows-up 71f521e.

* Undo the overrides and place them in xhgui.css instead.
* Add a class "xhgui-flamegraph" to the main chart element
  so that we can uniquely address flamegraphs within xhgui
  with a higher CSS specificity selector (using the same selector
  as in d3.flameGraph.css won't work given that they have the
  same weight, and load order would break the tie, which currently
  means the upstream one applies last, use a stronger selector
  instead of relying on load order).

This is in preparation of upgrading d3.flameGraph to a newer
version from upstream.

Ref perftools#211.
Follows-up 0ff9af8.

* Move the overrides to xhgui.css instead.
* Given the complexity of these overrides, don't try to undo
  each original style, but simply document that all
  d3-flame-graph-tip styles should be omitted when updating.
* Document the d3.flameGraph.js patch.

* Add ignore for pre-existing issues with csslint. Since
  sticker-ci was enabled without passing on current code first.
  Also, these issues are false negatives, and are bugs in csslint,
  not bugs in xhgui code.

Ref perftools#211.
@markstory markstory merged commit 3279066 into perftools:master Nov 19, 2017
@Krinkle Krinkle deleted the flamegraph branch November 19, 2017 19:41
@glensc glensc mentioned this pull request Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants