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

Flyout metrics #4684

Merged
merged 11 commits into from Mar 10, 2021
Merged

Flyout metrics #4684

merged 11 commits into from Mar 10, 2021

Conversation

alschmiedt
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Proposed Changes

Flyout workspaces should use their own metrics manager.

Behavior Before Change

  • Calling getMetrics on a flyout's workspace would only return a subset of metrics.
  • If you can squint very hard you can tell that the padding at the front of a horizontal toolbox used to be too large.
    Screen Shot 2021-03-05 at 4 59 20 PM

Behavior After Change

  • Calling getMetrics on a flyout's workspace should return all metrics.
  • Padding at the front of the toolbox is the correct side.
    Screen Shot 2021-03-05 at 4 58 50 PM

Reason for Changes

Test Coverage

Documentation

Additional Information

I am fairly confident this matches the old behavior. However, I am not confident yet that the metrics are correct. There still looks like there is something weird going on with the absolute and view metrics.

core/flyout_horizontal.js Outdated Show resolved Hide resolved
core/flyout_vertical.js Outdated Show resolved Hide resolved
Comment on lines 615 to 619
if (this.flyout_.horizontalLayout) {
return this.getHorizontalViewMetrics_(opt_getWorkspaceCoordinates);
} else {
return this.getVerticalViewMetrics_(opt_getWorkspaceCoordinates);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need separate getHorizontalViewMetrics_ and getVerticalViewMetrics_ methods. I would instead just check for horizontal layout inside the method when you subtract the scrollbar padding.

core/metrics_manager.js Outdated Show resolved Hide resolved
core/workspace_svg.js Show resolved Hide resolved
@moniika moniika self-assigned this Mar 8, 2021
@alschmiedt alschmiedt merged commit 869e4eb into google:develop Mar 10, 2021
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.

None yet

2 participants