Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 3032eb7

Browse files
committed
pr cm
INT-14085
1 parent 7747b33 commit 3032eb7

File tree

3 files changed

+92
-83
lines changed

3 files changed

+92
-83
lines changed

docs/List.md

Lines changed: 90 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
List are used for listing items on page
22

3-
[Card](/#/Content/Cards/Card) is used for list item instead of smart list
4-
List should be limited to **10** cards each except person profile (20 cards)
3+
Page content generally takes the forms of lists of items.
4+
As a general rule, we display data using paginated lists of 10 [Card](/#/Content/Cards/Card) components per page.
5+
There are exceptions but please run this through the frontend/design guild before committing to any designs.
56

6-
Sections from top to bottom:
7+
List pages contain the following elements, typically in this order:
78
- Filter and sort section
89
- Statistic tiles
910
- cards
1011
- Pagination section
1112

12-
There is sLarge spacing 24px between each section and sXSmall between Cards
13+
There is sLarge spacing between each section and sXSmall between Cards
1314

1415
![list page](./image/ListPage.png)
1516

16-
Tab is not recommended. You can consider to have default filter on the page to enable user focus on the more important content like extended leave.
17+
We generally don't use tabs - instead we use filter bars. You can apply default filters on the page where necessary.
1718

1819
![list with default filter](./image/ListWithDefaultFilter.png)
1920

@@ -25,31 +26,32 @@ Tabs should be limited to one line on mobile view
2526
<br />
2627

2728
### Filter and sort section
28-
All list should have filter (filter button and search bar) function when the page is customer facing
29+
Lists of user generated data that are expected to have more than a page of data should always have filter and search functionality
2930
Sort function would be depend on case but highly recommend if page has any call for action or stress level like compliance
3031

3132
Filter and search section consists of
3233
- filter section (filter button, search input and date range filter)
3334
- sort section
3435
- other special action section
3536

36-
There is sMedium spacing 16px between each section and sXSmall spacing 8 px within section
37+
There is sMedium spacing between each section and sXSmall spacing within section
3738

3839
#### Filter section
39-
Filter section should have sXSmall spacing 8px between each item within the section
40-
Filter button will always br joined to the left of the search bar
41-
search bar should indicate the searchable text in the placeholder
40+
Filter section should have sXSmall spacing between each item within the section
41+
Filter button will always be joined to the left of the search bar
42+
Search bar placeholder text should inform the user what they can search on
43+
Search should only search on free text fields like names and descriptions while things like categories and types should be managed by filters
4244

43-
Filter section should have 8px between tags and filter controller
45+
Filter section should have sXSmall spacing between tags and filter controller
4446

4547
#### Sort section
4648
Sort by will always sit to the right of the filter section
47-
Sort section should have sXSmall spacing 8px between label and input
49+
Sort section should have sXSmall spacing between label and input
4850

4951
#### Actions section
50-
Actions section should have sXSmall spacing 8px between rach button
52+
Actions section should have sXSmall spacing between each button
5153

52-
Actions are displayed in icon with a dark style tooltip popver in default button style.
54+
Actions are displayed in icon with a dark style tooltip popover in default button style.
5355
Most common used actions goes first from right to left.
5456

5557
If no icon fits the use case, use default button instead. Text on page action buttons should be limited to one line on mobile view
@@ -291,12 +293,12 @@ const handleFilterAdded = (filterInfo) => {
291293
<Inline spacing={Variables.Spacing.sXSmall}>
292294
<Button
293295
icon={<FontAwesomeIcon type='solid' icon='archive' />}
294-
iconAlignment='no'
296+
iconAlignment='center'
295297
onClick={() => alert('archive action')}
296298
/>
297299
<Button
298300
icon={<FontAwesomeIcon type='solid' icon='download' />}
299-
iconAlignment='no'
301+
iconAlignment='center'
300302
onClick={() => alert('download action')}
301303
/>
302304
</Inline>
@@ -329,69 +331,74 @@ const handleFilterAdded = (filterInfo) => {
329331
<br />
330332

331333
### Statistic section
332-
The label text length should be limited to one line with additional info in ( ) 
The value should be in one line too.
334+
Keep statistics concise so the label and value both only take up one line. Always keep these in a Carousel for a good mobile experience
333335

334336
The high stress level status statistic order from left to right.
335337

336338
```jsx
337339
import { Carousel } from '@Domain/Layouts';
338340
import { Statistic } from '@Domain/Formats';
339341

340-
<>
341-
<Carousel>
342-
<Carousel.Tile>
343-
<Statistic
344-
title='Overdue'
345-
value='2'
346-
/>
347-
</Carousel.Tile>
348-
<Carousel.Tile>
349-
<Statistic
350-
title='Expiring Soon'
351-
value='1'
352-
/>
353-
</Carousel.Tile>
354-
<Carousel.Tile>
355-
<Statistic
356-
title='Missing End Dates'
357-
value='3'
358-
/>
359-
</Carousel.Tile>
360-
</Carousel>
361-
<Carousel>
362-
<Carousel.Tile>
363-
<Statistic
364-
title='Total Session'
365-
value='25'
366-
/>
367-
</Carousel.Tile>
368-
<Carousel.Tile>
369-
<Statistic
370-
title='Total Hours'
371-
value='211'
372-
/>
373-
</Carousel.Tile>
374-
<Carousel.Tile>
375-
<Statistic
376-
title='Total Cost (AUD)'
377-
prefix='AUD'
378-
value='54,118.00'
379-
/>
380-
</Carousel.Tile>
381-
<Carousel.Tile>
382-
<Statistic
383-
title='Total Cost (DZD)'
384-
prefix='DZD'
385-
value='99.00'
386-
/>
387-
</Carousel.Tile>
388-
</Carousel>
389-
</>
342+
<Carousel>
343+
<Carousel.Tile>
344+
<Statistic
345+
title='Overdue'
346+
value='2'
347+
/>
348+
</Carousel.Tile>
349+
<Carousel.Tile>
350+
<Statistic
351+
title='Expiring Soon'
352+
value='1'
353+
/>
354+
</Carousel.Tile>
355+
<Carousel.Tile>
356+
<Statistic
357+
title='Missing End Dates'
358+
value='3'
359+
/>
360+
</Carousel.Tile>
361+
</Carousel>
362+
363+
```
364+
365+
```jsx
366+
import { Carousel } from '@Domain/Layouts';
367+
import { Statistic } from '@Domain/Formats';
368+
369+
<Carousel>
370+
<Carousel.Tile>
371+
<Statistic
372+
title='Total Session'
373+
value='25'
374+
/>
375+
</Carousel.Tile>
376+
<Carousel.Tile>
377+
<Statistic
378+
title='Total Hours'
379+
value='211'
380+
/>
381+
</Carousel.Tile>
382+
<Carousel.Tile>
383+
<Statistic
384+
title='Total Cost (AUD)'
385+
prefix='AUD'
386+
value='54,118.00'
387+
/>
388+
</Carousel.Tile>
389+
<Carousel.Tile>
390+
<Statistic
391+
title='Total Cost (DZD)'
392+
prefix='DZD'
393+
value='99.00'
394+
/>
395+
</Carousel.Tile>
396+
</Carousel>
390397
```
391398

392399

393400
### Pagination section
394-
All list should have [Pagination](/#/Interaction/Pagination) when the page is customer facing
401+
Lists of user generated data that are expected to have more than a page of data should always have [Pagination](/#/Interaction/Pagination) functionality
395402
It should be hidden when there is no record (also no result when filtering)
396403

397404
```jsx
@@ -434,28 +441,30 @@ import { Variables } from '@Common';
434441
```
435442

436443
### Loading state
437-
List section (from top to bottom): filter and sort section, statistics tile, cards, pagination with sLarge spacing 24px in between
444+
The following values will typically work for most content, but depending on the size of your content they may need minor adjustments.
438445

439-
Filter and sort section goes together as a 40px height skeleton
440-
Statistics tile would depend on the number of tile would the list have (It would be depend on minimum number of tile so it would not include the optional ones)
441-
The skeleton would be 200 x 90 with 8 margin in between
Cards section skeleton would have three cards only and the skeleton height would depend on the card height on that page
446+
Filter Section: sLarge spacing height
447+
sLarge spacing between section
448+
Statistics: 200px wide | 90px height | sXSmall spacing between each tile skeletons
449+
sLarge spacing between section
450+
Cards: Match your actual card height | sXSmall spacing between each card skeletons
442451

443-
Pagination section would not have a skeleton for it
452+
No skeleton for pagination bar
453+
454+
Only display the minimum number of Statistics/Cards that the page can load with. If it always has 6 Statistics, then show 6 skeletons. For lists of Cards, display as many as a full page of results (typically 10) unless the content is unlikely to reach a full page of results.
444455

445456
```jsx
446457
import { BlockSkeleton } from '@Domain/Skeletons';
447-
import { Inline } from '@Domain/Layouts';
458+
import { Inline, Carousel } from '@Domain/Layouts';
448459
import { Variables } from '@Common';
449460

450461
<>
451462
<BlockSkeleton margins={{ bottom: Variables.Spacing.sLarge}} height={Variables.Spacing.s2XLarge}/>
452-
<Inline
453-
margins={{ bottom: Variables.Spacing.sLarge}}
454-
>
455-
<BlockSkeleton height={90} width={200}/>
456-
<BlockSkeleton height={90} width={200}/>
457-
<BlockSkeleton height={90} width={200}/>
458-
</Inline>
463+
<Carousel margins={{ bottom: Variables.Spacing.sLarge}}>
464+
<BlockSkeleton display='inline-block' margins={{ right: Variables.Spacing.sXSmall}} height={90} width={200}/>
465+
<BlockSkeleton display='inline-block' margins={{ right: Variables.Spacing.sXSmall}} height={90} width={200}/>
466+
<BlockSkeleton display='inline-block' height={90} width={200}/>
467+
</Carousel>
459468
<Inline collapse>
460469
<BlockSkeleton height={78}/>
461470
<BlockSkeleton height={78}/>

src/domain/Buttons/BaseButton/BaseButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface IBaseButtonProps {
4141
/** What type of button to display */
4242
type?: ButtonType
4343
/** Alignment of the button icon */
44-
iconAlignment?: 'left' | 'right' | 'no'
44+
iconAlignment?: 'left' | 'right' | 'center'
4545
/** Icon component passed to Button */
4646
icon?: JSX.Element
4747
/** Any extra classes */

src/domain/Buttons/BaseButton/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ $button-styles: (
662662
margin-left: $spacing-xsmall;
663663
}
664664

665-
&.no {
665+
&.center {
666666
margin: 0;
667667
}
668668
}

0 commit comments

Comments
 (0)