Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 99d02a1

Browse files
[nnbd_migration] "Apply migration" button ux/styles
Change-Id: I28d474bf07f66cb5f582e8a190046fea78e7d7b9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138107 Commit-Queue: Mike Fairhurst <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]>
1 parent bb40d68 commit 99d02a1

File tree

4 files changed

+3474
-3419
lines changed

4 files changed

+3474
-3419
lines changed

pkg/analysis_server/lib/src/edit/nnbd_migration/resources/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
<link rel="stylesheet" href="{{ highlightStylePath }}">
88
<style>{{ dartPageStyle }}</style>
99
</head>
10-
<body>
10+
<body class="proposed">
1111
<p class="root">{{ root }}</p>
1212
<header class="elevation-z4">
13-
<h1>Proposed null safety changes</h1>
13+
<h1 class="before-apply">Proposed null safety changes</h1>
14+
<h1 class="after-apply">&#10003; Null safety migration applied</h1>
1415
<h2 id="unit-name">&nbsp;</h2>
16+
<button class="apply-migration before-apply">&#9998; Apply Migration</button>
17+
<button class="apply-migration after-apply" disabled>&#9998; Apply Migration</button>
1518
</header>
1619
<div class="panels horizontal">
1720
<div class="nav-panel">

pkg/analysis_server/lib/src/edit/nnbd_migration/resources/migration.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ body {
1919
overflow: hidden;
2020
}
2121

22+
.proposed .after-apply {
23+
display: none;
24+
}
25+
26+
.applied .before-apply {
27+
display: none;
28+
}
29+
2230
header {
2331
background-color: #1c2834;
2432
height: 48px;
@@ -43,6 +51,12 @@ header h2 {
4351
font-size: 1.2em;
4452
}
4553

54+
header .apply-migration {
55+
right: 0px;
56+
float: right;
57+
margin: 10px;
58+
}
59+
4660
footer {
4761
color: #ccc;
4862
background-color: #27323a;
@@ -357,6 +371,28 @@ a:hover {
357371
fill: #fff;
358372
}
359373

374+
button {
375+
background-color: #33ccff;
376+
border: 2px solid #37aedc;
377+
border-radius: 3px;
378+
padding: 6px 10px;
379+
font-weight: bold;
380+
color: #282828;
381+
}
382+
383+
button:hover {
384+
background-color: #80dfff;
385+
border: 2px solid #52b8e0;
386+
cursor: pointer;
387+
}
388+
389+
button[disabled] {
390+
background-color: #7aa8b8;
391+
color: #507177;
392+
border: 2px solid #507177;
393+
cursor: not-allowed;
394+
}
395+
360396
.placeholder {
361397
color: #777;
362398
text-align: center;

0 commit comments

Comments
 (0)