Skip to content

Commit d7e536d

Browse files
authored
Clean up spacing and other things in various parts of the UI (#1972)
## Description After the Vue 3 upgrade, the spacing for various UI elements was left inconsistent in many places. Dialogs were hit especially hard and had some very inconsistent spacing. Additionally, the 24 pixels of padding around all cards was noted as a waste of space and unnecessary, so it has been shrunk down to 20 pixels to make the UI a tiny bit more compact and to make it visually closer to some parts of the UI that have 16 pixels of padding (the camera views are the most notable example). Padding between input elements has also been reduced to 20 pixels (this required some hackery to get consistent sizes on input elements, since switches and sliders have different heights.) Some other minor UI tweaks were made, such as removing the divider between dialog contents and dialog buttons because it visually looks better, shrinking the banner padding so it doesn't displace as much content, making the banner background one uniform color instead of a highlight around the icon, fixing the targets tab so that the columns stop shifting around when the values change, preserving newlines in the log view, cleaning up the object detection UI, and making the import dialogs have consistently inset input elements. Old dashboard: ![image](https://github.com/user-attachments/assets/409c7ddd-4b7d-4535-9f3f-3970d9dd85f8) New dashboard: ![image](https://github.com/user-attachments/assets/587ac540-1d6d-40e5-9c6b-00697bab6cbc) Old Camera tab: ![image](https://github.com/user-attachments/assets/2f1d50a1-131f-4fb7-8617-e1cb4dc5504c) New Camera tab: ![image](https://github.com/user-attachments/assets/6d5581b7-faff-400a-8e34-e3abf00e0af6) Old Calibration Info: ![image](https://github.com/user-attachments/assets/81133cc1-c861-4746-9b1e-8320312037de) New Calibration Info: ![image](https://github.com/user-attachments/assets/0de5935c-84a7-4606-bbc1-8e6d227b7b60) Old Log Viewer: ![image](https://github.com/user-attachments/assets/f2c32a10-3353-4781-93d7-8e0ffa8ca7fe) New Log Viewer: ![image](https://github.com/user-attachments/assets/0aeee866-c182-4e80-9025-56bf383d714f) Old Pipeline Creation Dialog: ![image](https://github.com/user-attachments/assets/a0eb368d-d9af-4cb3-8d9c-fcd12a5caf36) New Pipeline Creation Dialog: ![image](https://github.com/user-attachments/assets/f05f34a3-f42e-4e8f-9ccd-171a48980b8f) Old Factory Reset: ![image](https://github.com/user-attachments/assets/9c16a7f7-a454-4ee4-8574-98abf9b94e2d) New Factory Reset: ![image](https://github.com/user-attachments/assets/fb67888c-c4f1-4e8e-9d02-6943e7a918eb) Old Pipeline Change: ![image](https://github.com/user-attachments/assets/3acb215a-6639-4d50-a4e6-18b50c3ec1bd) New Pipeline Change: ![image](https://github.com/user-attachments/assets/a2b18582-cdbd-407c-9690-f11aecf78c76) Old Import Dialog: ![image](https://github.com/user-attachments/assets/ff43b0bd-3f99-44e5-97fa-c250cd331790) New Import Dialog: ![image](https://github.com/user-attachments/assets/7ec46023-d47a-45d7-80b8-6881b812300e) ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2024.3.1 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added
1 parent dbbb00f commit d7e536d

29 files changed

+565
-479
lines changed

photon-client/src/App.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ if (!is_demo) {
7373
<style lang="scss">
7474
@use "@/assets/styles/settings";
7575
@use "@/assets/styles/variables";
76+
@use "sass:map";
7677
77-
@media #{map-get(settings.$display-breakpoints, 'md-and-down')} {
78+
@media #{map.get(settings.$display-breakpoints, 'md-and-down')} {
7879
html {
7980
font-size: 14px !important;
8081
}

photon-client/src/assets/styles/variables.scss

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "@fontsource/prompt";
1+
@use "@fontsource/prompt";
22

33
$default-font: "Prompt", sans-serif !default;
44
$body-font-family: $default-font;
@@ -24,10 +24,51 @@ html {
2424
background: #005281 !important;
2525
}
2626

27-
.v-card__title {
27+
.v-banner {
28+
padding: 4px !important;
29+
}
30+
31+
.v-card-title,
32+
.v-dialog > .v-overlay__content > .v-card > .v-card-title,
33+
.v-dialog > .v-overlay__content > form > .v-card > .v-card-title {
34+
padding: 20px;
2835
word-break: break-word !important;
2936
}
3037

38+
.v-card-text,
39+
.v-dialog > .v-overlay__content > .v-card > .v-card-text,
40+
.v-dialog > .v-overlay__content > form > .v-card > .v-card-text {
41+
font-size: 1rem;
42+
padding: 20px;
43+
}
44+
45+
.v-card-subtitle,
46+
.v-dialog > .v-overlay__content > .v-card > .v-card-subtitle,
47+
.v-dialog > .v-overlay__content > form > .v-card > .v-card-subtitle {
48+
font-size: 1rem;
49+
padding: 20px;
50+
}
51+
3152
.v-field__input {
3253
padding: 0px !important;
3354
}
55+
56+
.pb-10px {
57+
padding-bottom: 10px !important;
58+
}
59+
60+
.pt-10px {
61+
padding-top: 10px !important;
62+
}
63+
64+
.pl-10px {
65+
padding-left: 10px !important;
66+
}
67+
68+
.pr-10px {
69+
padding-right: 10px !important;
70+
}
71+
72+
.pa-10px {
73+
padding: 10px !important;
74+
}

photon-client/src/components/app/photon-log-entry.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ const logColorClass = computed<string>(() => {
2222
<template>
2323
<div :class="logColorClass">[{{ source.timestamp.toTimeString().split(" ")[0] }}] {{ source.message }}</div>
2424
</template>
25+
<style scoped>
26+
div {
27+
white-space: pre-wrap;
28+
}
29+
</style>

photon-client/src/components/app/photon-log-view.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ document.addEventListener("keydown", (e) => {
7474

7575
<template>
7676
<v-dialog v-model="useStateStore().showLogModal" width="1500" dark>
77-
<v-card class="dialog-container pa-6" color="primary" flat>
77+
<v-card class="dialog-container pa-5" color="primary" flat>
7878
<!-- Logs header -->
7979
<v-row class="pb-3">
8080
<v-col cols="4">
@@ -168,7 +168,7 @@ document.addEventListener("keydown", (e) => {
168168
169169
.log-display {
170170
/* Dialog data size - options */
171-
height: calc(100% - 66px);
171+
height: calc(100% - 56px);
172172
padding: 10px;
173173
background-color: #232c37 !important;
174174
border-radius: 5px;

0 commit comments

Comments
 (0)