From 85f418ba25df76d5a9eb7c89902a29611efafdea Mon Sep 17 00:00:00 2001 From: Pablo Gamito Date: Sun, 14 Nov 2021 00:45:02 +0100 Subject: [PATCH] Polish design of Winscope dropbox Make sure loading spinner is center aligned Ensure the size of dropbox remains the same before and while loaded so it doesn't look like it's flickering Make dropbox clickable to allow for intuitive clicking of dropbox area to open file viewer Bug: 206214877 Change-Id: Icc5c2bdfce9fd26c3ff6f040f85a289859cfd3ca --- tools/winscope/src/DataInput.vue | 61 +++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/tools/winscope/src/DataInput.vue b/tools/winscope/src/DataInput.vue index df715b94d..0c89b061e 100644 --- a/tools/winscope/src/DataInput.vue +++ b/tools/winscope/src/DataInput.vue @@ -19,27 +19,34 @@
Open files
-
- +
+ {{FILE_ICONS[file.type]}} {{file.filename}} ({{file.type}}) close - +
+ +
-

- Drag your .winscope or .zip file(s) here to begin +

+ Drag your .winscope or .zip file(s) or click here to begin

@@ -554,12 +561,6 @@ export default { background: rgb(224, 224, 224); } - .dropbox p { - font-size: 1.2em; - text-align: center; - padding: 50px 10px; - } - .dropbox { outline: 2px dashed #448aff; /* the dash box */ outline-offset: -10px; @@ -569,9 +570,29 @@ export default { min-height: 200px; /* minimum height */ position: relative; cursor: pointer; + display: flex; + flex-direction: column; + align-items: center; + justify-items: center; } - .progress-spinner { + .dropbox p, .dropbox .progress-spinner-wrapper { + font-size: 1.2em; + margin: auto; + } + + .progress-spinner-wrapper, .progress-spinner { + width: fit-content; + height: fit-content; display: block; } - \ No newline at end of file + + .progress-spinner-wrapper { + padding: 1.5rem 0 1.5rem 0; + } + + .dropbox .uploaded-files { + background: none!important; + width: 100%; + } +