Skip to content

Add Open-Meteo provider and UI#227

Open
itz-rj-here wants to merge 3 commits into
prem-k-r:mainfrom
itz-rj-here:open-metro
Open

Add Open-Meteo provider and UI#227
itz-rj-here wants to merge 3 commits into
prem-k-r:mainfrom
itz-rj-here:open-metro

Conversation

@itz-rj-here

@itz-rj-here itz-rj-here commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

📌 Description

Introduce a selectable weather provider and implement Open-Meteo support. index.html: add a weather provider dropdown UI. privacy-policy.html: document new IP-based GeoJS endpoint, Open-Meteo, and Nominatim usage. scripts/weather.js: update header copyright, add provider selection persistence, implement Open-Meteo location search and forecast fetching (with geocoding/reverse-geocoding fallbacks), map Open-Meteo codes to a WeatherAPI-like response shape, and fall back to WeatherAPI when selected. Also reset cached parsed weather on provider change and wire up the provider select element.

🎨 Visual Changes (Screenshots / Videos)

image image

🔗 Related Issues

✅ Checklist

  • I have read and followed the Contributing Guidelines.
  • My code follows the project's coding style and conventions.
  • I have tested my changes thoroughly to ensure expected behavior.
  • I have verified compatibility across Chrome and Firefox (additional browsers if applicable).
  • I have attached relevant visual evidence (screenshots/videos) if applicable.
  • I have updated the CHANGELOG.md under the appropriate categories with all my changes in this PR.

🤖 AI Assistance (Coding)

  • None
  • Ideas / planning
  • Debugging / review help
  • Small code snippets
  • Partial implementation
  • Major implementation help
  • Mostly AI-generated
  • Full vibe coded

Overview

This PR adds a selectable weather provider setting that lets users choose between WeatherAPI and Open-Meteo. It includes new UI for provider selection with persistence across sessions, updated privacy documentation for the additional external services, and enhanced weather/geocoding logic to support Open-Meteo—falling back to WeatherAPI when the selected provider isn’t available. This closes issue #226.

Changes

index.html

  • Added a “Weather Provider” dropdown in Settings → Weather
  • Lets users choose between WeatherAPI and Open-Meteo
  • Includes helper text “Select the weather service”
  • Lines changed: +13/-0

privacy-policy.html

  • Updated External APIs documentation for weather/location features:
    • GeoJS (IP-based geolocation endpoint used to support Open-Meteo flows)
    • Open-Meteo (weather forecasts + geocoding)
    • Nominatim (reverse geocoding to readable location/area names)
  • Expanded Location Detection to include GeoJS alongside IPinfo
  • Expanded Weather Updates from WeatherAPI-only to a multi-provider description covering WeatherAPI, Open-Meteo, and Nominatim
  • Lines changed: +30/-7

scripts/weather.js

  • Updated header branding comment formatting
  • Provider-aware location suggestions: fetchLocationSuggestions() now uses the saved provider preference from localStorage.weatherProviderSelect (default: weatherapi)
    • Open-Meteo: queries Open-Meteo geocoding and maps results into {name, region, country}
    • WeatherAPI: queries WeatherAPI using the active API key
  • Provider-aware weather fetching: fetchWeather() now branches by selected provider
    • Open-Meteo: resolves coordinates via IP-based lookup and/or lat/lon parsing with reverse-geocoding fallbacks, fetches Open-Meteo forecasts, and maps Open-Meteo weather_code into the existing WeatherAPI-compatible internal filteredData shape
    • WeatherAPI: uses the existing forecast path while producing the same internal filteredData structure
  • Fallback behavior: if the Open-Meteo path fails (or the provider isn’t Open-Meteo), it falls back to WeatherAPI
  • Provider selection persistence + cache reset:
    • Initializes the dropdown from localStorage on load (default weatherapi)
    • On change: persists the new provider choice, resets weatherParsedTime to force refresh, and reloads to apply the new backend
  • Lines changed: +145/-39

README.md

  • Minor documentation/branding updates (logo sizing, Chrome Web Store badge URL domain), and refreshed “✨ Features” wording
  • Updated the Swedish flag asset URL
  • Lines changed: +18/-17

Impact

Users can switch their weather backend via the settings UI, with the selection remembered across sessions. The Open-Meteo integration supports both geocoding and forecast retrieval, while maintaining UI compatibility through mapping into the same internal response format; reliability is improved by automatically falling back to WeatherAPI when needed.

Introduce a selectable weather provider and implement Open-Meteo support. index.html: add a weather provider dropdown UI. privacy-policy.html: document new IP-based GeoJS endpoint, Open-Meteo, and Nominatim usage. scripts/weather.js: update header copyright, add provider selection persistence, implement Open-Meteo location search and forecast fetching (with geocoding/reverse-geocoding fallbacks), map Open-Meteo codes to a WeatherAPI-like response shape, and fall back to WeatherAPI when selected. Also reset cached parsed weather on provider change and wire up the provider select element.
@itz-rj-here itz-rj-here requested a review from prem-k-r June 19, 2026 04:20
@itz-rj-here itz-rj-here added the enhancement New feature or request label Jun 19, 2026
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a selectable weather provider dropdown (WeatherAPI or Open-Meteo) to the Settings UI. The fetchLocationSuggestions and fetchWeather functions in weather.js are branched by the stored provider choice, with a new Open-Meteo code path added. The privacy policy is updated to document all new external API endpoints. README is updated with corrected badge links and expanded feature descriptions.

Changes

Weather Provider Selection Feature

Layer / File(s) Summary
Settings UI dropdown and localStorage sync
index.html, scripts/weather.js
Adds a weatherProviderSelect dropdown with WeatherAPI and Open-Meteo options to the Settings → Weather panel. On load, the dropdown value is initialized from localStorage; on change, the provider is stored, weatherParsedTime is reset to "0", and the page reloads.
Provider-branched geocoding and weather fetching
scripts/weather.js
fetchLocationSuggestions now routes to Open-Meteo geocoding or WeatherAPI based on the stored provider. fetchWeather adds an Open-Meteo code path that resolves the location string to coordinates via GeoJS IP lookup, Nominatim reverse geocoding, or Open-Meteo forward geocoding; fetches an Open-Meteo forecast; maps weather_code to icon/text; and builds filteredData in the same internal shape as the WeatherAPI branch. WeatherAPI fetching is retained in the non-Open-Meteo branch. Also corrects header comment spacing.
Privacy policy endpoint documentation
privacy-policy.html
Rewrites the External APIs section to add GeoJS as an alternative location-detection source when Open-Meteo is active, and expands Weather Updates to document WeatherAPI, Open-Meteo forecast/geocoding, and Nominatim reverse-geocoding endpoints.

Documentation and Branding Updates

Layer / File(s) Summary
README branding and feature list updates
README.md
Adds explicit width="58" attribute to the header logo image. Updates Chrome Web Store badge links to use chromewebstore.google.com domain. Expands the Features list with theme transparency details, wallpaper description refinements, drag-and-drop shortcut reordering, custom icon sources, explicit "32 languages natively supported" language support count, and updated browser compatibility phrasing. Updates the Swedish row's flag image URL in the language support table.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • prem-k-r/MaterialYouNewTab#109: Reorganizes the Settings → Weather UI block in index.html into collapsible section wrappers, directly affecting the same section where the new provider dropdown is inserted.

Suggested labels

ui/ux

Suggested reviewers

  • prem-k-r
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: introducing a selectable weather provider and Open-Meteo support, which aligns with the changeset's primary objectives.
Description check ✅ Passed The description covers the main objectives, includes visual evidence, references the closed issue, and mostly follows the template structure, though CHANGELOG.md update and Firefox compatibility verification are incomplete.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@itz-rj-here

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Repository owner deleted a comment from coderabbitai Bot Jun 19, 2026
Repository owner deleted a comment from coderabbitai Bot Jun 19, 2026
Repository owner deleted a comment from coderabbitai Bot Jun 19, 2026
Repository owner deleted a comment from coderabbitai Bot Jun 19, 2026
Repository owner deleted a comment from coderabbitai Bot Jun 19, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@privacy-policy.html`:
- Around line 205-230: In the privacy policy's Weather Updates section, the
WeatherAPI subsection lists two endpoints (forecast.json and search.json) but is
missing the CDN endpoint used for weather icons. Add the missing WeatherAPI CDN
endpoint https://cdn.weatherapi.com/weather/128x128/ to the nested list under
the WeatherAPI link, documenting that it retrieves weather condition icons. This
endpoint should be added as a new list item alongside the existing forecast and
search endpoint documentation to ensure complete disclosure of all WeatherAPI
resources accessed by the application.

In `@scripts/weather.js`:
- Around line 399-403: The regex pattern that validates currentUserLocation on
line 399 has an optional group for the comma and second coordinate, which allows
single numeric values to pass validation. When a single number like "42"
matches, the subsequent split(",") operation on that line returns only one
element, leaving lon as undefined, which then gets passed to the reverse
geocoding API call. Fix this by removing the question mark that makes the comma
and second coordinate group optional in the regex pattern, ensuring both
latitude and longitude are mandatory for a valid location string.
- Around line 390-495: The Open-Meteo weather provider block (the if branch
checking weatherProvider === "openmeteo") and the WeatherAPI fallback (the else
branch) are part of a single if-else structure within a larger try-catch block.
When an error occurs in the Open-Meteo branch (such as geocoding or API
failures), it is caught by the outer catch block which logs the error,
preventing the WeatherAPI fallback from executing. Wrap the entire Open-Meteo
conditional block in its own try-catch statement, so that any errors thrown
during Open-Meteo processing are caught locally and allow execution to fall
through to the else clause where WeatherAPI can be used as a fallback. Ensure
the inner catch block re-throws or continues in a way that permits the else
branch to execute.
- Around line 409-411: The searchTerm variable is being assigned only the first
part of currentUserLocation by splitting on comma and taking the first element,
which removes important geographic context like region and country information.
This causes ambiguous city names to resolve to incorrect locations. Instead of
splitting currentUserLocation and taking only the first part, pass the full
currentUserLocation string directly as the search term to the Open-Meteo
geocoding API, since it supports comma-separated location strings (e.g.,
"Springfield, Illinois, United States") for proper disambiguation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5d8ce42a-241a-409f-806e-a8380d653fa7

📥 Commits

Reviewing files that changed from the base of the PR and between 6f22d9d and 7f3233e.

📒 Files selected for processing (3)
  • index.html
  • privacy-policy.html
  • scripts/weather.js

Comment thread privacy-policy.html
Comment thread scripts/weather.js
Comment thread scripts/weather.js Outdated
Comment thread scripts/weather.js Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 23: The badge images in the README.md file are missing descriptive alt
text, which violates accessibility standards and markdown linting rules. For
each badge link on line 23 (marked by `[![](image_url)](link)` patterns), add
descriptive alt text between the `![` and `]` brackets to identify what each
badge represents, such as version numbers, ratings, or user counts for Chrome
Web Store, Firefox, and Edge. This ensures screen readers can properly convey
the badge purpose to users and complies with MD045 markdown linting rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 42fda517-e3b7-48b9-ae8e-b0c1fefd94d3

📥 Commits

Reviewing files that changed from the base of the PR and between 7f3233e and a1e2896.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md
![GitHub forks](https://img.shields.io/github/forks/prem-k-r/MaterialYouNewTab)

[![](https://img.shields.io/chrome-web-store/v/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chrome.google.com/webstore/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/rating/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chrome.google.com/webstore/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/users/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chrome.google.com/webstore/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) ▪️ [![](https://img.shields.io/amo/v/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/rating/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/users/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) ▪️ [![](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Flcgdmfjofmcblocogcabdpfidfbkblcd)](https://microsoftedge.microsoft.com/addons/detail/mynt-material-you-new-ta/lcgdmfjofmcblocogcabdpfidfbkblcd)
[![](https://img.shields.io/chrome-web-store/v/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/rating/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/users/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) ▪️ [![](https://img.shields.io/amo/v/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/rating/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/users/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) ▪️ [![](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Flcgdmfjofmcblocogcabdpfidfbkblcd)](https://microsoftedge.microsoft.com/addons/detail/mynt-material-you-new-ta/lcgdmfjofmcblocogcabdpfidfbkblcd)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add descriptive alt text to badge images for accessibility.

The badge images on this line are missing alt text. Each ![](image_url) should include descriptive text between ![ and ] to comply with the MD045 markdown linting rule and to ensure screen readers can identify the badge purpose.

Example: [![Chrome Web Store Version](https://img.shields.io/chrome-web-store/v/...)](url)

🔧 Proposed fix for badge alt text
-[![](https://img.shields.io/chrome-web-store/v/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/rating/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/users/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) ▪️ [![](https://img.shields.io/amo/v/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/rating/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/users/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) ▪️ [![](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Flcgdmfjofmcblocogcabdpfidfbkblcd)](https://microsoftedge.microsoft.com/addons/detail/mynt-material-you-new-ta/lcgdmfjofmcblocogcabdpfidfbkblcd)
+[![Chrome Web Store Version](https://img.shields.io/chrome-web-store/v/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![Chrome Web Store Rating](https://img.shields.io/chrome-web-store/rating/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![Chrome Web Store Users](https://img.shields.io/chrome-web-store/users/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) ▪️ [![Firefox Version](https://img.shields.io/amo/v/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![Firefox Rating](https://img.shields.io/amo/rating/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![Firefox Users](https://img.shields.io/amo/users/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) ▪️ [![Edge Add-on Version](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Flcgdmfjofmcblocogcabdpfidfbkblcd)](https://microsoftedge.microsoft.com/addons/detail/mynt-material-you-new-ta/lcgdmfjofmcblocogcabdpfidfbkblcd)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[![](https://img.shields.io/chrome-web-store/v/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/rating/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![](https://img.shields.io/chrome-web-store/users/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) ▪️ [![](https://img.shields.io/amo/v/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/rating/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![](https://img.shields.io/amo/users/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) ▪️ [![](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Flcgdmfjofmcblocogcabdpfidfbkblcd)](https://microsoftedge.microsoft.com/addons/detail/mynt-material-you-new-ta/lcgdmfjofmcblocogcabdpfidfbkblcd)
[![Chrome Web Store Version](https://img.shields.io/chrome-web-store/v/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![Chrome Web Store Rating](https://img.shields.io/chrome-web-store/rating/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) [![Chrome Web Store Users](https://img.shields.io/chrome-web-store/users/jjpokbgpiljgndebfoljdeihhkpcpfgl.svg)](https://chromewebstore.google.com/detail/mynt-material-you-new-tab/jjpokbgpiljgndebfoljdeihhkpcpfgl) ▪️ [![Firefox Version](https://img.shields.io/amo/v/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![Firefox Rating](https://img.shields.io/amo/rating/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) [![Firefox Users](https://img.shields.io/amo/users/mynt.svg)](https://addons.mozilla.org/en-US/firefox/addon/mynt/) ▪️ [![Edge Add-on Version](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Flcgdmfjofmcblocogcabdpfidfbkblcd)](https://microsoftedge.microsoft.com/addons/detail/mynt-material-you-new-ta/lcgdmfjofmcblocogcabdpfidfbkblcd)
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 23-23: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 23-23: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 23-23: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 23-23: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 23-23: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 23-23: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 23-23: Images should have alternate text (alt text)

(MD045, no-alt-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 23, The badge images in the README.md file are missing
descriptive alt text, which violates accessibility standards and markdown
linting rules. For each badge link on line 23 (marked by
`[![](image_url)](link)` patterns), add descriptive alt text between the `![`
and `]` brackets to identify what each badge represents, such as version
numbers, ratings, or user counts for Chrome Web Store, Firefox, and Edge. This
ensures screen readers can properly convey the badge purpose to users and
complies with MD045 markdown linting rules.

Source: Linters/SAST tools

Add Open-Meteo handling in scripts/weather.js: validate/resolve coordinates and names, fetch Open-Meteo forecast, map Open-Meteo weather codes to WeatherAPI-style condition text and icon URLs, and build a WeatherAPI-compatible filteredData object. Wrap Open-Meteo flow in try/catch and fall back to WeatherAPI on errors. Also tighten coordinate regex and improve reverse-geocoding handling. Documentation updates: fix Swedish flag image path in README.md and add the WeatherAPI CDN icon URL to privacy-policy.html.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 246: Add `alt` attributes to all flag images in the language support
table (lines 223-253) for accessibility compliance with MD045 standards. For
each flag image tag starting with `<img src='https://flagcdn.com/`, add an
appropriate alt text attribute describing the country flag (for example,
alt="Sweden flag"). This applies to the Swedish entry on line 246 and all other
language entries in the same table range to ensure all images have proper
accessibility descriptions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 376df2d7-e144-4ffa-999c-39922ed602aa

📥 Commits

Reviewing files that changed from the base of the PR and between a1e2896 and 2337b3e.

📒 Files selected for processing (3)
  • README.md
  • privacy-policy.html
  • scripts/weather.js
✅ Files skipped from review due to trivial changes (1)
  • privacy-policy.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/weather.js

Comment thread README.md
| <img src='https://flagcdn.com/si.svg' width=20> &nbsp; **Slovenian** - Slovenščina | sl-SI | [Linux-Alex](https://github.com/Linux-Alex/) |
| <img src='https://flagcdn.com/es.svg' width=20> &nbsp; **Spanish** - Español | es-ES | [XengShi](https://github.com/XengShi/), [Isaac Vergara](https://github.com/zRaidev), [Saúl Palacios](https://github.com/palacios22c) |
| <img src='https://flagcdn.com/sv.svg' width=20> &nbsp; **Swedish** - Svenska | sv | [HELLOEMPO](https://github.com/empohello-imamempogitub/) |
| <img src='https://flagcdn.com/se.svg' width=20> &nbsp; **Swedish** - Svenska | sv | [HELLOEMPO](https://github.com/empohello-imamempogitub/) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add alt text to the Swedish flag image for accessibility.

Line 246's flag image lacks an alt attribute, which violates the MD045 markdown accessibility rule. Additionally, all other flag images in the language support table (lines 223–253) have the same issue.

🔧 Proposed fix for line 246 and entire table
-| <img src='https://flagcdn.com/se.svg' width=20> &nbsp; **Swedish** - Svenska                 | sv | [HELLOEMPO](https://github.com/empohello-imamempogitub/)
+| <img src='https://flagcdn.com/se.svg' alt='Swedish flag' width=20> &nbsp; **Swedish** - Svenska                 | sv | [HELLOEMPO](https://github.com/empohello-imamempogitub/)

To fully comply with accessibility standards, apply this pattern to all flag images in the table (lines 223–253). For example:

-| <img src='https://flagcdn.com/us.svg' width=20> &nbsp; **English**
+| <img src='https://flagcdn.com/us.svg' alt='United States flag' width=20> &nbsp; **English**
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| <img src='https://flagcdn.com/se.svg' width=20> &nbsp; **Swedish** - Svenska | sv | [HELLOEMPO](https://github.com/empohello-imamempogitub/) |
| <img src='https://flagcdn.com/se.svg' alt='Swedish flag' width=20> &nbsp; **Swedish** - Svenska | sv | [HELLOEMPO](https://github.com/empohello-imamempogitub/)
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 246-246: Images should have alternate text (alt text)

(MD045, no-alt-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 246, Add `alt` attributes to all flag images in the
language support table (lines 223-253) for accessibility compliance with MD045
standards. For each flag image tag starting with `<img
src='https://flagcdn.com/`, add an appropriate alt text attribute describing the
country flag (for example, alt="Sweden flag"). This applies to the Swedish entry
on line 246 and all other language entries in the same table range to ensure all
images have proper accessibility descriptions.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant