Skip to content

Conversation

@lessej
Copy link
Collaborator

@lessej lessej commented May 18, 2025

Context

Adjusts the styling of the camera admin mobile to be mobile friendly.

@lessej lessej self-assigned this May 18, 2025
color: 'var(--colors-gray7)',
...(!isSearchable && {
'> div': { margin: '2px' },
'> input': { display: 'none' },
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason, when isSearchable is false, it still adds an input element to the dom which messes up the padding. This fixes the issue

Copy link
Member

@nathanielrindlaub nathanielrindlaub Oct 17, 2025

Choose a reason for hiding this comment

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

This makes me a bit nervous - have made sure this doesn't have any unintended consequences on desktop on other fields where isSearchable is false? Also for these kinds of notes can you add them as comments so future devs know why this is there?

Updating this: this does make all selects shorter across the app on desktop. This is an interesting catch, but I'm not sure how comfortable I am making this change in general without a thorough evaluation of the implications, and if we do roll with it it should be it's own PR, IMO. How necessary is this to make now? Is it important for the mobile UI?

</>
}
>
{cam.deployments.map((dep) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored this into DeploymentItem.jsx

@lessej lessej requested a review from nathanielrindlaub May 18, 2025 06:46
@lessej
Copy link
Collaborator Author

lessej commented May 18, 2025

Please feel free to start looking through the code. I will deploy to dev this week and give a final look over that nothing is obviously broken. Thank you!

@lessej
Copy link
Collaborator Author

lessej commented May 19, 2025

Few issues to fix after testing on dev:

  • The modal top and bottom are covered by the safari top and bottom bar
  • Edit serial number text box has too much padding
  • Delete camera modal should use full width buttons and the text box has too much padding

@lessej lessej marked this pull request as ready for review May 20, 2025 02:27
@lessej
Copy link
Collaborator Author

lessej commented May 20, 2025

Hi @nathanielrindlaub, this should be ready for review. I've poked it around on dev. Some things that I'd be grateful if you could look at are adding a deployment, deleting a camera, and deleting a deployment. I don't have the info to be able to re-add them so I didn't want to follow through deleting them but we should make sure that the middleware and redux updates don't break anything.

@lessej lessej mentioned this pull request May 29, 2025
2 tasks
{image && (
<>
<ImageMetadata image={image} />
<LoupeDropdown image={image} />
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems like this got removed again in the most recent merge to main so readding it here

Copy link
Member

@nathanielrindlaub nathanielrindlaub left a comment

Choose a reason for hiding this comment

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

I think this needs some more testing and a thorough side-by-side comparison with prod to make sure nothing unexpected changed. I didn't do a full review because I'm noticing a bunch of things that are broken, which I'll list here but I would not consider this comprehensive. The things I caught (mostly in Firefox for iOS) were:

Issues with the actions in the "..." menus:

  1. Creating new deployments doesn't seem to work. The form seemed to submit fine but then the new deployments don't show up (I only tried on mobile)
  2. Changing the camera's serial number causes the front end to crash
  3. When trying to delete a camera, the Keyboard covers the input so you can't type "permanently delete"

Unrelated to this PR (I just tested on prod) but I noticed that we don't confirm that a wireless camera registration was successful. I'll make a separate ticket for that. The Wireless cam registration and unregistration did work here though.

Styling issues:

  1. Deployment names are shortened to the point of being unreadable. If you are looking to save space, I would hide the deployment date ranges entirely (which seem to be broken anyhow):
IMG_6003 2. not sure how controllable this is, but every time I select an input field the top like ~60 pixels of the modal disappears then reappears 3. The spinner overlay doesn't cover the bottom part of the modal after submitting "add deployment": Screenshot 2025-10-17 at 8 59 46 AM
  1. There are styling issues this PR introduced on desktop. Here are two I noticed but there may be more:

Screenshot 2025-10-17 at 9 05 03 AM

color: 'var(--colors-gray7)',
...(!isSearchable && {
'> div': { margin: '2px' },
'> input': { display: 'none' },
Copy link
Member

@nathanielrindlaub nathanielrindlaub Oct 17, 2025

Choose a reason for hiding this comment

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

This makes me a bit nervous - have made sure this doesn't have any unintended consequences on desktop on other fields where isSearchable is false? Also for these kinds of notes can you add them as comments so future devs know why this is there?

Updating this: this does make all selects shorter across the app on desktop. This is an interesting catch, but I'm not sure how comfortable I am making this change in general without a thorough evaluation of the implications, and if we do roll with it it should be it's own PR, IMO. How necessary is this to make now? Is it important for the mobile UI?

@lessej
Copy link
Collaborator Author

lessej commented Oct 20, 2025

Working through this, I've addressed the following:

  • When trying to delete a camera, the Keyboard covers the input so you can't type "permanently delete". made this alert scrollable. Need to investigate ways to scroll to the input when you click on it
  • fixed spinner not covering full dialog
  • fixed dates alignment
  • fixed names being shortened: full length names and add dates as the tooltip
  • register camera dropdown spacing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants