Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/mdc to material ui #288

Closed
wants to merge 10 commits into from
Closed

Feature/mdc to material ui #288

wants to merge 10 commits into from

Conversation

ctrepka
Copy link

@ctrepka ctrepka commented Oct 29, 2020

Migration to partially resolve #271, a continual migration effort from mdc-web-components to Material-UI. Migrations also touch on transitions

  • Class components to functional components
  • scss to cssInJs
  • React Life Cycle methods to React Hooks

Note that the themeChooser component has been temporarily removed from the toolDrawer until all styles have been migrated from scss to cssInJs using the makeStyles / createMuiTheme hooks.

* Added MDC icons src script to index.html
* Adjusted all mdc-* classes for Material UI in Catalog Card and Catalog components
* Adjusted scss files for Material-UI class changes where necessary
* Moved spread op of prevState before declaration of showButton to avoid overwrite, causing scrollTop button to never show
* Fixed some performance issues caused by above state management issue
Made some progress on MaterialUI ToolDrawer today. Primary concerns noticed today include migrating from class components to functional components; MaterialUI is almost completely functional and plays better with functional components. By extention, the functional components also use Hooks rather than the old class-based life cycles. Finally, the components take advantage of functional, hook-based cssInJS styling, which will need to factor in to this migration plan as well. Progress outlined below:

* Moving toward hook-based components in stateless components like CollectionSorter
* Migrated ToolDrawer classes to MaterialUI components
* Migrating scss classes to use the makeStyles() hook from MaterialUI
* Continued to transition ToolDrawer and its child components to Material-UI. 
* Transitioned CatalogCard to functional component
* Still working on resolving url and CollectionFilter checkboxes to consistent state on page reloads, etc
Lots of changes here

* Refactored catalog.jsx to functional component, reducing by ~80 lines of code. Migrating scss to cssInJs file in dedicated folder
* Refactored loading animation into separate component <SweetLoadingScreen/> that can be used in anywhere in app
* CollectionTimeslider.jsx -> functional component, -> MaterialUI
* ToolDrawer.jsx to functional component, migrated cssInJs to separate file in {root} ./cssInJs
* Implemented onChangeCommitted method in collectionTimeslider.jsx so that filter is not executed until the slider is released. Local slider state still uses onChange. Makes for smoother UI experience uninterrupted by re-renders caused by change in props.visibleCollections
* Migrated Toast / Snackbar to MaterialUI and implemented with functional components and React Hooks.
* Mid-migration on several other sub-components in Catalog View, including the ShareButtons component
* More changes than listed here, but generally covers most changes. Nearly capable of being PR'd for a review.
Contains multiple class -> function refactors and some cleanup
@jwhaney
Copy link
Contributor

jwhaney commented Dec 18, 2020

closing this for now, but keeping the feature branch in case we can use this in the future rebuild. the plan is to still switch over to material UI if it makes sense, but it should probably wait until later in the rebuild project.

@jwhaney jwhaney closed this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update @material packages
2 participants