-
-
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 skippedDraft detected. 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
switch (appModeFromSessionStorage) { | ||
case AppMode.Run: | ||
return AppMode.Run; | ||
case AppMode.Edit: | ||
return AppMode.Edit; | ||
case AppMode.Freeze: | ||
return AppMode.Freeze; | ||
default: | ||
return AppMode.Run; | ||
} |
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.
in the domain, run and freeze are not mutually exclusive. It is not ideal to build our logic in a way that goes agains the domain
Another challenge I see here, is that the data provenance between the AppMode and the Freeze is different. AppMode is a local setting for the user, while freeze is a session setting.
I am unsure it makes sense for us to mix the concerns here, although I understand the convenience
I wonder if the correct place to consume this is from the runtime store. we could create a feature selector for it and consume it in the components instead of passing it as props.
The other data is passed to the blocks as props, since we maintain the relationship of list > item, this is not the case here. Performance wise we would also prefer consuming this data as low down in the tree as possible
Feature
Customers want a way to view the Rundown safely without any danger of making changes.
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