Skip to content

Commit

Permalink
[DebuggerV2] Fix a few CSS issues in overall layout (#3721)
Browse files Browse the repository at this point in the history
* 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](https://user-images.githubusercontent.com/16824702/84164271-5346d000-aa40-11ea-9cb2-5cb185581609.png)
        * After: ![image](https://user-images.githubusercontent.com/16824702/84164598-b5073a00-aa40-11ea-9577-0b7e8042fe98.png)
    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](https://user-images.githubusercontent.com/16824702/84164968-21823900-aa41-11ea-93f7-8fa8ee755445.png)
        * After: ![image](https://user-images.githubusercontent.com/16824702/84164875-0a434b80-aa41-11ea-958b-0677c52c2e73.png)
  • Loading branch information
caisq authored Jun 9, 2020
1 parent 63daa98 commit 468aa68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,25 @@ limitations under the License.
==============================================================================*/

.bottom-section {
box-sizing: border-box;
border-top: 1px solid rgba(0, 0, 0, 0.12);
height: 34%;
padding-top: 6px;
width: 100%;
}

.debugger-container {
box-sizing: border-box;
background-color: #fff;
height: 100%;
overflow: hidden;
}

.top-section {
box-sizing: border-box;
height: 66%;
padding: 6px 0;
white-space: nowrap;
width: 100%;
}

Expand Down Expand Up @@ -56,6 +61,7 @@ tf-debugger-v2-source-files {

tf-debugger-v2-stack-trace {
display: inline-block;
height: 100%;
width: 30%;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ limitations under the License.
}

.stack-frame-array {
height: 300px;
overflow-x: hidden;
overflow-y: auto;
/* Minus padding-left of the parent (stack-trace-container). */
width: calc(100% - 8px);
}

.stack-frame-container {
Expand Down Expand Up @@ -87,8 +88,9 @@ limitations under the License.

.stack-trace-container {
border-left: 1px solid rgba(0, 0, 0, 0.12);
display: flexbox;
flex-direction: column;
box-sizing: border-box;
display: flex;
flex-flow: column;
font-size: 10px;
font-family: 'Roboto Mono', monospace;
height: 100%;
Expand Down

0 comments on commit 468aa68

Please sign in to comment.