src/app/issue-detail/timeline/timeline.component.ts
This component shows the full timeline with all its timeline events for a given issue.
selector | app-timeline |
styleUrls | ./timeline.component.scss |
templateUrl | ./timeline.component.html |
Properties |
|
Methods |
|
Inputs |
constructor(dataService: DataService)
|
||||||||
Service for handling API connection is required
Parameters :
|
issueId | |
Type : NodeId
|
|
The id of the corresponding issue for which the timeline is shown |
projectID | |
Type : string
|
|
The id of the project in which the issue is listed |
Private addSingleCoalesceItem | ||||||||||||||||
addSingleCoalesceItem(timelineItem: IssueTimelineItem, filter: ItemFilterFunction | undefined, coalesced: CoalescedTimelineItem[])
|
||||||||||||||||
Adds a single item to a list containing all coalesced timeline items.
Parameters :
Returns :
void
|
Private finishCoalescing | ||||||||||||
finishCoalescing(coalesceList: IssueTimelineItem[], coalesced: CoalescedTimelineItem[])
|
||||||||||||
Turns a list of timeline items into a coalesced timeline item, and adds them to a list of coalesced timeline items.
Parameters :
Returns :
void
|
makeCommentId | ||||
makeCommentId(node)
|
||||
Handles the id for a given node...
Parameters :
Returns :
NodeId
|
prepareTimelineItems | ||||||||
prepareTimelineItems(items: Map
|
||||||||
Prepares the timeline items (aka. the timeline events).
Parameters :
Returns :
void
|
requestTimelineItems |
requestTimelineItems()
|
Retrieves all timeline items (aka. timeline events) for the current issue. Use in ngAfterViewInit() lifecycle hook
Returns :
void
|
Private Static shouldStopCoalescing | ||||||||||||
shouldStopCoalescing(previousItem: IssueTimelineItem, nextItem: IssueTimelineItem)
|
||||||||||||
Check if a timeline item can be coalesced with another timeline item. This is the case if a) the user is the same and b) both items were created within the span of a minute
Parameters :
Returns :
boolean
True if both items can be coalesced |
Private userName | ||||||||
userName(item: IssueTimelineItem)
|
||||||||
Returns the name of the user that created a given timeline item (aka. timeline event) or just "Deleted User" in case the user no longer exists.
Parameters :
Returns :
any
Name of the timeline item creator. |
Static Readonly COALESCABLE_EVENTS |
Type : Map<string | ItemFilterFunction>
|
Default value : new Map([
[
'LabelledEvent',
(item) => {
return !!item.label;
}
],
[
'UnlabelledEvent',
(item) => {
return !!item.removedLabel;
}
],
[
'AddedToComponentEvent',
(item) => {
return !!item.component;
}
],
[
'RemovedFromComponentEvent',
(item) => {
return !!item.removedComponent;
}
],
[
'AddedToLocationEvent',
(item) => {
return !!item.location;
}
],
[
'RemovedFromLocationEvent',
(item) => {
return !!item.removedLocation;
}
],
[
'LinkEvent',
(item) => {
return !!item.linkedIssue;
}
],
[
'UnlinkEvent',
(item) => {
return !!item.removedLinkedIssue;
}
]
])
|
Events which need to be coalesced |
query |
Type : QueryComponent
|
Decorators :
@ViewChild(QueryComponent)
|
Component which is handling the query to the server |
Public timeFormatter |
Default value : new TimeFormatter()
|
provides functionality for time formatting for correct representation |
timelineItems |
Type : Array<CoalescedTimelineItem>
|
Default value : []
|
Already coalesced items for timeline representation |
Public timelineItems$ |
Type : DataList<IssueTimelineItem | >
|
Subscription for timelineitems |
./timeline.component.scss