#107-Create-Dynamic-Graph #188

Merged
b24johka merged 10 commits from #107-Create-Dynamic-Graph into team_1_week_1 2026-04-10 13:22:15 +00:00
Collaborator

Finsihed creating WeatherGraph Component. Created mockup data by modifying useTemprature to store an array and manually changing values in that array in WeatherGraph. CSS styling file for WeatherGraph was also created and tempratureView now does no data handling and instead only displays the weather graph in the card. Data handling of stored useTemprature data is now instead done in WeatherGraph

Finsihed creating WeatherGraph Component. Created mockup data by modifying useTemprature to store an array and manually changing values in that array in WeatherGraph. CSS styling file for WeatherGraph was also created and tempratureView now does no data handling and instead only displays the weather graph in the card. Data handling of stored useTemprature data is now instead done in WeatherGraph
added a skeleton Graph component for the weather
todo:
Hook to the api
shift height and color based on tempratue
create css file for styling
Added a external css file for the WeatherGraph and started moving weather data getting away from temperature view into the WeatherGraph.

API hooking and Theme.css matchign will be added after the next merge
Added comments, cleaned up some code and removed data getting from temperature view fully and moved it to weather graph
Created mockup data by making useTemperature store an array of data elements and modifying them in the WeatherGraph.
a24hirsa changed target branch from main to team_1_week_1 2026-04-08 13:28:47 +00:00
Fixed Decimal issue for temprature in graph and current time temp not matching in right side view and graph
c24elipe referenced this pull request from a commit 2026-04-10 07:25:32 +00:00
This is simply a fix for the pr #188 merge conflict.

The new .sln file is just from the main team 1 branch.
Collaborator

Files i've checked:

  • /frontend/src/components/Graphs/WeatherGraph.js
  • /frontend/src/components/Graphs/WeatherGraph.module.css
  • /frontend/src/features/temperature/TemperatureView.js
  • /frontend/src/features/temperature/useTemperature.js

JavaScript code follows code standards and is commented well. Website works well and the graph looks good: image
I'm unsure however if changes should be made to files in the /frontend/src/features/temperature/ directory. useTemperature.js will be changed during the weekly merge so it might not matter. TemperatureView should probably not be changed, I think it might be a better idea to use a dedicated view for the graph (TemperatureGraphView.js) instead of changing the one for sensor temperature.

(This part is very nit-picky)
CSS code doesn't quite meet some standards:

Use hex codes for colors, check the design document (issue #16) for the correct hex code.

Considering the colors here represent temperature it might be a non issue, but topas might work well.

Indentation should be done with two spaces. Tab can be used if your local settings is set to two spaces.

All classes, id and attributes should be named with all lowercase. When separation is needed, use a dash (hyphen) “ - “.

I don't think it's super important, but check through the standards and fix anything you find, för säkerhets skull.

Files i've checked: - `/frontend/src/components/Graphs/WeatherGraph.js` - `/frontend/src/components/Graphs/WeatherGraph.module.css` - `/frontend/src/features/temperature/TemperatureView.js` - `/frontend/src/features/temperature/useTemperature.js` JavaScript code follows code standards and is commented well. Website works well and the graph looks good: ![image](/attachments/2a0e0d3c-7398-4794-a019-a96f4a5ed086) I'm unsure however if changes should be made to files in the `/frontend/src/features/temperature/` directory. useTemperature.js will be changed during the weekly merge so it might not matter. TemperatureView should probably not be changed, I think it might be a better idea to use a dedicated view for the graph (TemperatureGraphView.js) instead of changing the one for sensor temperature. (This part is very nit-picky) CSS code doesn't quite meet some [standards](https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/CSS-Standards): > Use hex codes for colors, check the design document (issue #16) for the correct hex code. Considering the colors here represent temperature it might be a non issue, but [topas](https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/Webpage-Design#colour-palette) might work well. > Indentation should be done with two spaces. Tab can be used if your local settings is set to two spaces. > All classes, id and attributes should be named with all lowercase. When separation is needed, use a dash (hyphen) “ - “. I don't think it's super important, but check through the standards and fix anything you find, för säkerhets skull.
Author
Collaborator

Fixed CSS styling to match standards and added a new TempratureGraphView component that will dispaly weather graph instead of TemperatureView

Fixed CSS styling to match standards and added a new TempratureGraphView component that will dispaly weather graph instead of TemperatureView
Collaborator

I've checked through the changes and nothing looks out of place, looks good, nice work!

I've checked through the changes and nothing looks out of place, looks good, nice work!
Collaborator

The review has been made in a proper way, i will merge this into the branch and close.

The review has been made in a proper way, i will merge this into the branch and close.
b24johka merged commit dadee38474 into team_1_week_1 2026-04-10 13:22:15 +00:00
b25marem referenced this pull request from a commit 2026-05-15 08:55:59 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!188
No description provided.