Adds transitions to panels
Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
parent
bbd43b6e38
commit
4ec94367c9
40 changed files with 708 additions and 414 deletions
|
@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue