-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): implement Freeze
for Rundown UI
#1228
base: master
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to create a handler in the socket.ts
file which assigns data from the frozen message to the local store.
Once we have done that, we have real-time change of the data and this should be our source of truth
We also need to make some UI tweaks
- maybe a line between Run | Edit | Freeze?
- Frozen fields should not have the disabled opacity since it make is difficult to read
- Should the frozen field be indicated somewhere? Maybe the input should become of the "ghosted type" or perhaps a different colour and indicator in the label, like
Blocked field label ❄
From missing functionality
- we should also disable the drag and drop in the rundown
apps/client/src/features/rundown/rundown-header/RundownHeader.module.scss
Outdated
Show resolved
Hide resolved
apps/client/src/features/rundown/time-input-flow/TimeInputFlow.tsx
Outdated
Show resolved
Hide resolved
onSettled: () => { | ||
queryClient.invalidateQueries({ queryKey: RUNDOWN }); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
questions:
- I am not really sure we need to invalidate the rundown?
- should this toggle happen through websockets (we can do it in a separate PR). at the moment i dont see any reason to use it through react-query
apps/client/src/features/rundown/rundown-header/RundownHeader.tsx
Outdated
Show resolved
Hide resolved
apps/client/src/features/rundown/time-input-flow/TimeInputFlow.tsx
Outdated
Show resolved
Hide resolved
apps/client/src/features/rundown/time-input-flow/TimeInputFlow.tsx
Outdated
Show resolved
Hide resolved
* feat: allow `Freezable` to be extended as components * chore: rename icon `props` to `iconProps` * chore: move `Freezable` into input comps; add frozen icon * chore: move `Freezable` out of `EventEditorTimes` * chore: wrap `TimeInputFlow` with `Freezable` * feat: add `readOnly` variant for selects and inputs * feat: add `ontime-readonly` to `frozen` inputs * feat: add `readOnly` variant for select * chore: localize `Freezable` components * chore: remove `as` from `EventTextInput`
Hey @alex-Arc , I have been working on this with @asharonbaltazar and the code seems solid |
Feature
Customers want a way to view the Rundown safely without any danger of making changes. Refs #1069
Changes
RundownMenu
toggles calledFreeze
. Toggling this option sends a request to/frozen
and effectively prevents any backend changes as welldisabled
props to disable inputsisRundown
flag in components and pass it accordingly