Skip to content

Participant Item to show Participant States#2161

Merged
anjulgarg merged 66 commits intomainfrom
anjulgarg/2941671-participantState-participantItem
Aug 9, 2022
Merged

Participant Item to show Participant States#2161
anjulgarg merged 66 commits intomainfrom
anjulgarg/2941671-participantState-participantItem

Conversation

@anjulgarg
Copy link
Copy Markdown
Member

@anjulgarg anjulgarg commented Aug 4, 2022

What

Uses consistent types b/w VideoTile and ParticipantItem participantState
Displays Participants state in participant item

FIGMA - https://www.figma.com/file/72qJ03EOQExf12g5JTdWjQ/Web-UI-Library?node-id=6180%3A48173

Why

How Tested

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 8, 2022

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 8, 2022

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 8, 2022

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 8, 2022

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

@prprabhu-ms
Copy link
Copy Markdown
Contributor

LGTM except for @JamesBurnside point about a11y on desktop for keyboard users.

/* @conditional-compile-remove(one-to-n-calling) */
/* @conditional-compile-remove(PSTN-calls) */
/** String shown when `participantState` is `Ringing` */
participantStateRinging?: string;
Copy link
Copy Markdown
Member

@JamesBurnside JamesBurnside Aug 9, 2022

Choose a reason for hiding this comment

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

ideally this component is agnostic of being chat or calling and (to keep simple) also have props that do one and only one thing...
Thinking out loud so feel free to shut this down - Instead of passing participantState into here, would it be possible to pass any string that is simply written to the right hand side of the participant item, participantItemSecondaryText?: string - then the VideoGalleryParticipant does the mapping of state->string and passes in the appropriate string

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.

I understand your point of view. And it's a good idea.
However, that removes the localization support we offer for these connection states.
There's another concern of customer injected strings being too long and messing up the UI. They would then also have to deal with truncation.
By adding a fixed set of connection states, we keep this component communication specific.

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.

To keep the locale strings, would the localization not live in the videoGallery component locale?

Copy link
Copy Markdown
Member

@JamesBurnside JamesBurnside Aug 9, 2022

Choose a reason for hiding this comment

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

I think we need to handle truncation regardless and show an ellipsis or something for long text as we don't know what our (or Contoso's) translated strings will be, or what width Contoso will set the participantItem to be

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.

Good point.

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.

But does that mean that now we have to introduce these strings to VideoGallery props as well?

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.

They would be introduced there *instead (they should only need to be in one place, but I haven't dug into the code)

Copy link
Copy Markdown
Member

@JamesBurnside JamesBurnside Aug 9, 2022

Choose a reason for hiding this comment

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

We chatted offline and making this non-blocking for cost to implement this change.. but I still strongly feel this should happen, for posterity in case someone does decide to make this change reiterating why:

  • Not pollute participantItem with calling-only properties
  • Keep the property as simple as possible to ensure ease of use and understanding by Contoso devs (nothing surprising can happen like hiding the menu button)
  • Keeps it flexible - e.g. if Contoso wanted "sharing screen" text here or something they could easily

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 9, 2022

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 9, 2022

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 9, 2022

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 9, 2022

@anjulgarg anjulgarg enabled auto-merge (squash) August 9, 2022 20:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 9, 2022

Comment thread packages/communication-react/review/beta/communication-react.api.md
Comment thread packages/react-components/src/components/ParticipantItem.tsx

{/* When the participantStateString has a value, we don't show the menu */}
{!me && participantStateString ? (
<Text>{participantStateString}</Text>
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.

do we have styles to handle truncation of long strings of text here?

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.

Not currently.

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.

Can this be a work item under the feature somewhere (otherwise it will be a day-zero bug)

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.

Yes, going to bring this up in front of AlexP tomorrow.
Creating an item for this.
https://skype.visualstudio.com/SPOOL/_workitems/edit/2946830

/** String shown when `participantState` is `Connecting` */
participantStateConnecting?: string;
/* @conditional-compile-remove(one-to-n-calling) */
/* @conditional-compile-remove(PSTN-calls) */
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.

how do double conditional compiled work? Is this an AND or an OR?
My assumption is the implementation will be an AND (both of these features must be stabilized for this feature to be public), but we would want an OR (if either of these features are stabilized we want this feature public)

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.

So if either of these feature is stabilized, we remove both the flags

Because the assumption is that if this is stable for one feature, it is stable for another as well

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.

We chatted offline, we don't have support for this so whoever stabilizes this feature first needs to ensure they delete both

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.

Filed a bug for tracking this Bug 2946816: [Web] We do not support OR conditional compilation flags

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 9, 2022

@anjulgarg anjulgarg merged commit af40399 into main Aug 9, 2022
@anjulgarg anjulgarg deleted the anjulgarg/2941671-participantState-participantItem branch August 9, 2022 21:23
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.

5 participants