Custom notifications suspend duration UI#23286
Conversation
NickM-27
left a comment
There was a problem hiding this comment.
Overall I think this looks fine, but the radix comment and logic is overcomplicated and I don't think it is needed.
|
Thanks for the PR, there are a number of issues that would need to be addressed before we would consider merging.
|
|
@NickM-27 & @hawkeye217 Took the liberty of using |
| <DropdownMenuTrigger | ||
| className={cn(selectTriggerClassName, "w-auto gap-2")} | ||
| > | ||
| {t("notification.suspendTime.suspend")} | ||
| <LuChevronDown className="h-4 w-4 opacity-50" /> | ||
| </DropdownMenuTrigger> |
There was a problem hiding this comment.
| <DropdownMenuTrigger | |
| className={cn(selectTriggerClassName, "w-auto gap-2")} | |
| > | |
| {t("notification.suspendTime.suspend")} | |
| <LuChevronDown className="h-4 w-4 opacity-50" /> | |
| </DropdownMenuTrigger> | |
| <DropdownMenuTrigger asChild> | |
| <Button size="sm" variant="outline" className="flex gap-2"> | |
| {t("notification.suspendTime.suspend")} | |
| <LuChevronDown className="h-4 w-4 opacity-50" /> | |
| </Button> | |
| </DropdownMenuTrigger> |
A dropdown is fine, but just use a <Button> like the rest of the codebase does. No need to modify the select.tsx component for this.
| DropdownMenuSeparator, | ||
| DropdownMenuTrigger, | ||
| } from "@/components/ui/dropdown-menu"; | ||
| import { selectTriggerClassName } from "@/components/ui/select"; |
There was a problem hiding this comment.
| import { selectTriggerClassName } from "@/components/ui/select"; |
This line can be deleted.
There was a problem hiding this comment.
All the changes in this file can be reverted if you use a <Button> as I suggested.
| return ( | ||
| <div className={cn("w-full", className)}> | ||
| <ContextMenu key={camera} onOpenChange={handleOpenChange}> | ||
| <ContextMenu key={camera} modal={false} onOpenChange={handleOpenChange}> |
There was a problem hiding this comment.
| <ContextMenu key={camera} modal={false} onOpenChange={handleOpenChange}> | |
| <ContextMenu key={camera} onOpenChange={handleOpenChange}> |
Your AI shouldn't have added this here.
| "initializeCommand": ".devcontainer/initialize.sh", | ||
| "postCreateCommand": ".devcontainer/post_create.sh", | ||
| "overrideCommand": false, | ||
| "remoteUser": "vscode", |
There was a problem hiding this comment.
I don't think this should be removed, especially not in this PR
There was a problem hiding this comment.
Sorry, accidentally committed changes for IntelliJ IDEA to work with the dev container. Removed
| sudo chown -R "$(id -u):$(id -g)" /media/frigate | ||
| SUDO="" | ||
| if [[ $EUID -ne 0 ]]; then | ||
| SUDO="sudo" |
There was a problem hiding this comment.
Same as above, unrelated change
There was a problem hiding this comment.
Sorry, accidentally committed changes for IntelliJ IDEA to work with the dev container. Removed
There was a problem hiding this comment.
Looks like this still needs to be removed from the commit
Proposed change
Adds a cemera notifications suspension dialog to enter custom suspension time.
Addresses a comment from my rejected PR.
This one is much simpler, only UI changes.
CustomSuspensionDialogitself turned out quiet big because of the validations & defensive programming .Type of change
For new features
I did search for the existing requests and haven't found anything similar to this. I haven't started a discussion as I would've implemented this feature for my needs anyway, and I might as well suggest a PR.
AI disclosure
AI tool(s) used : Claude Code
How AI was used: code generation, code review, and debugging.
Extent of AI involvement: generated the entire implementation.
Human oversight: Review/manual fixes/iterations of changes over generated code, tested UI manually.
Checklist
enlocale.ruff format frigate)