Please note: this is an archived copy. For the most up to date version see https://docs.google.com/document/d/1PviXkmbkl3Q-2Ygvhgw2nzqeL273cpaCDvlyK-ShEs0/edit?usp=sharing
The existing Admin app needs evaluating with a view to replacing components to fix issues with non compliance against accessibility guidelines, and to enable better development in the long term.
...
Possible Future Components (to be implemented in those tickets)
Not yet used but will be needed for different data views. | MUI Tabs | Future ticket when needed | |
Accordion | Not yet used but will be needed for record views. | Future ticket when needed |
3 ) Review
Components have been selected from Material design libraries and evaluated against the goals (see section 1) for their suitability for use in the Admin app.
3.1. Collapsible left-hand menu
Choices | MUI - React Drawer | react-pro-sidebar | react-burger-menu | Custom |
Notes/Documentation | N/A | |||
Pros |
|
|
|
|
Cons |
|
|
|
|
Package size | 501.3kB (entire material package) 20.4kb - drawer package | |||
Usage & Maintenance Stats (package score) | ||||
Final Choice | x | |||
Justification | Included in the MUI package that is planned to be used, making it convenient. |
3.2. Breadcrumb
Choices | MUI - Breadcrumbs | react-router-dom |
Notes/Documentation | https://reactrouter.com/en/main/hooks/use-matches#breadcrumbs | |
Pros |
|
|
Cons |
| |
Package size | 501.3kB (material package) 19.4kB - breadcrumb package | |
Usage & Maintenance Stats (package score) | ||
Final Choice | x | |
Justification | Included in the MUI package and there is no need to rework routing from next js to use it. |
3.3. Table
Choices | MUI - React Table | Material React Table |
Notes/Documentation | ||
Pros |
|
|
Cons | x | |
Package size | 501.3kB (entire material package) 11.3kB - table package | |
Usage & Maintenance Stats (package score) | ||
Final Choice | ||
Justification | The project already uses TanStack so there is no current need to import a library that imports TanStack again |
3.3.1 Data Grid Assessment
...
Sorting columns
Searching
Filtering
Clicking on rows to reveal details (as opposed to one column being a ‘link’)
Checkbox select
Menu for future bulk actions
3.4. Typography
Choices | MUI - Typography | Custom Typography component |
Notes/Documentation | ||
Pros |
| |
Cons | Nothing notable |
|
Package size | 501.3kB (entire material package) 11.8 kB - Typography | |
Usage & Maintenance Stats (package score) | ? | |
Final Choice | x | |
Justification | It will be easier than coding a new Typography component. |
3.5 Dropdowns/Selects
Choices | Custom | ||
Notes/Documentation | Documentation linked to title | Documentation linked to title | |
Pros |
|
|
|
Cons |
|
|
|
Package size | 501.3kB (entire material package 23.kB - Menu | ||
Usage & Maintenance Stats (package score) | ? | ||
Final Choice | x | ||
Justification | Unless we need the specified features of react-select, there is no need to use it yet. |
3.6. Button
Choices | MUI - Button Component | Custom |
Notes/Documentation | ||
Pros |
|
|
Cons | ? |
|
Package size | 501.3kB (entire material package) 17.2kB - Button | |
Usage & Maintenance Stats (package score) | ? | |
Final Choice | x | |
Justification | Searching around, there seem to be no good single package replacements for the MUI button. It is possible to use a button from another package, however the MUI one is already included in the package the project plans to use |
3.7. Icons
Choices | MUI Icons | React Icons | Font Awesome |
Notes/Documentation | |||
Pros |
|
|
|
Cons |
|
|
|
Package size | |||
Usage & Maintenance Stats (package score) | |||
Final Choice | x | ||
Justification | Small package size and no pay wall for icons |
3.9. Card
Choices | MUI Card | react-ui-cards |
Notes/Documentation | ||
Pros |
|
|
Cons |
|
|
Package size | 11.8kB - Card | |
Usage & Maintenance Stats (package score) | ||
Final Choice | x | |
Justification | The package size for react-ui-cards is quite large |
4.0. Modal
Choices | MUI - Modal Component | react-modal |
Notes/Documentation | ||
Pros |
|
|
Cons |
|
|
Package size | 17.9kB - Modal | |
Usage & Maintenance Stats (package score) | ||
Final Choice | x | |
Justification | No notable issues |
4.1 Tabs
Choices | MUI Tabs | React-Tabs |
Notes/Documentation | ||
Pros |
|
|
Cons |
| |
Package size | 16.5kB - Tabs | |
Usage & Maintenance Stats (package score) | ||
Final Choice | x | |
Justification | This is just a suggestion as tabs are already included in the MUI package, but if more features are needed I would recommend switching over to react-tabs. |
Final Summary
The Material UI switchover was completed in DCB-306, with the work captured in DCB-278 and the results can be viewed at https://admin.dev.resharedcb.org/ . The key improvements this work has delivered have been captured below.
...