Sarah Williams + Morgan Adkisson - Whales#65
Open
MorganAdkisson wants to merge 20 commits into
Open
Conversation
…ting, helper function added for text color and garden landscape change depending on temp ranges
…itions object created to hold values
…updated with the daily temps when the real time button is pressed
…nd .catch to axios calls
kaidamasaki
reviewed
Jul 19, 2022
kaidamasaki
left a comment
There was a problem hiding this comment.
Great job!
I left a few small comments but those are all pretty minor.
Well done!
| @@ -0,0 +1,144 @@ | |||
| const GARDENSKIES = { | |||
There was a problem hiding this comment.
I really like this approach! Very clean and extensible!
| } else if (temp < 50) { | ||
| currentCondition = CONDITIONS.cold; | ||
| } | ||
| el.style.color = currentCondition.text; |
There was a problem hiding this comment.
Using class names for this would have put all the styling in one location, though admittedly having your settings at the top of the file makes that less necessary.
Comment on lines
+8
to
+14
| const CONDITIONS = { | ||
| hot: { landscape: '🌵__🐍_🦂_🌵🌵__🐍_🏜_🦂', text: 'red' }, | ||
| warm: { landscape: '🌸🌿🌼__🌷🌻🌿_☘️🌱_🌻🌷', text: 'orange' }, | ||
| moderate: { landscape: '🌾🌾_🍃_🪨__🛤_🌾🌾🌾_🍃', text: 'yellow' }, | ||
| chilly: { landscape: '🌲🌲⛄️🌲⛄️🍂🌲🍁🌲🌲⛄️🍂🌲', text: 'green' }, | ||
| cold: { landscape: '❄️🌲⛄️🌲❄️🏂⛄️🌲❄️⛷🌲❄️🌲', text: 'teal' }, | ||
| }; |
There was a problem hiding this comment.
Style: I it would have been clearer if you called the key color instead text:
Suggested change
| const CONDITIONS = { | |
| hot: { landscape: '🌵__🐍_🦂_🌵🌵__🐍_🏜_🦂', text: 'red' }, | |
| warm: { landscape: '🌸🌿🌼__🌷🌻🌿_☘️🌱_🌻🌷', text: 'orange' }, | |
| moderate: { landscape: '🌾🌾_🍃_🪨__🛤_🌾🌾🌾_🍃', text: 'yellow' }, | |
| chilly: { landscape: '🌲🌲⛄️🌲⛄️🍂🌲🍁🌲🌲⛄️🍂🌲', text: 'green' }, | |
| cold: { landscape: '❄️🌲⛄️🌲❄️🏂⛄️🌲❄️⛷🌲❄️🌲', text: 'teal' }, | |
| }; | |
| const CONDITIONS = { | |
| hot: { landscape: '🌵__🐍_🦂_🌵🌵__🐍_🏜_🦂', color: 'red' }, | |
| warm: { landscape: '🌸🌿🌼__🌷🌻🌿_☘️🌱_🌻🌷', color: 'orange' }, | |
| moderate: { landscape: '🌾🌾_🍃_🪨__🛤_🌾🌾🌾_🍃', color: 'yellow' }, | |
| chilly: { landscape: '🌲🌲⛄️🌲⛄️🍂🌲🍁🌲🌲⛄️🍂🌲', color: 'green' }, | |
| cold: { landscape: '❄️🌲⛄️🌲❄️🏂⛄️🌲❄️⛷🌲❄️🌲', color: 'teal' }, | |
| }; |
| border-radius: 25px; | ||
| } | ||
|
|
||
| #weatherFrame { |
There was a problem hiding this comment.
It looks like you leaned pretty hard on ids here, which does make it easier to style things but slightly hampers re-usability of styles.
This file contains hidden or 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
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.