Skip to content

Advanced js week4 mila#225

Open
lucy-semenova wants to merge 36 commits into
HackYourFuture-CPH:mainfrom
lucy-semenova:advanced-js-week4-mila
Open

Advanced js week4 mila#225
lucy-semenova wants to merge 36 commits into
HackYourFuture-CPH:mainfrom
lucy-semenova:advanced-js-week4-mila

Conversation

@lucy-semenova
Copy link
Copy Markdown

PR contains a Screenshot Generator app that allows users to capture, save, and manage website screenshots using external APIs.

The app integrates two APIs:

  • RapidAPI for generating screenshots
  • CrudCrud for storing and managing saved data

The user can:

  • Enter a website URL and generate a screenshot preview
  • Save the screenshot together with the URL and timestamp
  • View all previously saved screenshots when the page loads
  • Delete individual screenshots
  • Open saved websites in a new tab

Notes

  • CrudCrud endpoints are temporary and may expire
  • The app requires API keys to function fully
  • Without API keys, the UI loads but API functionality will not work

What I learned

This assignment helped me practice working with APIs, structuring code into modules, handling errors in a more organized way, and designing reusable UI components using classes.

lucy-semenova and others added 30 commits October 29, 2025 10:04
…r, center the heading,script.css add button to change the background,reflection.md reflect on Copilot use
Copy link
Copy Markdown

@Khandohii Khandohii left a comment

Choose a reason for hiding this comment

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

Great job, Liudmyla! The application successfully captures screenshots. Unfortunately, I wasn’t able to fully test saving and loading screenshots due to endpoint limitations. Good catch noting that the API can be unstable.

I’ve left a couple of small suggestions in the comments. For the future, it would be really helpful to include clear steps on how to test the application — it makes things much easier for reviewers, especially for someone who is new to the project 🙂

@@ -0,0 +1,56 @@
<!doctype html>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I assume the files outside the screenshotGenerator folder are not related to the final result. It would be good to remove them if they are not used, to keep the file structure clean and clear.

if (err instanceof SaveError) {
error.textContent = err.toUserMessage();
} else if (err instanceof TypeError) {
error.textContent = new NetworkError().toUserMessage();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This error occurs with the response "413 Request Entity Too Large", which is not related to network issues. It would be better to show a more appropriate message to the user, such as: "Could not save the screenshot. Please try again later."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Dmytro, that’s a great point!
You’re right — a 413 "Request Entity Too Large" error is not a network issue, so the current message is misleading.
I’ll update the error handling to provide a more accurate user-facing message.

@lucy-semenova
Copy link
Copy Markdown
Author

lucy-semenova commented Apr 20, 2026

Thank you for the kind feedback!
The API limitations made it a bit tricky to fully test saving/loading, so I appreciate your understanding.
I have checked the work of the app replacing an API key with a newly generated one which is active only for 24 hours and it works.

Also, thank you for highlighting the importance of adding testing steps — I’ll definitely include clearer instructions in future PRs.

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