Skip to content

Conversation

@christianalfoni
Copy link
Contributor

@christianalfoni christianalfoni commented Dec 13, 2019

Okay, so the LivePage has been tested here and should work now. Related to looking into this I saw that we should rather derive changedShortIds. It is not being used much now, but it allowed us to remove a bunch of code. This change is not very well tested, not sure about all scenarios.

I also noticed an issue with unsaved code and changing sandbox. The code is saved nevertheless, and in LIVE mode it causes an error. We need to fix this, but should be a different PR 😄

@lbogdan lbogdan temporarily deployed to pr3208 December 13, 2019 18:34 Inactive
@lbogdan
Copy link
Contributor

lbogdan commented Dec 13, 2019

Build for latest commit 46e81a9 is at https://pr3208.build.csb.dev/s/new.

@christianalfoni
Copy link
Contributor Author

Okay, so I changed how we manage signing into a Live session, when not signed in with a profile. The when concept introduced is not really a good concept. The reason is that it lives beyond the context of the page. Which means we might wait for a signin, but the user might move to a different page and then sign in, causing the Live logic to continue its execution.

Instead I created a new action for signing in to a Live session. This logs the user in first.

@lbogdan lbogdan temporarily deployed to pr3208 December 14, 2019 13:18 Inactive

export class BlinkingDot extends React.PureComponent {
export class BlinkingDot extends React.PureComponent<{}, { showing: boolean }> {
timer: NodeJS.Timer;
Copy link
Member

Choose a reason for hiding this comment

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

I believe in the browser case we need number here. Then use this.timer = window.setInterval.

Copy link
Member

Choose a reason for hiding this comment

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

Not blocking from merging, but for reference later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yeah, hm... weird typing behaviour. Was not aware that window.setInterval and setInterval was typed differently. Fixed

Copy link
Member

@CompuIves CompuIves left a comment

Choose a reason for hiding this comment

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

This looks good! Only a few questions left, especially the one related the live.isLoading.

@CompuIves
Copy link
Member

During testing: when joining a live session I initially see the sign in button, then the loading live. Is there a way to not show the button? I think we can use state.hasLogIn, since that property just checks if there's a jwt.

@christianalfoni
Copy link
Contributor Author

During testing: when joining a live session I initially see the sign in button, then the loading live. Is there a way to not show the button? I think we can use state.hasLogIn, since that property just checks if there's a jwt.

Okay, now it is flipped. It shows "joining..." and then if not authenticated it shows the button instead of continuing into the Live session :)

Copy link
Member

@CompuIves CompuIves left a comment

Choose a reason for hiding this comment

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

Nice work! Great PR!! :shipit:

@CompuIves CompuIves merged commit b4f4aa1 into master Dec 18, 2019
@CompuIves CompuIves deleted the livepage-refactor branch December 18, 2019 10:39
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.

4 participants