Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

Element

Where’s it used currently?

What are we going to replace it with?

JIRA Ticket

Collapsible left-hand menu

SidebarNav.tsx

Sidebar.tsx

Globals.scss

_sidebar.scss

MUI Drawer 

https://openlibraryfoundation.atlassian.net/browse/DCB-255

Breadcrumb

Breadcrumb.tsx

Header.tsx

_header.scss

MUI Breadcrumbs

https://openlibraryfoundation.atlassian.net/browse/DCB-256

Table

Bootstrap Table

Table.tsx

@tanstack/react-table

Table.tsx

useResource.ts

agencies/index.tsx

hostlms/index.tsx

locations/index.tsx

requests/index.tsx

Table component

Details.tsx

components/Table/index.ts

agencies/index.tsx

hostlms/index.tsx

locations/index.tsx

requests/index.tsx

MUI X Data Grid (see 3.3.1)

https://openlibraryfoundation.atlassian.net/browse/DCB-231

Typography (Headers, titles etc)

Throughout

MUI Typography 

https://openlibraryfoundation.atlassian.net/browse/DCB-304

Dropdowns / Selects

HeaderProfileNav.tsx

Replacing dropdown with MUI App Bar

https://openlibraryfoundation.atlassian.net/browse/DCB-278

Button

Details.tsx

Header.tsx

Sidebar.tsx

SideBar.nav

Groups

Hostlms

Locations

Requests

login

MUI Button - one primary button per page (as rule - occasional exceptions may be necessary)

https://openlibraryfoundation.atlassian.net/browse/DCB-304

Icons

Profile.tsx

React Icons - standard switch from FontAwesome icons currently present (and any others)

https://openlibraryfoundation.atlassian.net/browse/DCB-303

Search

Table.tsx

MUI X Data Grid Quick Filter

(Will be implemented as part of the Data Grid)

https://openlibraryfoundation.atlassian.net/browse/DCB-231

Card

Profile.tsx

MUI Card + Paper (to hold cards)

https://openlibraryfoundation.atlassian.net/browse/DCB-304

Modal

Details.tsx

AddAgenciesToGroup.tsx

agencies/index.tsx

groups/index.tsx

NewGroup.tsx

requests/index.tsx

MUI Modal, Dialog (for things like confirmation).

https://openlibraryfoundation.atlassian.net/browse/DCB-304

Pagination (this refers only to the UI pagination controls)

Table.tsx

MUI x Datagrid 

With customisation so user can go to Page ‘X’ by clicking on the number / typing it in

https://openlibraryfoundation.atlassian.net/browse/DCB-231

Possible Future Components (to be implemented in those tickets)

Tabs

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.

MUI Accordion

Future ticket when needed

...

Choices

MUI - React Table

Material React Table

Notes/Documentation

MUI documentation

Material React Table documentation 

Pros

  • The project already uses TanStack.

  • Imports TanStack as well as only the necessary components from MUI

  • No need to switch UI components If the project decides to switch from MUI to another UI 

Cons

x

Package size

501.3kB (entire material package)

11.3kB - table package

176.9kB

Usage & Maintenance Stats

(package score)

95/100

83/100

Final Choice 

x

Justification

The project already uses TanStack so there is no current need to import a library that imports TanStack again

...

Choices

MUI - Modal Component

react-modal

Notes/Documentation

Documentation

Npm package page

Pros

  • Already themed (visually pleasing)

  • Seems easy to implement

  • Highly customisable

Cons

  • Nothing notable

  • CSS will need customising as the default modal is not visually pleasing

  • Inactive maintenance 

Package size

501.3kB

17.9kB - Modal

186kB

Usage & Maintenance Stats

(package score)

95/100

80/100

Final Choice 

x

Justification

No notable issues

4.1 Tabs

Choices

MUI Tabs

React-Tabs

Notes/Documentation

Documentation 

Website

Pros

  • No extra import

  • More options for customising (tabs inside tabs, dynamic tabs)

  • Very small package size

Cons

  • Simple compared to react-tabs

Package size

501.3kB

16.5kB - Tabs

6.5kB

Usage & Maintenance Stats

(package score)

95/100

86/100

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.

...