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

Revisiting issue 15: Slots/labels #18

Open
njvb opened this issue Sep 30, 2024 · 1 comment
Open

Revisiting issue 15: Slots/labels #18

njvb opened this issue Sep 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@njvb
Copy link

njvb commented Sep 30, 2024

Hi @laurens94,

I wanted to revisit this topic: #15 - as the proposed solution was to add information outside the component. It's viable for small information, such as a label, but becomes a challenge to maintain consistency on the row heights, especially if there is a lot of information to match on a row (task, assignee, date, etc.). Could you please reconsider adding a slot (#beforerow - or similar), so any HTML can be added to the same row?

Thanks again for the great library!

BR,
N.

@laurens94
Copy link
Owner

laurens94 commented Oct 1, 2024

I see, that's indeed tricky.

I'd love to simply add additional slots for you, however I tested it out a bit and it would require a refactor of the internal logic to get your desired outcome.

Currently the logic to determine positioning of items / mousepos etc is all based on a single element (.timeline). Whenever we add an element to the rows in a way that the row height would be adjusted to that element, items in the row are pushed away and it would break all positioning/zooming logic.

What you might want to try is adding the elements (as labels) or outside of the element (as you probably already did), watch their height with a resizeObserver (very easy to add with VueUse), sync that height to each group's cssVariables and apply it by overwriting the css (I just added the possiblity to set cssVariables prop to groups as well since v2.5.0).

I added the #timestamps-before and #timestamps-after slots in this release as well so you can insert your own content into the timestamps element now.

Adding something like a #beforerow would result in the same structure as the #group-label, so I don't think it makes sense to add it at the moment.

I'll keep this feature request on the roadmap, but probably won't be working on it soon. So let me know if the syncing of heights using cssVariables works!

@laurens94 laurens94 added the enhancement New feature or request label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants