Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where username disappears at 400 zoom #5730

Closed
wants to merge 3 commits into from

Conversation

carocao-msft
Copy link
Contributor

What

Fix bug where username disappears at 400 zoom

Why

At 400% zoom the width decreased into the isNarrow range, so mobile view is selected and username diappears.
Use isMobile to determine when to show mobile view instead of tracking width.

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.

Copy link
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.

Copy link
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.

Copy link
Contributor

Copy link
Contributor

github-actions bot commented Mar 24, 2025

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 29305 / 45995
63.71%
29305 / 45995
63.71%
808 / 1476
54.74%
2410 / 3825
63%
Current 29308 / 45999
63.71%
29308 / 45999
63.71%
808 / 1476
54.74%
2415 / 3829
63.07%
Diff 3 / 4
0%
3 / 4
0%
0 / 0
0%
5 / 4
0.07%

Copy link
Contributor

github-actions bot commented Mar 24, 2025

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 58481 / 94462
61.9%
58481 / 94462
61.9%
1180 / 2698
43.73%
3524 / 5828
60.46%
Current 58454 / 94467
61.87%
58454 / 94467
61.87%
1180 / 2698
43.73%
3534 / 5828
60.63%
Diff -27 / 5
-0.03%
-27 / 5
-0.03%
0 / 0
0%
10 / 0
0.17%

Copy link
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.

/**
* Boolean to indicate if it is mobile or desktop
*/
isMobileView?: boolean;
Copy link
Member

@JamesBurnside JamesBurnside Mar 24, 2025

Choose a reason for hiding this comment

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

don't add isMobile to components. Component props should be specific and explicit about purpose, isMobile is a catch-all property that doesn't tell the developer what will happen to the component when applied, it also will impact multiple aspects of the component and has a great chance of conflicting with other properties. Instead have something like showNameplate and in the Composite layer do <VideoGallery showNameplate={isMobile} />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about showMobileVIew or showCompactView? Based on our discussion previously, we want to only show the video gallery compact view based on isMobile instead of determine based on width. #5643

Copy link
Member

Choose a reason for hiding this comment

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

What precisely does compact view do? How many things change?

Copy link
Contributor Author

@carocao-msft carocao-msft Mar 25, 2025

Choose a reason for hiding this comment

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

For now it's showing label and having displayname on local video tile. In the future we might have other UI added for mobile video gallery, we want to start using the isMobile value to make sure when on dekstop we are forcing the videoGallery to not trip is narrow and to always be the desktop mode

Copy link
Member

Choose a reason for hiding this comment

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

For those few items we should have individual properties for. What if a developer wants a narrow experience on desktop? Or for ipads/tablets that have larger screens are they isMobile? (They may want some ismobile properties like larger touch targets, or swipe-able overflow gallery, but not other ismobile properties that save space like hiding display name). When we bucket many different properties under a single property we remove flexibility for developers and only make our component better for the one experience we have in mind today.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I started a group chat with you and Don to discuss this API further.

Copy link
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.

Copy link
Contributor

Calling bundle size is not changed.

  • Current size: 12401036
  • Base size: 12401036
  • Diff size: 0

Copy link
Contributor

Chat bundle size is increased❗.

  • Current size: 1775228
  • Base size: 1775227
  • Diff size: 1

Copy link
Contributor

CallWithChat bundle size is not changed.

  • Current size: 12401048
  • Base size: 12401048
  • Diff size: 0

Copy link
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.

Copy link
Contributor

Copy link
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.

@carocao-msft carocao-msft deleted the carocao/400ZoomBug branch March 27, 2025 17:31
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.

3 participants