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

refactor: make isCancellable sync [SBK-370] #78

Merged
merged 8 commits into from
Nov 27, 2023
Merged

Conversation

alexisnsns
Copy link
Contributor

@alexisnsns alexisnsns commented Nov 22, 2023

isCancellable used to be async, with the cancel component displaying a loading message while waiting for the promise to resolve, which would take ~5-10 secs.

I added the startTime in the Stream constructor to make it sync.

Now there is little to no loading time in the cancel stream component, which is a great UX win.

Screenshot 2023-11-22 at 12 03 57

It allows to display the remaining time almost instantly when you load the stream.

@vany365 vany365 changed the title Refacto/ make isCancellable sync Refacto/ make isCancellable sync [SBK-370] Nov 22, 2023
Copy link

linear bot commented Nov 22, 2023

SBK-370 "Refacto/ make isCancellable sync" (ApeWorX/ApePay #78)

isCancellable used to be async; we displayed 'fetching remaining time...' while waiting for the promise to return, which would take ~5-10 secs.

I added the startTime in the Stream constructor to make it sync.

Now there is little to no loading time in the cancel stream component, which is a great UX win.

Screenshot 2023-11-22 at 12 03 57

It allows to display the remaining time almost instantly when you load the stream.


ApeWorX/ApePay #78 by alexisnsns on GitHub

via LinearSync

@alexisnsns
Copy link
Contributor Author

alexisnsns commented Nov 22, 2023

Also changed the wording to add 'simulations' and edited the css of the cancel button to make it so that on the demo app the user knows when a button is disabled

@alexisnsns alexisnsns marked this pull request as ready for review November 22, 2023 18:49
@alexisnsns
Copy link
Contributor Author

alexisnsns commented Nov 22, 2023

Screenshot 2023-11-22 at 13 57 52

Also finally added a favicon: it's one less error to deal with, which makes the console cleaner and debugging easier.

@fubuloubu fubuloubu changed the title Refacto/ make isCancellable sync [SBK-370] refactor: make isCancellable sync [SBK-370] Nov 22, 2023
Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

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

Need some updates for language here

ui/lib/CreateStream.tsx Show resolved Hide resolved
ui/lib/CancelStream.tsx Outdated Show resolved Hide resolved
ui/app/src/StreamPage.tsx Outdated Show resolved Hide resolved
sdk/js/index.ts Outdated Show resolved Hide resolved
ui/app/src/StreamPage.tsx Outdated Show resolved Hide resolved
@fubuloubu fubuloubu enabled auto-merge (squash) November 27, 2023 15:23
@fubuloubu fubuloubu merged commit f99471c into main Nov 27, 2023
8 checks passed
@fubuloubu fubuloubu deleted the refacto/sync-cancel branch November 27, 2023 15:29
@alexisnsns alexisnsns linked an issue Nov 29, 2023 that may be closed by this pull request
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.

make iscancellable sync [SBK-333]
2 participants