Skip to content

London | Maryn Romanova | Module-Data-Flows | Book Library Project #206

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MarynaRomashca
Copy link

@MarynaRomashca MarynaRomashca commented Apr 19, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@MarynaRomashca MarynaRomashca added the Needs Review Participant to add when requesting review label Apr 19, 2025
@jenny-alexander jenny-alexander self-requested a review April 20, 2025 21:22
@jenny-alexander jenny-alexander added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Apr 20, 2025
Copy link

@jenny-alexander jenny-alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can you review all of the places that you declared a variable with 'let'? In general, you will mostly always use const (and this should be your default). If you need to reassign a value to the variable, then you would use let. Here is a video you can watch: https://youtu.be/RE6qf3As-XU?si=_YaiEPeBC5Cx_j56

  2. The 4 variables on lines 24-27 are currently declared as global variables. However, they are only used within the submit function.
    Can modify your code so that they are no longer global variables and are declared as local variables?
    Making this change means the variables won't be created until they are needed within the submit function. This makes the code cleaner and more maintainable!
    https://www.w3schools.com/js/js_scope.asp

  3. Currently your application does not have a title in the browser tab (see screenshot). Can you update the application title to something more meaningful?

Screenshot 2025-04-20 at 4 38 38 PM
  1. After adding a new book to the library, the form still contains the books details. If I want to add another book, I have to clear out the form fields. Can you update the application to clear out the fields after successfully adding a book to the library?

  2. Please make sure to update the Changelist section of the PR with a short explanation of your changes.

Screenshot 2025-04-20 at 8 50 42 PM

@jenny-alexander jenny-alexander added Needs Review Participant to add when requesting review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Apr 21, 2025
@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Apr 21, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Apr 21, 2025

@jenny-alexander You gave a review yesterday. So I assumed you meant to add "Reviewed" label and changed the label.

@MarynaRomashca Please respond the the reviewer's feedback and change your code accordingly. Your Step 4 will only be approved when you have completed this PR.

@MarynaRomashca
Copy link
Author

@jenny-alexander and @cjyuan I have change my code accordingly. @jenny-alexander please approve my PR, or let me know if I need to do extra work.

@jenny-alexander
Copy link

@jenny-alexander and @cjyuan I have change my code accordingly. @jenny-alexander please approve my PR, or let me know if I need to do extra work.

@MarynaRomashca - can you please check the "read" status when adding a new book? It seems to be doing the opposite of what is intended.

  • update the changelist in the Pull Request to briefly explain what this PR does.

@jenny-alexander jenny-alexander added Needs Review Participant to add when requesting review Reviewed Volunteer to add when completing a review and removed Reviewed Volunteer to add when completing a review Needs Review Participant to add when requesting review labels Apr 21, 2025
@MarynaRomashca
Copy link
Author

@jenny-alexander Thanks for your time. Done, I have up dated the "read" status in the right direction.

Copy link

@jenny-alexander jenny-alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but pointing out that the changelist portion is still not updated.

@jenny-alexander jenny-alexander added Complete Volunteer to add when work is complete and review comments have been addressed and removed Reviewed Volunteer to add when completing a review labels Apr 21, 2025
@MarynaRomashca
Copy link
Author

@jenny-alexander Thanks for aprroval. Sorry, I don't understend, where is a ChangeList? How to find it?
I can just write you there:
My change list:

  1. Converted unnecessary "let" declarations to "const" for better readability and immutability.
  2. Moved DOM element selections (title, author, pages, check) inside the submit() function to limit their scope and reduce global variables.
  3. Simplified code form validation using if (!title.value || !pages.value).
  4. Improved render() function to clear and rebuild table correctly.
  5. Updated read/unread toggle button logic with instant re-render.

@cjyuan
Copy link
Contributor

cjyuan commented Apr 21, 2025

@MarynaRomashca This "Changelist"

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and review comments have been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants