Skip to content

Converged Side Pane & Control Bar#2976

Merged
JamesBurnside merged 33 commits intomainfrom
jaburnsi/video-effects-side-pane-converged
May 3, 2023
Merged

Converged Side Pane & Control Bar#2976
JamesBurnside merged 33 commits intomainfrom
jaburnsi/video-effects-side-pane-converged

Conversation

@JamesBurnside
Copy link
Copy Markdown
Member

@JamesBurnside JamesBurnside commented Apr 24, 2023

What

  • CallComposite SidePaneProvider provides access to sidepane state
  • CallCompsoite MainPage is maintaining the state of the sidepane and passing that into the context
  • CallComposite Custom button injection code is used by CallWithChatComposite to inject custom chat button
  • CallComposite Video Effects uses converged side pane and not fluent panel
  • Internal CallComposite interfaces added (and used by call with chat composite) to inject side pane content and inject chat button

Why

Remove much much duplicate usage of components and remove that call with chat composite had its own control bar and its own side pane.

This also fixed several bugs in the callcompsites new control bar:

How Tested

Lots across calling and callwithchat, stab and beta, mobile and landscape - but will also organize a bug bash on this as this impacts stable builds.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2023

Calling bundle size is increased❗.

  • Current size: 9799484
  • Base size: 9798078
  • Diff size: 1406

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2023

CallWithChat bundle size is increased❗.

  • Current size: 10192445
  • Base size: 10192054
  • Diff size: 391

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2023

Chat bundle size is increased❗.

  • Current size: 9839807
  • Base size: 9839764
  • Diff size: 43

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the composite UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the composite UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the composite UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@JamesBurnside JamesBurnside changed the title [DRAFT] feature: Converged Side Pane & Control Bar feature: Converged Side Pane & Control Bar Apr 26, 2023
@JamesBurnside JamesBurnside changed the title feature: Converged Side Pane & Control Bar Converged Side Pane & Control Bar Apr 26, 2023
@github-actions
Copy link
Copy Markdown
Contributor

* @private
*/
export const SidePaneProvider = (props: SidePaneProviderProps): JSX.Element => {
const [headerRenderer, setHeaderRenderer] = React.useState<(() => JSX.Element) | undefined>();
Copy link
Copy Markdown
Contributor

@PorterNan PorterNan Apr 26, 2023

Choose a reason for hiding this comment

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

Is it possible to avoid adding global changing state into provider, it's a huge review push back to do so long time ago - it's another format of global state - our centralized state will not be single source of truth of global state anymore.

The conclusion of the discussion was we could use Provider for global static, but we shouldn't put any dynamic changing state there for either debuggability or code structure. It feels this is opening a new pattern that brings us back to that design

if we feel that is a need to add these states into adapter, I will 100% vote for that


const [showDrawer, setShowDrawer] = useState(false);
const onMoreButtonClicked = useCallback(() => {
closePane();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this a intended new more button behaviour? do we want to keep the side pane open when going on hold for example? see people come and go, and be able to chat?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Chatted with @dmceachernmsft , this behavior (because of a regression in main branch) does not happen today so I will not fix in this PR, but will do a subsequent PR to fix this.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

sidePaneId: string;
// Useful to ensure the side pane renders the content of the override even if the side pane is closed.
// This avoids remounting the content when the side pane is opened again.
hidden?: boolean;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

disposeWhenClose?

hidden feels a bit more like UI behahvior like css "display: hidden" (and people will try to change it to true to show it)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

100% agree, updated to better names (isActive and persistRenderingWhenClosed):
image

export const SidePaneProvider = (props: SidePaneProviderProps): JSX.Element => {
const [headerRenderer, setHeaderRenderer] = React.useState<(() => JSX.Element) | undefined>();
const [contentRenderer, setContentRenderer] = React.useState<(() => JSX.Element) | undefined>();
const [activeSidePaneId, setActiveSidePaneId] = React.useState<string>();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discussion from last time - we could still use provider, but just not to add state here
So this provider could take props(either states or normal props) from outside of the composite, then store it here

Or we just remove provider then use a top to down state from composite to each single component

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated for provider to take props for now

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2023

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2023

Failed to pass the composite UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2023

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2023

@JamesBurnside JamesBurnside merged commit bf45586 into main May 3, 2023
@JamesBurnside JamesBurnside deleted the jaburnsi/video-effects-side-pane-converged branch May 3, 2023 17:08
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