Skip to content

London | 25-ITP-May | Houssam Lahlah | Sprint 3 | Quote-Generator #748

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

Closed
wants to merge 32 commits into from

Conversation

HoussamLh
Copy link

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

## Changelist

What I did:

  • Updated the button text from "Generate Quote" to "New quote" in the HTML to match the expected value in the test.

  • Updated quote.js to ensure clicking the button triggers a new quote.

  • Verified functionality works as expected and tests pass.

Why:

This change ensures the UI aligns with the test cases, maintaining consistency and passing all automated checks.

Questions for Reviewer

  • Is the button label "New quote" the best choice, or would a different label be more clear or accessible?

  • Should I make any further style changes to improve readability or usability?

  • Is the function in quote.js structured well, or would you suggest any improvements?

HoussamLh added 30 commits July 25, 2025 20:42
- Changed console.log to use address.houseNumber instead of address[0]
- Ensures correct display of house number in output
- Replaced invalid for...of loop on object with Object.values()
- Ensures all property values of author are logged without errors
- Replaced object string output with ingredients joined by newline
- Ensures each ingredient is printed on its own line as intended
- Added 'contains' function to verify if an object has a given property key.
- Handles invalid inputs gracefully by returning false.
- Added comprehensive tests for empty objects, existing/non-existing properties, and invalid inputs.
- Created 'createLookup' function file with module export.
- Added a test.todo placeholder for creating country-currency code lookup functionality.
- Setup initial structure for implementation and testing.
- Updated 'parseQueryString' to correctly parse query string values containing '=' characters.
- Added test to verify parsing of complex values like 'equation=x=y+1'.
- Ensured other edge cases handled appropriately.
- Implemented 'tally' function to return an object with counts of each unique item.
- Throws error for invalid inputs (non-array).
- Added tests for empty arrays, duplicate counting, and invalid input error throwing.
- Changed from array-style access (address[0]) to object property access (address.houseNumber)
- Logs the house number correctly now
- Replaced invalid for...of loop over object with Object.values() to log all property values
- Added a for loop to print each ingredient on its own line
- Improved readability of recipe output
- Replaced incorrect property assignment with dynamic key
- Added tests for numeric and string values, and edge cases
- Converted coin keys (e.g. "1p") to numeric values before multiplication
- Fixed issue where multiplying string by number caused NaN result
- Added tests to verify correct total calculation and empty till case
- test case for handle large quantities
- Filters out non-number values before calculating median
- Sorts numbers without modifying input array
- Handles even and odd length arrays correctly
- Returns null for invalid or empty inputs
- dedupe removes duplicates preserving the first occurrence
- tests cover empty array, no duplicates, and arrays with duplicates
- Implemented findMax to return the largest numeric value in an array
- Ignores non-number elements and returns -Infinity for empty or no numeric input
- Added tests covering empty arrays, single element, positive/negative numbers, decimals, and mixed input types
- Added sum function to calculate the total of numeric elements in an array, ignoring non-numeric values.
- Created comprehensive tests covering empty arrays, negative numbers, decimals, and non-numeric inputs.
a traditional for loop for cleaner and more idiomatic iteration.
- Read full puzzle input from file
- Calculate resulting frequency by summing all changes
- Output the final frequency for submission
…author, and background color based on read status
…w controls

- Changed button IDs in HTML to 'auto-forward', 'auto-backward', and 'stop'
- Updated slideshow.js to use the new button IDs
- Fixed test errors caused by mismatched element IDs in automatic slideshow feature
- Uses that delay in milliseconds when auto-forward or auto-backward is activated.
- Disables/enables delay input along with auto buttons for a clean UX.
…listeners

- Changed input ID references to 'todoInput' to match HTML
- Added comments for clarity in populateTodoList, addNewTodo, and deleteAllCompletedTodos functions
- Ensured todo creation and deletion buttons work correctly
- Added event listeners for form submission and remove completed button
@HoussamLh HoussamLh added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 6, 2025
@HoussamLh HoussamLh closed this Aug 6, 2025
@HoussamLh HoussamLh reopened this Aug 6, 2025
@HoussamLh HoussamLh added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 6, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Aug 9, 2025

I expect this PR branch to include only implementation of the Quote Generator but it currently contains 63 modified files, most of which are not related to Quote Generator.

Can you clean up this PR branch (so that it contains only modified files related to the Quote Generator app)?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 9, 2025
@HoussamLh HoussamLh removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Aug 10, 2025
@HoussamLh HoussamLh closed this Aug 10, 2025
@HoussamLh
Copy link
Author

Thanks for your feedback.

I created a new branch named Clean-quote-generator that contains only the Quote Generator implementation and related files. This branch is cleaned up from unrelated files like prep and others.

Please review the PR from the Clean-quote-generator branch, and let me know if you need any further changes.

Thanks again for your support!

@cjyuan
Copy link
Contributor

cjyuan commented Aug 10, 2025

Including a link to the new PR here can help track its history. Could you share your new PR link?

@HoussamLh
Copy link
Author

Hi cjyuan,

I'm sorry Iforgot to the link to the new clean pull request that includes only the changes related to the Quote Generator feature, with unrelated files like the prep folder removed.

You can review the new PR here: #757

Please let me know if you have any questions or feedback. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants