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

What happened to tooltip.template option? #91

Closed
payitforwardnow opened this issue Sep 13, 2019 · 12 comments · Fixed by #94
Closed

What happened to tooltip.template option? #91

payitforwardnow opened this issue Sep 13, 2019 · 12 comments · Fixed by #94
Labels
bug Something isn't working
Milestone

Comments

@payitforwardnow
Copy link

According to the "latest" documentation there should be a way to define a tooltip template. Unfortunately, every time I try to define a template for tooltips I get an error that template is not a valid option for tooltip. I verified I have the latest version

According to the new documentation found here https://visjs.github.io/vis-timeline/docs/timeline/

"tooltip.template | Function | none | A template function used to generate the contents of the tooltip. The function is called by the Timeline with an item's data as the first argument, and the edited data as the second argument. It must return HTML code, a string or a template as result. See section Templates for a detailed explanation. See also: tooltipOnItemUpdateTime.template"

This is what I see when I try to use the documented option.

Unknown option detected: "template" in options = { tooltip: { template }}

Am I missing something? It appears that the template is supposed to be new; however, it doesn't appear to be implemented as of 2019-08-02.

Thank you for your time and consideration.

@mojoaxel
Copy link
Member

@visjs/maintainer Looks like we are missing an example here!?

@mojoaxel mojoaxel added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 14, 2019
@mojoaxel
Copy link
Member

Her is a working (or to more precise non-working) example:
https://jsbin.com/tapacit/1/edit?js,console,output

Looks like a bug to me 😢

@mojoaxel mojoaxel added bug Something isn't working and removed documentation Improvements or additions to documentation enhancement New feature or request labels Sep 14, 2019
@mojoaxel
Copy link
Member

This is not a bug! Here is a working example:
https://jsbin.com/tapacit/edit?js,output

I also created #94 to add an example that demonstrates this feature.

@payitforwardnow
Copy link
Author

payitforwardnow commented Sep 16, 2019

OK I just saw the last example (I thought they were the same) with the tooltip.template; however, I still get the error I reported. I'm using vis-timeline with React. Maybe I posted this issue in the wrong forum. If I did I apologize. Thank you for your time and consideration.

@payitforwardnow
Copy link
Author

payitforwardnow commented Sep 16, 2019

I checked the file vis-timeline-graph2d.min.js which doesn't accept
tooltip template
tooltip.template. I must be using the wrong version?
@Version 5.1.0
@Date 2019-08-02T15:25:33Z

Which version should I be using? Better yet, which version corresponds to the official documentation I referenced? Thank you.

@mojoaxel
Copy link
Member

Which version should I be using?

Sorry! Our mistake! Tooltip templates support comes with the upcoming v6 release.

@payitforwardnow
Copy link
Author

OK But I'm still looking for current/V5 documentation. I spent a lot of time referring to the "official" documentation before I posted here. I thought that was what I was supposed to do so I didn't waste anyone's time (but apparently mine) :)

So the "current" online official documentation is for an "upcoming" release V6? Is that the typical practice? Can someone direct me to the actual "current/V5" documentation? How can I tell from the documentation what's current and what's "upcoming"? I have other questions; however, I don't know if its a version issue or an actual issue.

Thank you for your time and consideration.

@mojoaxel
Copy link
Member

Sorry for the confusion! This is really very unsatisfying.
We only have this problem because we did not release the version 6 yet 😞

Normally all changes get released immediately so the docs and the code fit together.
I think the best way to solve this issue is to release the v6 as soon as possible.

@mojoaxel mojoaxel reopened this Sep 17, 2019
@Thomaash
Copy link
Member

Or create v6 branch from current master for development and revert the master branch to add2f8a.

@payitforwardnow
Copy link
Author

payitforwardnow commented Sep 19, 2019

May I make a suggestion? In your documentation, if its not too much trouble, could you identify V6 options somehow so users know if what they are looking at is available based on the version they have? The same problem apparently exists for subgroupOrder. I assume this is a "V6 only" option as well. If possible could someone please assist me in determining how to reverse the sort order of nested groups? I've tried using the groupOrder option (which appears to be in both V5 and V6). Unfortunately that isn't working. The groups are scrambled. I will investigate more if necessary. I was hoping there might be a quick fix. Thank you.

@mojoaxel
Copy link
Member

The problem that the docs do not match the released version is still an issue.

@mojoaxel mojoaxel reopened this Sep 20, 2019
@mojoaxel mojoaxel added this to the v6 milestone Sep 22, 2019
@yotamberk
Copy link
Member

V6 is out! this is now solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants