Skip to content

Commit dda43c8

Browse files
Merge pull request #1235 from NordicSemiconductor/push-rzqyuwyuuwuy
Cleanup: Convert some styling to use Tailwind
2 parents 9bf3676 + c0d22c2 commit dda43c8

File tree

19 files changed

+140
-133
lines changed

19 files changed

+140
-133
lines changed

Changelog.minor.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ release the new version.
5050
- #1216: Sort sources in settings view.
5151
- #1223: Create log for messages from the renderer process in
5252
`nrfconnect/logs/renderer.log`.
53+
- #1235: Move some styling to use Tailwind.
5354

5455
### Fixed
5556

package-lock.json

Lines changed: 29 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"devDependencies": {
107107
"@electron/notarize": "^2.2.0",
108108
"@nordicsemiconductor/nrf-jlink-js": "^0.13.1",
109-
"@nordicsemiconductor/pc-nrfconnect-shared": "^237.0.0",
109+
"@nordicsemiconductor/pc-nrfconnect-shared": "^240.0.0",
110110
"@playwright/test": "^1.16.3",
111111
"@testing-library/user-event": "^14.4.3",
112112
"@types/chmodr": "1.0.0",

resources/css/launcher.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,6 @@ body {
164164
white-space: nowrap;
165165
}
166166

167-
.card + .card {
168-
margin-top: 1rem;
169-
}
170-
171-
#app-sources .row + .row {
172-
margin-top: 1rem;
173-
}
174-
175-
#app-sources .item-name {
176-
font-weight: 500;
177-
font-size: 90%;
178-
}
179-
180167
.modal-title {
181168
font-size: 120%;
182169
}

src/launcher/features/about/About.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@ import Col from 'react-bootstrap/Col';
1111
import Row from 'react-bootstrap/Row';
1212
import { app } from '@electron/remote';
1313

14+
import NrfCard from '../../util/NrfCard';
1415
import WithScrollbarContainer from '../../util/WithScrollbarContainer';
1516

1617
const appVersion = app.getVersion();
1718

1819
export default () => (
1920
<WithScrollbarContainer>
20-
<Card body>
21+
<NrfCard>
2122
<Row>
2223
<Col>
2324
<Card.Title>Version</Card.Title>
2425
</Col>
2526
</Row>
2627
<p>nRF Connect for Desktop v{appVersion}</p>
27-
</Card>
28-
<Card body>
28+
</NrfCard>
29+
<NrfCard>
2930
<Row>
3031
<Col>
3132
<Card.Title>Documentation</Card.Title>
@@ -38,8 +39,8 @@ export default () => (
3839
>
3940
Open documentation
4041
</Button>
41-
</Card>
42-
<Card body>
42+
</NrfCard>
43+
<NrfCard>
4344
<Row>
4445
<Col>
4546
<Card.Title>License</Card.Title>
@@ -106,6 +107,6 @@ export default () => (
106107
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
107108
THE POSSIBILITY OF SUCH DAMAGE.
108109
</p>
109-
</Card>
110+
</NrfCard>
110111
</WithScrollbarContainer>
111112
);

src/launcher/features/launcherUpdate/__snapshots__/UpdateAvailableDialog.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ exports[`UpdateAvailableDialog shows the new version if one becomes available 1
6868
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
6969
>
7070
<button
71-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
71+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
7272
type="button"
7373
>
7474
Yes
7575
</button>
7676
<button
77-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
77+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
7878
type="button"
7979
>
8080
No

src/launcher/features/launcherUpdate/__snapshots__/UpdateProgressDialog.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ exports[`UpdateProgressDialog can have a version, percent downloaded, and be can
130130
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
131131
>
132132
<button
133-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
133+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
134134
type="button"
135135
>
136136
Cancel
@@ -208,7 +208,7 @@ exports[`UpdateProgressDialog has cancelling disabled after being cancelled 1`]
208208
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
209209
>
210210
<button
211-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
211+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
212212
disabled=""
213213
type="button"
214214
>
@@ -287,7 +287,7 @@ exports[`UpdateProgressDialog has cancelling disabled when 100 percent complete
287287
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
288288
>
289289
<button
290-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
290+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
291291
disabled=""
292292
type="button"
293293
>

src/launcher/features/proxyLogin/__snapshots__/ProxyErrorDialog.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ exports[`ProxyErrorDialog is displayed after users canceled the login 1`] = `
6363
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
6464
>
6565
<button
66-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
66+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
6767
type="button"
6868
>
6969
Close

src/launcher/features/proxyLogin/__snapshots__/ProxyLoginDialog.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ exports[`ProxyLoginDialog is displayed after a login is requested 1`] = `
8686
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
8787
>
8888
<button
89-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
89+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
9090
type="button"
9191
>
9292
Login
9393
</button>
9494
<button
95-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
95+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
9696
type="button"
9797
>
9898
Cancel
@@ -214,13 +214,13 @@ exports[`ProxyLoginDialog is updated if users enter a username 1`] = `
214214
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
215215
>
216216
<button
217-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
217+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
218218
type="button"
219219
>
220220
Login
221221
</button>
222222
<button
223-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
223+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
224224
type="button"
225225
>
226226
Cancel

src/launcher/features/releaseNotes/__snapshots__/ReleaseNotesDialog.test.tsx.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ exports[`ReleaseNotesDialog is displayed for an uninstalled app 1`] = `
5151
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
5252
>
5353
<button
54-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
54+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
5555
type="button"
5656
>
5757
Install
5858
</button>
5959
<button
60-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
60+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
6161
type="button"
6262
>
6363
Close
@@ -120,7 +120,7 @@ exports[`ReleaseNotesDialog is displayed for an up-to-date installed app 1`] = `
120120
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
121121
>
122122
<button
123-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
123+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
124124
type="button"
125125
>
126126
Close
@@ -183,13 +183,13 @@ exports[`ReleaseNotesDialog is displayed for an updatable app 1`] = `
183183
class="tw-preflight tw-flex tw-flex-row-reverse tw-justify-start tw-gap-2 tw-border-none tw-p-4 modal-footer"
184184
>
185185
<button
186-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
186+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700 "
187187
type="button"
188188
>
189189
Update to latest version
190190
</button>
191191
<button
192-
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
192+
class="tw-preflight tw-h-8 tw-px-4 tw-text-sm tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50 "
193193
type="button"
194194
>
195195
Close

0 commit comments

Comments
 (0)