Adds transitions to panels

Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
Josh Perez 2023-07-26 18:23:32 -04:00 committed by GitHub
parent bbd43b6e38
commit 4ec94367c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 708 additions and 414 deletions

View file

@ -10,6 +10,8 @@ import { SmartCompositionArea } from './CompositionArea';
import { SmartConversationHeader } from './ConversationHeader';
import { SmartTimeline } from './Timeline';
import {
getActivePanel,
getIsPanelAnimating,
getSelectedConversationId,
getSelectedMessageIds,
} from '../selectors/conversations';
@ -37,6 +39,12 @@ export function SmartConversationView(): JSX.Element {
);
});
const shouldHideConversationView = useSelector((state: StateType) => {
const activePanel = getActivePanel(state);
const isAnimating = getIsPanelAnimating(state);
return activePanel && !isAnimating;
});
return (
<ConversationView
conversationId={conversationId}
@ -54,6 +62,7 @@ export function SmartConversationView(): JSX.Element {
<SmartTimeline key={conversationId} id={conversationId} />
)}
renderPanel={() => <ConversationPanel conversationId={conversationId} />}
shouldHideConversationView={shouldHideConversationView}
/>
);
}