This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 830
Refactor RightPanel to match expected behaviour #3703
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This should make it easier to funnel the expected behaviour through a central block of code.
This lays a foundation for redirecting all the traffic through the new store, but for now the core parts of the app need to stop caring if the right panel is open.
This introduces a new dispatch action (unused, so far) and routes the buttons towards the RightPanelStore for processing.
This was for a caret that is no longer in the app. Instead, the header buttons act as a toggle.
Clicking on the member icon was fine, but clicking on the file panel wouldn't bring it up - it had to be clicked a second time to actually show the panel.
Mid-PR cleanup.
Will this also address element-hq/element-web/issues/11319? |
@MarcoZehe unlikely, as that change is a bit more convoluted than this PR can reasonably scope in. |
Currently this is only used in the GroupView and for forwarding messages.
The right panel needs to be opened manually now.
The subclasses listen for view_user and similar dispatches, which then start up the RightPanel. We weren't registering a listener though because we changed to using the RightPanelStore for most of our logic.
We dispatch to open, not call directly into the store.
This requires us to track some of the phase's state in the RightPanelStore, which is not great - trying to get it through the app is a bit difficult.
turt2live
force-pushed
the
travis/right-panel-v2
branch
from
December 6, 2019 23:33
397a3a9
to
405b3f6
Compare
Taking this out of review because bugs |
This is to prevent the member info from staying open, which could explode if the user isn't in the room you're switching to.
It doesn't seem to affect anything by being removed.
dbkr
approved these changes
Dec 11, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes element-hq/element-web#10769
Fixes element-hq/element-web#8772
Fixes element-hq/element-web#10149
Reviewer: It'll probably be easier to go commit by commit here.
Instead of tracking a
collapsedRhs
boolean across the core of the app, we now use a store which is responsible for tracking whether or not the panel should even be open. The right panel is additionally hooked up to settings (not exposed in the UI) to make better use of the defaults it offers - it makes the change to automatically show the right panel for new users a bit easier, if we ever decide that.The new
RightPanelStore
(and accompanyingRightPanelStorePhases
because circular imports) does all the tracking and handling, including toggling of the panel's phases. It tracks the last safe phase for the user so that when they refresh the app it is exactly how they left it, including whether or not the panel was even open.TODO:
See if Collapsing the right sidebar scrolls to the bottom in a room element-hq/element-web#9822 is an easy fixIt's not.