this post was submitted on 21 Oct 2023
13 points (93.3% liked)
Web Development
3454 readers
1 users here now
Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development
What is web development?
Web development is the process of creating websites or web applications
Rules/Guidelines
- Follow the programming.dev site rules
- Keep content related to web development
- If what you're posting relates to one of the related communities, crosspost it into there to help them grow
- If youre posting an article older than two years put the year it was made in brackets after the title
Related Communities
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
Wormhole
Some webdev blogs
Not sure what to post in here? Want some web development related things to read?
Heres a couple blogs that have web development related content
- https://frontendfoc.us/ - [RSS]
- https://wesbos.com/blog
- https://davidwalsh.name/ - [RSS]
- https://www.nngroup.com/articles/
- https://sia.codes/posts/ - [RSS]
- https://www.smashingmagazine.com/ - [RSS]
- https://www.bennadel.com/ - [RSS]
- https://web.dev/ - [RSS]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Can you explain a bit more about "zooming, different levels of detail" you mention? Maybe break them down to separate issue you are having with the library, what does it do, what do you want that it's not doing. If there is a way to tweak it then you don't have to build the component from scratch.
But if you already abandoned the idea of tweaking timeline-js then you can have full control in vue, have to build it yourself though. Start by breaking the functionality of the timeline into separate interaction. From a quick look, timeline-js just make style attribute reactive. Have a box? good. Now put really long div in it with placeholder texture. Can you drag/scroll it? no? grab a suitable function from vueuse and make it scrollable. Follow with markers, zoom, dummy event items, data fetching (the actual width, marker spacing, events placement can be calculated from timestamp in json after this step), lazy loading, styling, animation, so on.
I don't know how much experience do you have with each things required (html, css, js, vue) so it is a bit difficult to give useful answer.
With TimelineJS I first tried with title-only entries. If you zoom out the entries get compresses along the time axis of course. Either they are overlapping, which looks bad and is not useful for the interaction, or you can let TimelineJS stack them. But then they stack higher and higher, overflowing the height of the timeline. A good vertical scrolling mechanism doesn't seem to be a feature (like seeing at what vertical postion you currently are).
I thought about, what I want to try. I want each entry represented by a bubble, connected to the timeline with a vertical line. The size of the bubble should change depending on how much space is available. Shrinking to a small point at minimum, growing to accomodate a small image and maybe a title (for that morphing to a rounded rectangle would be better).
Maybe this is possible with clever CSS styling of timelinejs. CSS is really a weak part for me
Your bubble idea could work and you will have to be comfortable with css, no way around it I guess.
I see vis.js have a lot of timeline examples you might be able to adapt to your need.