-
Notifications
You must be signed in to change notification settings - Fork 364
[Property Editor] Show reconnection overlay when disconnection detected #9043
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
Conversation
|
|
||
| static const _editableArgsDebounceDuration = Duration(milliseconds: 600); | ||
|
|
||
| static const _checkConnectionInterval = Duration(seconds: 5); |
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.
do we need to check this frequently?
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.
Hmm it looks like no! It seems like the timer starts immediately after the tab is re-awoken, so even setting this to 1 minute means the overlay is displayed immediately after returning from sleep.
| return Timer.periodic(interval, (timer) async { | ||
| final isClosed = await editorClient.isClientClosed(); | ||
| if (isClosed) { | ||
| _shouldReconnect.value = true; |
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.
does this value ever get set back to false?
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.
No, but because the IFRAME is then re-loaded the whole Property Editor is re-initialized again (with the default value false). I could reset to false though I don't know if it would ever actually be called.
| Widget build(BuildContext context) { | ||
| final theme = Theme.of(context); | ||
| return Container( | ||
| color: theme.colorScheme.surface.withValues(alpha: 0.5), |
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.
use theme.colorScheme.semiTransparentOverlayColor. In fact, bonus points for pulling the overlay message out of timeline_events_view.dart into a shared widget to use here and in timeline_events_view.dart.
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.
Done, pulled this into shared widget
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.

Work towards #9028, #1948
Implements the first step described in this comment: #9028 (comment)
Follow-up after this is to add an
isClosedgetter topackage:dtdso that instead we can check whether DTD is closed instead of sending it an empty request. Want to do that in a separate PR however in case we decide we should cherry-pick this into the current Flutter beta (and therefore we don't need to coordinate a DTD cherrypick at the same time.)