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 sidebar flicker #402

Merged
merged 2 commits into from
Feb 2, 2021
Merged

Fix sidebar flicker #402

merged 2 commits into from
Feb 2, 2021

Conversation

timmydoza
Copy link
Contributor

@timmydoza timmydoza commented Jan 20, 2021

Contributing to Twilio

All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

Pull Request Details

JIRA link(s):

  • N/A

Description

This PR fixes the flicker that is sometimes seen in the participant sidebar when the browser window just short enough to make the scrollbar appear.

Before:
Flicker

After:
noflicker

The flicker is caused by a CSS infinite loop. When the scrollbar appears in the sidebar, it reduces the width of the participant thumbnails, which reduces their height (to preserve aspect ratio), which reduces the length of the list, which removes the scroll bar, which increases the width of the participant thumbnails, which increases their length, and so on.

This fix adds an additional div in the sidebar (the 'innerScrollContainer'). Now, when the scrollbar appears, it reduces the size of the innerScrollContainer and not the participant thumbnails.

Note: To reproduce this issue on a Mac laptop, you must have an external mouse connected. Having an external mouse connected can change the styling of the scrollbars that appear.

Burndown

Before review

  • Updated CHANGELOG.md if necessary
  • Added unit tests if necessary
  • Updated affected documentation
  • Verified locally with npm test
  • Manually sanity tested running locally
  • Included screenshot as PR comment (if needed)
  • Ready for review

Before merge

  • Got one or more +1s
  • Re-tested if necessary

Copy link
Collaborator

@charliesantos charliesantos left a comment

Choose a reason for hiding this comment

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

Nice screenshots, explaining the issue clearly 👍

@timmydoza timmydoza merged commit 13c72f4 into master Feb 2, 2021
@timmydoza timmydoza deleted the fix-sidebar-flicker branch February 2, 2021 01:12
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.

2 participants