forked from AdaGold/weather-report
-
Notifications
You must be signed in to change notification settings - Fork 24
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
C22 - Sarah K Charday N #16
Open
chardayneal
wants to merge
21
commits into
Ada-C22:main
Choose a base branch
from
chardayneal:deployed-version
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Co-authored-by: Charday Neal <[email protected]>
…ad and click events.
…mperature increment and decrement logic into a single updateTemp function. Added functionality to handle invalid temperature parsing using NaN. Centralized temperature color and landscape updates into dedicated functions, updateTempColor and updateLandscape. Cleaned up event listener setup for temperature controls and ensured proper initialization on DOM load. Refined temperature thresholds and landscape text for more dynamic updates. Changed cold temp color from blue to teal to match Ada solution.
…in the corresponding input box. Co-authored-by: Charday Neal <[email protected]>
…r functions getLocation and getWeather.
…ging, and landscape updates. Renamed temperature-related constants for clarity regarding unit of measurement. Created logError function for improved error handling for invalid temperature values. Updated updateTemp function to handle NaN values for invalid temperatures. Fixed registerHandlers to ensure city name input validation before fetching weather. Minor code formatting cleanup for consistency.
… and updateSky function to dynamically display sky conditions. Refactored temperature category mapping with getTemperatureCategory to improve readability and maintainability. Improved error handling by introducing logError and displayErrorMessage functions for better user feedback and debugging. Modified updateTemp to ensure default handling of invalid temperature values. Introduced registerHandlers for cleaner event listener registration. Replaced repetitive DOM queries with getElement utility and centralized elements mapping. Enhanced initial state setup for default city and weather display on page load.
…input element to default city when clicked.
…me, simplifying the displayWeatherForCity function and the currentTempButton event handler.
…h CDN link found in README based on instructor feedback.
…ult value for sky visual, added functionality to updateSky for UI reset. Combined updateTempColor and updateLandscape to single function, updateUI. Renamed functions for added clarity. Removed duplicated logError calls. Co-authored-by: Charday Neal [email protected]
…ns for better readability. Merged related constants into grouped objects DEFAULTS for default values and WEATHER_CONFIG for temperature schemes and sky views. Simplified temperature categories and their corresponding colors and landscapes. Updated functions to use the new constants. Co-authored-by: Charday Neal [email protected]
Removed duplicate call to updateSky on page load. Reorganized functio…
…y introducing a state object. Updated functions to modify the state directly, such as updateState, which now handles changes to the city, sky, temperature, and landscape. Simplified the logic for updating the UI based on the state and applied weather data. Removed redundant logic and ensured the app is easier to maintain and extend. Co-authored-by: Charday Neal [email protected]
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.
No description provided.