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

Carousel do not recalculate its size after window size change #1004

Closed
compulim opened this issue Jun 6, 2018 · 3 comments
Closed

Carousel do not recalculate its size after window size change #1004

compulim opened this issue Jun 6, 2018 · 3 comments
Labels
bug Indicates an unexpected problem or an unintended behavior.

Comments

@compulim
Copy link
Contributor

compulim commented Jun 6, 2018

Repro

  1. Connect to MockBot
  2. Type "carousel", wait until carousel of cards come in
  3. Resize Web Chat programmatically (no window.onresize event will fire)

Expected

Left/right flipper should be visible if not all the cards are shown.

Actual

Left/right flipper are hidden forever, and no way to scroll the carousel.

Notes

Also related to #997. If step 3 is hide/show Web Chat thru display: none or hidden attribute, measurement is postponed. But we did not reschedule the measurement.

Potential fixes

  1. Redo measurement from time to time
    • Currently, the measurement is flashy because it remove all activities, add a super-wide card for measurement, then show all activities
  2. Not doing measurement
    • Can we not calculating the width of an activity? I suspect we have the calculation because the user may change their CSS. But we might be able to get around with it using other CSS layout strategies, like flex box
@compulim compulim added the bug Indicates an unexpected problem or an unintended behavior. label Jun 6, 2018
@Kartik1607
Copy link

Hi, I tried to replicate the issue using code from master branch, but was unable to do so. Here is the video

Is this specific to certain browser or am I doing something wrong?

@compulim
Copy link
Contributor Author

Thanks @Kartik1607.

If I remember my repro correctly, I think I mean resizing it programmatically using JavaScript.

@compulim
Copy link
Contributor Author

This is fixed in v4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior.
Projects
None yet
Development

No branches or pull requests

2 participants