refactoring Library.jsx into more manageable smaller components#229
Open
refactoring Library.jsx into more manageable smaller components#229
Conversation
BlackBond06
reviewed
Feb 26, 2025
Collaborator
BlackBond06
left a comment
There was a problem hiding this comment.
Hi @gbowne1 thank you for the opportunity to review your pr. Looking at the Library component, your pr has significantly reduced the amount of code into smaller sub-components, which is useful. But, the code did not compile for testing because the following files were missing or have not been created yet:
- Modal folder containing AddBookModal, ReviewModal, ReadReviewModal, and LibraryAddModal files.
- AddBookButton, NotificationSnackbar, and BookTableRow jsx files
There were also prop-types entries missing prop validation. This is a really good foundation, but requires additional help to make it functional.
Owner
Author
|
Yes. I established this PR without those files so that the initial refactoring could be made easier than having to go through the layers and pull out code for everything. I would suggest merging this asis and then adding whats needed now that the hard work is done making Library.jsx a light weight file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have made the Library.jsx smaller by refactoring it into several components and some new hooks.
This will need more testing and possibly some tweaks to it for it to work properly.
But, I feel like this is the way forward with the Library.jsx component being overly large and not that maintainable as it was over 1k lines of code.