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

[DebuggerV2] Fix a few CSS issues in overall layout #3721

Merged
merged 2 commits into from
Jun 9, 2020

Conversation

caisq
Copy link
Contributor

@caisq caisq commented Jun 9, 2020

  • Motivation for features / changes
    • Fix a few CSS issues in DebuggerV2's overall layout
  • Technical description of changes
    • The issues fixed include:
      1. The top-section and bottom-section of the overall layout doesn't have
        box-sizing: border-box; and hence overflows by the amount of border
        and padding, causing scroll bars to appear. This is fixed by applying the
        said CSS property.
      2. The top section has three children. They some times wrap undesirably
        (e.g., when zoom ratio is <100%) This is fixed by applying
        white-space: nowrap.
      3. The stack trace component at the lower-right corner doesn't have height
        set and hence grows downward beyond the bound. This is fixed by
        height: 100%
        • Before: image
        • After: image
      4. The scroll list for stack frames in stack trace component has a width
        that doesn't take into account the padding on the left of the parent element,
        which causes the scroll bar to go out of bound.
        • Before: image
        • After: image

@@ -45,6 +45,8 @@ limitations under the License.
height: 300px;
overflow-x: hidden;
overflow-y: auto;
/* Minus padding-left of the parent (stack-trace-container). */
width: calc(100% - 8px);
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of keeping track of all the padding of parents in mind, just use flex (with justify-content: stretch) where possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Normally yes, but StackTraceComponent is already flex in the column (vertical direction), which makes horizontal stretching a little complex. It's less complex to do it this way.

@caisq caisq marked this pull request as ready for review June 9, 2020 15:40
@caisq caisq merged commit 468aa68 into tensorflow:master Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants