Skip to content

Clean up spacing and other things in various parts of the UI#1972

Merged
DevonRD merged 18 commits intoPhotonVision:mainfrom
Gold856:ui-clean-up
Jul 12, 2025
Merged

Clean up spacing and other things in various parts of the UI#1972
DevonRD merged 18 commits intoPhotonVision:mainfrom
Gold856:ui-clean-up

Conversation

@Gold856
Copy link
Member

@Gold856 Gold856 commented Jun 19, 2025

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

New dashboard:
image

Old Camera tab:
image

New Camera tab:
image

Old Calibration Info:
image

New Calibration Info:
image

Old Log Viewer:
image

New Log Viewer:
image

Old Pipeline Creation Dialog:
image

New Pipeline Creation Dialog:
image

Old Factory Reset:
image

New Factory Reset:
image

Old Pipeline Change:
image

New Pipeline Change:
image

Old Import Dialog:
image

New Import Dialog:
image

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • 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

@Gold856 Gold856 requested a review from a team as a code owner June 19, 2025 01:23
@Gold856 Gold856 force-pushed the ui-clean-up branch 2 times, most recently from 4955bf9 to 60ae9d7 Compare June 22, 2025 02:25
samfreund
samfreund previously approved these changes Jun 22, 2025
Copy link
Member

@samfreund samfreund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Gold856 Gold856 force-pushed the ui-clean-up branch 5 times, most recently from bd44745 to fe446b6 Compare July 4, 2025 19:03
@samfreund samfreund enabled auto-merge (squash) July 4, 2025 19:20
@Gold856 Gold856 disabled auto-merge July 4, 2025 19:21
@Gold856 Gold856 force-pushed the ui-clean-up branch 4 times, most recently from 94c6fc5 to 1125d1a Compare July 4, 2025 22:15
@Gold856 Gold856 changed the title Clean up spacing around various parts of the UI Clean up spacing and other things in various parts of the UI Jul 5, 2025
@samfreund samfreund requested a review from Copilot July 11, 2025 02:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refines UI spacing and layout across multiple views and components to achieve a more consistent, slightly more compact look after the Vue 3 upgrade.

  • Reduced global padding on cards and dialogs (24px → 20px) and standardized internal element spacing to 20px.
  • Removed dividers in dialogs, adjusted banner and table header assets, and preserved log view formatting.
  • Cleaned up various component-specific layouts (camera matching, settings cards, dashboard tabs) and introduced reusable spacing utilities.

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
photon-client/src/views/DashboardView.vue Removed top padding on setup card text
photon-client/src/views/CameraMatchingView.vue Added pr-0 on cols, standardized pt-3 for card text
photon-client/src/types/SettingTypes.ts Added index to placeholder camera settings
photon-client/src/components/settings/ObjectDetectionCard.vue Collapsed extra padding, streamlined table columns, added utilities
photon-client/src/components/settings/NetworkingCard.vue Standardized card-title/text padding and divider spacing
photon-client/src/components/settings/MetricsCard.vue Removed global padding, kept only vertical padding on sections
photon-client/src/components/settings/LEDControlCard.vue Wrapped slider in card-text, adjusted title padding
photon-client/src/components/settings/DeviceControlCard.vue Unified dialog and section paddings, removed inline row layouts
photon-client/src/components/settings/ApriltagControlCard.vue Simplified card title/text padding
photon-client/src/components/dashboard/tabs/TargetsTab.vue Updated area unit label, adjusted cell and header padding
photon-client/src/components/dashboard/tabs/OutputTab.vue Wrapped table rows in <thead>/<tbody>
photon-client/src/components/dashboard/ConfigOptions.vue Tweaked card padding from pr-4 pl-4 to pr-5 pl-5 and section spacing
photon-client/src/components/dashboard/CamerasCard.vue Removed obsolete switch margin override
photon-client/src/components/dashboard/CameraAndPipelineSelectCard.vue Replaced inline styles with no-gutters and padding classes
photon-client/src/components/common/pv-switch.vue Removed top padding on switch and added uniform col padding
photon-client/src/components/common/pv-slider.vue Introduced pt-10px pb-10px for slider cols
photon-client/src/components/common/pv-select.vue Added consistent vertical padding classes
photon-client/src/components/common/pv-radio.vue Added uniform padding, removed custom radio-group margins
photon-client/src/components/common/pv-number-input.vue Standardized padding on input cols
photon-client/src/components/common/pv-input.vue Added consistent padding to input cols
photon-client/src/components/cameras/CamerasView.vue Removed card-title padding and switch padding override
photon-client/src/components/cameras/CameraSettingsCard.vue Simplified dialog card text blocks and spacing
photon-client/src/components/cameras/CameraControlCard.vue Removed extra wrappers, consolidated card-text sections
photon-client/src/components/cameras/CameraCalibrationInfoCard.vue Tightened padding on title and container div
photon-client/src/components/cameras/CameraCalibrationCard.vue Extensive refactor of card-text and form section paddings
photon-client/src/components/app/photon-log-view.vue Reduced dialog padding, adjusted log display height
photon-client/src/components/app/photon-log-entry.vue Added white-space: pre-wrap to preserve newlines
photon-client/src/assets/styles/variables.scss Introduced global spacing utilities (pt-10px, pb-10px, etc.)
Comments suppressed due to low confidence (1)

photon-client/src/components/dashboard/tabs/TargetsTab.vue:108

  • Ensure that target.area is already expressed as a percentage (0–100) before appending %; otherwise multiply the fraction by 100 or update the label to avoid misleading users.
                <td class="text-center">{{ target.area.toFixed(2) }}%</td>

Copy link
Contributor

@DevonRD DevonRD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, lgtm

@DevonRD DevonRD merged commit d7e536d into PhotonVision:main Jul 12, 2025
39 checks passed
@Gold856 Gold856 deleted the ui-clean-up branch July 12, 2025 04:43
@Gold856 Gold856 added frontend Having to do with PhotonClient and its related items styling Issue pertaining to styling issues in the PhotonClient labels Jul 12, 2025
@pwbriggs
Copy link

pwbriggs commented Jul 13, 2025

Hey, it looks like this broke the camera calibration flow by hiding the snapshot, cancel, and finish buttons with display: none in CameraCalibrationCard.vue. Thanks!

@Gold856
Copy link
Member Author

Gold856 commented Jul 13, 2025

Oops, my bad! I'll get a fix ready soon. Thanks for letting us know!

mcm001 pushed a commit that referenced this pull request Jul 14, 2025
…bration (#1998)

## Description

Per
#1972 (comment),
camera calibration got broken because I accidently hid the entire
contents of the camera calibration card in #1972. Now, v-show is only
applied to the calibration table so that only the calibration table is
hidden during calibration.

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Having to do with PhotonClient and its related items styling Issue pertaining to styling issues in the PhotonClient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants