Skip to content
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

UI changes to pause a channel #2373

Merged
merged 3 commits into from
Nov 5, 2024
Merged

Conversation

ismaelbej
Copy link
Contributor

@ismaelbej ismaelbej commented Oct 29, 2024

  • Rename AddButton to ActionButton
  • Allow icon and color props for ActionButton
  • Add ChannelPause button
  • Add actions to pause a channel
Screenshot 2024-10-28 at 11 07 31 PM Screenshot 2024-10-28 at 11 07 13 PM Screenshot 2024-10-29 at 8 39 53 PM

@ismaelbej ismaelbej marked this pull request as ready for review October 29, 2024 23:51
@ismaelbej ismaelbej changed the base branch from feature/2352-pause-channel to main October 30, 2024 18:42
@ismaelbej ismaelbej marked this pull request as draft October 30, 2024 18:45
Copy link
Member

@matiasgarciaisaia matiasgarciaisaia left a comment

Choose a reason for hiding this comment

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

We'll probably have to rebase or something before merging, but the changes are OK 👍

assets/css/_global.scss Outdated Show resolved Hide resolved
assets/js/components/channels/ChannelIndex.jsx Outdated Show resolved Hide resolved
assets/js/components/channels/ChannelIndex.jsx Outdated Show resolved Hide resolved
assets/js/components/channels/DownChannelsStatus.jsx Outdated Show resolved Hide resolved
assets/js/components/channels/ChannelPause.jsx Outdated Show resolved Hide resolved
ismaelbej and others added 3 commits October 30, 2024 18:16
* Allow icon and color props for ActionButton
* Add ChannelPause button
* Add actions to pause a channel
Co-authored-by: Matías García Isaía <[email protected]>
@ismaelbej ismaelbej force-pushed the feature/2352-pause-channel-ui branch from 111d8a7 to ed424bc Compare October 30, 2024 21:49
@ismaelbej
Copy link
Contributor Author

ismaelbej commented Oct 30, 2024

@matiasgarciaisaia The actions pause/unpause triggers a fetch(channelId) that seems to be enough to refresh the channel without waiting to the poll. I haven't found if there's an automatic mechanism to refresh UI of the channels. ChannelBroker.on_channel_settings_change is triggered but it seems to refresh the channel state on the backend.

@ismaelbej ismaelbej marked this pull request as ready for review October 30, 2024 23:29
Copy link
Member

@matiasgarciaisaia matiasgarciaisaia left a comment

Choose a reason for hiding this comment

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

👍 :shipit:

Since fetching the channel is enough for the UI to get updated (upon CHANNEL_RECEIVE), we could trigger a new CHANNEL_FETCH once per minute. I think the only part of the app that could have some feature like that is the sandbox, probably when using a real channel - maybe the simulation too?

@matiasgarciaisaia
Copy link
Member

Here's where the timer is set in the simulator's UI:

const timer = setInterval(() => {
this.refresh()
}, 5000)
this.setState({ timer })
}

@ismaelbej ismaelbej merged commit a8a65aa into main Nov 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants