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

feat(ui5-timeline): introduce "growing" property #10470

Merged
merged 13 commits into from
Jan 27, 2025
Merged

Conversation

Todor-ads
Copy link
Member

@Todor-ads Todor-ads commented Jan 7, 2025

Similar to ui5-table , we introduce a new property growing to ui5-timeline. It provides growing property, with 3 available options:

Button: Displays a "More" button at the end of the list, which when pressed triggers the 'load-more' event.
Scroll: The 'load-more' event is triggered when the user scrolls to the bottom of the list.
None: The growing functionality is off.

fixes: #10154

hinzzx
hinzzx previously requested changes Jan 9, 2025
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/themes/Timeline.css Outdated Show resolved Hide resolved
packages/fiori/src/types/TimelineLayout.ts Outdated Show resolved Hide resolved
packages/fiori/src/TimelineItem.ts Outdated Show resolved Hide resolved
packages/fiori/src/TimelineGroupItem.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Show resolved Hide resolved
packages/fiori/src/TimelineTemplate.tsx Outdated Show resolved Hide resolved
packages/fiori/src/TimelineTemplate.tsx Show resolved Hide resolved
Copy link
Contributor

@hinzzx hinzzx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add Playground samples

@hinzzx hinzzx requested a review from Stoev January 21, 2025 11:24
@Todor-ads Todor-ads requested a review from vladitasev January 23, 2025 09:13
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/test/pages/Timeline.html Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@vladitasev vladitasev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

packages/fiori/src/TimelineItem.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/Timeline.ts Show resolved Hide resolved
}

get timelineEndDOM() {
return this.shadowRoot!.querySelector(".ui5-timeline-end-marker");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the best practice is to use @query for this, but it's ok to leave it, just FYI

packages/fiori/src/TimelineTemplate.tsx Show resolved Hide resolved
Copy link

@Stoev Stoev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A tentative suggestion to align the commit message text with the changes we discussed (for example: use "end" instead of "bottom" when referring to the Timeline's items' list visual end):

Similar to 'ui5-table' , we introduce a new property 'growing' to 'ui-timeline'. It provides growing property, with 3 available options:

'Button': Displays a "More" button at the end of the list, which when pressed triggers the 'load-more' event.
'Scroll': The 'load-more' event is triggered when the user scrolls to the bottom of the list.
'None': The growing functionality is off.

packages/fiori/src/Timeline.ts Outdated Show resolved Hide resolved
packages/fiori/src/types/TimelineGrowingMode.ts Outdated Show resolved Hide resolved
@hinzzx hinzzx dismissed their stale review January 27, 2025 14:24

stale, still we gotta discuss the item navigation behaviour.

Copy link
Contributor

@hinzzx hinzzx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The item navigation behaviour would be handled in separate change, as it was discussed with @vladitasev and @DMihaylova, hence I am removing my change request.

@vladitasev vladitasev merged commit c39c0e8 into main Jan 27, 2025
10 checks passed
@vladitasev vladitasev deleted the timeline-leazyloading branch January 27, 2025 15:11
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.

[Feature Request]: Growing feature for timeline component
5 participants