Added a function for translating SMHI symbol codes to text and added it to SMHIForecastView #432

Merged
c24elipe merged 2 commits from 408-expand-smhi-view into team_2_week_2 2026-04-20 13:51:41 +00:00
Collaborator

Created a function for translating the SMHI symbol code to text and added it to the forecastview.

A future expansion on this could be to display an image for each (or some of) the codes to reflect the weather

Created a function for translating the SMHI symbol code to text and added it to the forecastview. A future expansion on this could be to display an image for each (or some of) the codes to reflect the weather
Collaborator

Overall everything is working. But there are a couple of minor issues and recommendations to be addressed.
Minor adjustment: consider using const instead of var to align with modern JS practices and avoid scope-related issues.

var time = new Date(Date.parse(timestamp.time));
//Date formatting options
var options = {
			month: 'short',
			day: 'numeric',
			hour: 'numeric',
			minute: 'numeric',
		};

The commenting style: (i know, sorry!) you are using "//" for multiple lines, whereas on the wiki site it states to use "/* */" with multiple lines: the lines to fix are 10 and 11.

Another issue, I think it belongs to the whole team. The language inconsistency, we are using both English and Swedish, such as "Fel:" or "Laddar ...", "Högskolan i Skövde" while also using "Clear sky" "Forecast" etc. This is an issue that should be discussed within the whole team, in my opinion.

other than that, i agree with your input that "A future expansion on this could be to display an image for each (or some of) the codes to reflect the weather." - You

Overall everything is working. But there are a couple of minor issues and recommendations to be addressed. Minor adjustment: consider using **_const_** instead of **_var_** to align with modern JS practices and avoid scope-related issues. ``` var time = new Date(Date.parse(timestamp.time)); //Date formatting options var options = { month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric', }; ``` The commenting style: (i know, sorry!) you are using "//" for multiple lines, whereas on the wiki site it states to use "/* */" with multiple lines: the lines to fix are 10 and 11. Another issue, I think it belongs to the whole team. The language inconsistency, we are using both English and Swedish, such as "Fel:" or "Laddar ...", "Högskolan i Skövde" while also using "Clear sky" "Forecast" etc. This is an issue that should be discussed within the whole team, in my opinion. other than that, i agree with your input that "A future expansion on this could be to display an image for each (or some of) the codes to reflect the weather." - You
Author
Collaborator

I left the mixing of swedish and english in, since there is already an issue for localization.

I left the mixing of swedish and english in, since there is already an issue for localization.
c22abdal approved these changes 2026-04-20 11:08:48 +00:00
c22abdal left a comment
Collaborator

Good job!

Good job!
Collaborator

Looks good to me. It compiles and semas to give the correct output

image

Looks good to me. It compiles and semas to give the correct output ![image](/attachments/f0b28f6f-ac5f-4aae-8d32-0b531fca9c53)
109 KiB
c24elipe approved these changes 2026-04-20 13:50:58 +00:00
c24elipe merged commit 4462ef2a5a into team_2_week_2 2026-04-20 13:51:41 +00:00
c24elipe deleted branch 408-expand-smhi-view 2026-04-20 13:51:42 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!432
No description provided.