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

project-7-weather-app #425

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

erikamolsson
Copy link

Copy link
Contributor

@JennieDalgren JennieDalgren 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 with this project!

You are on the right track and have implemented the first features in a good way.
The searchbar is a stretch goal so I suggest not to focus on that at the moment.
The only thing that is missing to meet the requirements is the weather forecast

Try to follow that section in the instructions:

Feature: Weather forecast 📅
Show a forecast for the next 4 days. You can choose how to display the forecast - perhaps you want to show the min and max temperature for each day, or perhaps you want to show the temperature from the middle of the day, or the humidity, what it feels like and so on. Just make sure to make it all fit nicely with your chosen design.

https://api.openweathermap.org/data/2.5/forecast?q=Stockholm,Sweden&units=metric&APPID=YOUR_API_KEY
The API gives us the next 4-5 days but for every third hour. So a good idea could be to only use the weather data from the same time every day. You can filter the forecast list array to only get the info from 12:00 each day for example.

Read the endpoint documentation for the forecast.

Also don't forget to check previous questions and solutions to this on Stack Overflow. Many students have been struggling with this in previos cohorts too.
https://stackoverflowteams.com/c/technigo/questions/tagged/55

@JennieDalgren JennieDalgren self-assigned this Oct 4, 2024
Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

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

Sevilla weather looks good! Please remove the search bar until fully implemented so that it doesn't appear buggy.

code/script.js Outdated
Comment on lines 17 to 42
const searchInput = document.getElementById("city-input");
const searchButton = document.getElementById("btn-city-input");


/* Add event listener for the button click */
searchButton.addEventListener("click", function() {
cityWeather = searchInput.value;

console.log('Search query:', cityWeather);

});


// Trigger the search when the Enter key is pressed
searchInput.addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
// Prevent the default action of the Enter key (form submission, etc.)
event.preventDefault();

// Get the value from the search input field
cityWeather = searchInput.value;

// Log the search query
console.log('Search query (Enter pressed):', cityWeather);
}
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to comment this out as well, because right now it's broken 👀

@erikamolsson erikamolsson marked this pull request as draft February 3, 2025 20:27
Copy link
Contributor

@JennieDalgren JennieDalgren left a comment

Choose a reason for hiding this comment

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

Approved ⭐

@JennieDalgren JennieDalgren marked this pull request as ready for review February 13, 2025 17:57
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.

None yet

3 participants