mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 04:26:32 +08:00
The helpers allow the implementation of screenshot tests in DevTools. A screenshot test that makes use of the helpers is added for the performance panel. The test is disabled because no screenshot test infrastructure is available in our bots. Once this isn't the case the test can be enabled and other screenshot tests added. Screenshot tests are not added as a dedicated new suite but as complementary to the interaction tests already in place. For this purpose, the existing artifacts under test/screenshots/ are removed or moved to be under test/interactions. The image_diff executables are moved under third_party Follow-up: Include dedicated lint rules files. Bug: 1407638 Change-Id: I7106769b085b6aaa32ea4a089a840418c83536bb DISABLE_THIRD_PARTY_CHECK=Including new library to third_party/ Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190012 Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Andres Olivares <andoli@chromium.org>
214 lines
3.3 KiB
CSS
214 lines
3.3 KiB
CSS
/**
|
|
* Copyright 2020 The Chromium Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
--max-width: 1600px;
|
|
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
header {
|
|
height: 85px;
|
|
background: #0083c3;
|
|
color: #fff;
|
|
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 50%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
z-index: 3;
|
|
}
|
|
|
|
header h1,
|
|
header h2 {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
margin: 0;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
header h1 .file,
|
|
header h2 .percentage {
|
|
font-weight: normal;
|
|
}
|
|
|
|
.header-container,
|
|
.shortcut-container {
|
|
width: 100%;
|
|
max-width: var(--max-width);
|
|
padding: 0 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
.shortcuts {
|
|
background: #003b59;
|
|
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 50%);
|
|
height: 48px;
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.diff {
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
position: fixed;
|
|
z-index: 10;
|
|
pointer-events: none;
|
|
background: rgb(0 0 0 / 70%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
opacity: 0%;
|
|
transition: opacity 0.2s cubic-bezier(0, 0, 0.4, 1);
|
|
}
|
|
|
|
.diff.visible {
|
|
opacity: 100%;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
main {
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
max-width: var(--max-width);
|
|
padding: 0 20px;
|
|
flex: 1;
|
|
}
|
|
|
|
.main-container {
|
|
padding: 40px 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-gap: 40px;
|
|
display: grid;
|
|
}
|
|
|
|
main img,
|
|
.diff img {
|
|
max-width: 100%;
|
|
border: 1px solid #d0d0d0;
|
|
box-shadow: 0 6px 7px 0 rgb(0 0 0 / 11%);
|
|
background: #fff;
|
|
cursor: pointer;
|
|
}
|
|
|
|
main img.selected {
|
|
outline: 6px solid rgb(255 0 120 / 60%);
|
|
}
|
|
|
|
main h3 {
|
|
font-size: 14px;
|
|
color: #303942;
|
|
}
|
|
|
|
footer {
|
|
height: 48px;
|
|
background: #333;
|
|
padding: 12px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
footer button {
|
|
margin-left: 10px;
|
|
padding: 4px 8px;
|
|
border-radius: 2px;
|
|
background: none;
|
|
border: 1px solid #fff;
|
|
color: #fff;
|
|
}
|
|
|
|
footer button[disabled] {
|
|
opacity: 40%;
|
|
}
|
|
|
|
.status {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
|
|
.shortcut-container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: left;
|
|
color: #fff;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
max-width: var(--max-width);
|
|
}
|
|
|
|
.shortcut-container h3 {
|
|
font-size: 10px;
|
|
padding-right: 30px;
|
|
}
|
|
|
|
.shortcut-container ul {
|
|
list-style: none;
|
|
display: flex;
|
|
padding: 0;
|
|
}
|
|
|
|
.shortcut-container li {
|
|
padding-right: 18px;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.shortcut-container li::before {
|
|
content: '';
|
|
padding: 3px 8px;
|
|
border-radius: 3px;
|
|
border: 1px solid rgb(255 255 255 / 70%);
|
|
margin-right: 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.shortcut-container li.shortcut-golden::before {
|
|
content: '←';
|
|
}
|
|
|
|
.shortcut-container li.shortcut-generated::before {
|
|
content: '→';
|
|
}
|
|
|
|
.shortcut-container li.shortcut-confirm::before {
|
|
content: 'Enter';
|
|
}
|
|
|
|
.shortcut-container li.shortcut-skip::before {
|
|
content: 's';
|
|
}
|