Skip to content

Commit

Permalink
feat(sfint-4205) : updates to timeline and user activity history comp…
Browse files Browse the repository at this point in the history
…onent (#98)

* feat(SFINT-4205): Updates to Timeline
  * Updated the timeline of UserActivity to better showcase the actions that occurred before the time where the Case/Ticket has been created. 
  * Split the actions in sessions that contain no more than 30 minutes of inactivity.
  * Display the session date as a header for the session, and only the time of each actions as subtext.
  * Create a virtual action that corresponds to whenever the case or ticket was created if this information is provided.
  * Do not show more than 5 sessions at a time, either the 4 sessions surrounding the case creation session, or the most recent 5 session if we can't find it.

* feat(SFINT-4204): Updates to the Session Summary section
  * Change the number of items shown by default from 4 to 3.
  * Change the titles of the sections to add "more" before.

* Fix the build process hopefully
  • Loading branch information
erocheleau committed Jan 26, 2022
1 parent 5cf8560 commit c9574fe
Show file tree
Hide file tree
Showing 15 changed files with 987 additions and 602 deletions.
221 changes: 221 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/components/UserActions/ClickedDocumentList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export interface IClickedDocumentList {
/**
* Number of Clicked Documents shown.
*
* Default: `4`
* Default: `3`
* Minimum: `1`
*/
numberOfItems: number;

/**
* Label of the list of Clicked Documents.
*
* Default: `Recent Clicked Documents`
* Default: `Most Recent Clicked Documents`
*/
listLabel: string;

Expand Down Expand Up @@ -63,11 +63,11 @@ export class ClickedDocumentList extends Component {
*/
static readonly options: IClickedDocumentList = {
numberOfItems: ComponentOptions.buildNumberOption({
defaultValue: 4,
defaultValue: 3,
min: 1,
}),
listLabel: ComponentOptions.buildStringOption({
defaultValue: 'Recent Clicked Documents',
defaultValue: 'Most Recent Clicked Documents',
}),
userId: ComponentOptions.buildStringOption({ required: true }),
template: ComponentOptions.buildTemplateOption({
Expand Down
8 changes: 4 additions & 4 deletions src/components/UserActions/QueryList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ export interface IQueryListOptions {
/**
* Number of User Queries shown.
*
* Default: `4`
* Default: `3`
* Minimum: `1`
*/
numberOfItems: number;

/**
* Label of the list of User Queries.
*
* Default: `Recent Queries`
* Default: `Most Recent Queries`
*/
listLabel: string;

Expand Down Expand Up @@ -73,13 +73,13 @@ export class QueryList extends Component {
*/
static readonly options: IQueryListOptions = {
numberOfItems: ComponentOptions.buildNumberOption({
defaultValue: 4,
defaultValue: 3,
min: 1,
required: true,
}),

listLabel: ComponentOptions.buildStringOption({
defaultValue: 'Recent Queries',
defaultValue: 'Most Recent Queries',
}),

transform: ComponentOptions.buildCustomOption<(query: string) => Promise<HTMLElement>>(DEFAULT_TRANSFORMATION, {
Expand Down
8 changes: 8 additions & 0 deletions src/components/UserActions/Strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ Translation.register(Language.English, {
UserActivity_click: 'Clicked Document',
UserActivity_view: 'Page View',
UserActivity_custom: 'Custom Action',
UserActivity_ticketCreated: 'Ticket Created',
UserActivity_showNewSession: 'Show new session',
UserActivity_showPastSession: 'Show past session',
UserActivity_showMore: 'Show More',
UserActivity_showMoreActions: 'More Actions',
UserActivity_session: 'Session',
UserActivity_emptySearch: 'Empty Search',
UserActivity_invalidDate: 'Invalid date for ticket creation',
});
Loading

0 comments on commit c9574fe

Please sign in to comment.