-
-
Notifications
You must be signed in to change notification settings - Fork 832
Decide on which screen to show after login in one place #743
Conversation
This follows from a small amount of refactoring done when RTS was introduced. Instead of setting the screen after sync, do it only after login. This requires as-yet-to-be-PRd riot-web changes. This includes: - initialScreenAfterLogin, which can be used to set the screen after login, and represents the screen that would be viewed if the window.location at the time of initialising Riot were routed. - guestCreds are now part of state, because otherwise they don't cause the login/registration views to update when set. - instead of worrying about races and using this._setPage, use a dispatch.
} | ||
|
||
dis.dispatch({action: 'view_room_directory'}); |
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.
I would vote for ditching the return
s here and putting this in an else
.
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.
oh, fair enough
initialScreenAfterLogin: React.PropTypes.shape({ | ||
screen: React.PropTypes.string.isRequired, | ||
params: React.PropTypes.object, | ||
}), |
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.
Thinking about this, what we probably ought to do is just have a prop called screen
(or maybe currentScreen
?) that the parent uses to control the currently displayed screen (re-rendering when it changes), and ditch showScreen which calls methods on React components which is frowned upon, apparently. This is a step in the right direction, then.
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.
IRL we discussed that this would require wrapping a component around MatrixChat so that it does less routing itself. The thing wrapping it would be a view controller listening for view_...
actions that it would respond to by setting a currentScreen
prop on MatrixChat. We're de-scoping this for now though. (element-hq/element-web#3386)
Update to WebAssembly-powered Olm
This follows from a small amount of refactoring done when RTS was introduced. Instead of setting the screen after sync, do it only after login.
This requires element-hq/element-web#3385
This includes:
Also, I found a erroneous
onTeamMemberRegistered
, which isn't a thing anymore.Attempts to fix element-hq/element-web#2337 and similar woes.