Skip to content

Conversation

lucasbotingnon
Copy link
Contributor

@lucasbotingnon lucasbotingnon commented Jul 10, 2025

Related Issue: #23

WIP

…alculation

add logic to calculate and assign dynamic top position for timeline items based on overlapping levels
introduce dynamic height calculation for groups based on item levels
update styles to support new layout behavior

BREAKING CHANGE: timeline item positioning and group height logic have been restructured, requiring updates to custom styles or integrations relying on the previous implementation
@lucasbotingnon lucasbotingnon changed the title [WIP] feat(timeline): implement dynamic item positioning and group height calculation #23 [WIP] feat(timeline): implement dynamic item positioning and group height calculation Jul 10, 2025
@lucasbotingnon
Copy link
Contributor Author

@laurens94 It's still in draft, but you can test it. An ID is needed for vertical separation. I'm working to ensure that nothing else is required aside from the start and end. The rest of the implementation is not finished yet; there are more things to complete to reach 100%. I haven't tested all cases at this point.

- Implemented logic for custom item heights using CSS variables.
- Introduced dynamic resizing of items and groups based on window size and item configurations.
- Updated caching mechanism for styles to incorporate item index.
- Enhanced group height calculations to account for varying item levels and heights.
- Modified styles to enforce maximum item height and improve layout flexibility.
@lucasbotingnon lucasbotingnon marked this pull request as ready for review July 16, 2025 01:34
@lucasbotingnon
Copy link
Contributor Author

@laurens94, it's finished. Can you review it and test it to see if it's okay?

@lucasbotingnon lucasbotingnon changed the title #23 [WIP] feat(timeline): implement dynamic item positioning and group height calculation #23 feat(timeline): implement dynamic item positioning and group height calculation Jul 16, 2025
Signed-off-by: Lucas Botingnon <35458766+lucasbotingnon@users.noreply.github.com>
@laurens94
Copy link
Owner

I'm sorry but the PR is a bit of a mess, I can't review it in it's current state.
It seems that you've used AI to generate (parts of) the code, but it introduced breaking changes to unrelated parts of the code (e.g. on line 1055)
It also removed some of the comments I intentionally placed to make the code more explanatory.

In any case, I tested around a bit and at first glance it seems to work.
Also adding :dynamicRowHeight="'viewport'" seems to do the trick, however it starts to increment the height as soon as new items show up in the viewport, even when they are not overlapping.

If you could make a PR with only the bare minimum of code additions / changes to support this feature, I can have a proper look at it!
I'd also greatly appreciate it if the PR description is just in your own words, it would really help with focussing on the important parts instead of needing to decrypt vague (and possibly hallucinated) bullet points.

Let me know if you need any help!

- Replaced redundant properties and logic in item and marker loops.
- Improved overlap detection and removed unused functionality for cleaner structure.
- Consolidated multiple style calculation functions to enhance readability and maintainability.
- Removed dynamic row height and item comparison features for streamlined behavior.
…alculation

- Simplified overlap handling for timeline items by consolidating logic into reusable functions.
- Introduced caching for group overlap data to improve performance.
- Refined group style calculations to dynamically account for overlapping levels and item heights.
@alandecastros
Copy link

Guys, what's timeline to publish this feature?

@lucasbotingnon
Copy link
Contributor Author

lucasbotingnon commented Aug 28, 2025

@alandecastros @laurens94
Sorry, I implemented this as a fork in the product I am working on.

I need to enhance the implementation here, as the current code in this PR only covers the range components. I can probably address this next week.

(I completed the cleanup as Laurens suggested in his last comment.)

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

Successfully merging this pull request may close these issues.

3 participants