Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Timeline Doesn't Appear Without User Interaction #4082

Open
MosheAtOwal opened this issue Aug 16, 2018 · 3 comments
Open

Timeline Doesn't Appear Without User Interaction #4082

MosheAtOwal opened this issue Aug 16, 2018 · 3 comments

Comments

@MosheAtOwal
Copy link

MosheAtOwal commented Aug 16, 2018

Summary

Under certain circumstances, the timeline does not appear until after the user resizes the window.

Environment

This issue reproduces in both of the following browsers:
Safari Version 11.1.2 (12605.3.8.1)
Version 68.0.3440.106 (Official Build) (64-bit)

Module

timeline

Notes

  1. I took a look at the source, and it seems that the behavior to set the timeline's root DOM node as hidden is was introduced in #3530, in response to feature request #3529.

    Specifically, this line seems to hide the root DOM node if no options are provided, or if there's no value provided for the RTL option. It doesn't seem to me that the component's visibility is appropriately changed back after guessing RTL. (I see this assignment on line 185, but it's also guarded by some conditional logic, and it seems that it's not being triggered in my use case.)

  2. I don't completely understand the context of the change, so I can't provide a fix. (My gut says the change is prevent the timeline from flashing in the "wrong" direction, but I'm not sure.) A workaround for me was to add rtl: false to my options payload. (This prevents the root DOM node from being hidden in the first place.)

  3. I noticed that the !options clause on line 67 is probably redundant. The line above that one calls util.deepExtend. I glanced quickly at util.deepExtend and it seems that it always returns something (except for when it throws) and so !options, will always be false on the following line. Empty objects are truthy, and, as I understand it, line 67 is guaranteed to have options set.

    Also, if options is indeed undefined and !options is true, then line 74 may result in a runtime error.

  4. This issue seems to possibly be tangentially related to this issue (and another one, which I haven't been able to find) where setting ranges is a workaround for the missing rtl option.

    I don't have a minimum reproduction sample right now, happy to provide if necessary.

@yotamberk
Copy link
Contributor

I've now branched out to a new fork of my own including only Timeline.
https://github.com/yotamberk/timeline-plus
https://www.npmjs.com/package/timeline-plus
I maintain it weekly and new versions are up with fixes.
Please resubmit this issue there and I will try to address it in-depth.

@MosheAtOwal
Copy link
Author

MosheAtOwal commented Sep 26, 2018

Sure. We are using a Vue plugin which depends on this, so we need to use a workaround. But, I'll drop a new issue there for you.

@MosheAtOwal
Copy link
Author

Done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants