Skip to content

feat: Add Bing as a Picture of the Day option#449

Merged
ullbergm merged 3 commits intomainfrom
feat-add-bing
Nov 3, 2025
Merged

feat: Add Bing as a Picture of the Day option#449
ullbergm merged 3 commits intomainfrom
feat-add-bing

Conversation

@ullbergm
Copy link
Copy Markdown
Owner

@ullbergm ullbergm commented Nov 3, 2025

Summary

This PR adds Bing Image of the Day as a new background picture option, expanding the available background choices for users alongside the existing Unsplash integration.

Changes Made

Backend

  • New GraphQL Resource: BingImageGraphQLResource - Provides a GraphQL endpoint to fetch Bing's daily image
  • New Service: BingImageService - Handles fetching and caching the Bing Image of the Day
  • New Model: BingImage - Data model for Bing image information
  • Configuration: Added startpunkt.bing.imageOfTheDayUrl to application.yaml

Frontend

  • Background Component: Updated to support Bing as a background source
  • Settings UI: Added Bing option to background settings dropdown
  • GraphQL Query: Added bingImage query to fetch Bing's daily image
  • Hooks: Updated useBackgroundPreferences to handle Bing image preferences
  • i18n: Added translations for Bing option in English and Swedish

Testing

  • Added tests for the new Background component changes
  • Updated useBackgroundPreferences tests to cover Bing functionality

Files Changed

  • pom.xml - Dependencies (if any were added)
  • src/main/java/us/ullberg/startpunkt/graphql/BingImageGraphQLResource.java (new)
  • src/main/java/us/ullberg/startpunkt/objects/bingimage/BingImage.java (new)
  • src/main/java/us/ullberg/startpunkt/service/BingImageService.java (new)
  • src/main/resources/application.yaml - Configuration
  • src/main/resources/i8n/en-US.json - English translations
  • src/main/resources/i8n/sv-SE.json - Swedish translations
  • src/main/webui/src/Background.jsx - UI component
  • src/main/webui/src/Background.test.jsx - Tests
  • src/main/webui/src/BackgroundSettings.jsx - Settings UI
  • src/main/webui/src/graphql/queries.js - GraphQL queries
  • src/main/webui/src/useBackgroundPreferences.js - React hook
  • src/main/webui/src/useBackgroundPreferences.test.js - Hook tests

Testing Checklist

  • Backend tests pass
  • Frontend tests pass
  • ./mvnw verify passes
  • Manual testing of Bing background selection
  • i18n translations verified for both languages

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Signed-off-by: Magnus Ullberg magnus@ullberg.us

Signed-off-by: Magnus Ullberg <magnus@ullberg.us>
@github-actions github-actions Bot added area/backend Changes made to the backend area/resources Changes made in the resources directory area/frontend Changes made to the frontend size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 3, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 3, 2025

Test Results - JVM

241 tests   233 ✅  8s ⏱️
 18 suites    8 💤
  1 files      0 ❌

Results for commit b0f50f2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 3, 2025

Test Results - Native

241 tests   233 ✅  7s ⏱️
 18 suites    8 💤
  1 files      0 ❌

Results for commit b0f50f2.

♻️ This comment has been updated with latest results.

Signed-off-by: Magnus Ullberg <magnus@ullberg.us>
… and height

refactor(Background): modify fetchBingImage to use updated query structure
fix(package-lock): remove unnecessary peer dependencies for graphql and graphql-ws

Signed-off-by: Magnus Ullberg <magnus@ullberg.us>
@ullbergm ullbergm merged commit 83728ef into main Nov 3, 2025
5 of 7 checks passed
@ullbergm ullbergm deleted the feat-add-bing branch November 3, 2025 22:41
@github-actions
Copy link
Copy Markdown
Contributor

Pull Request closed and locked due to lack of activity.
If you'd like to build on this closed PR, you can clone it using this method: https://stackoverflow.com/a/14969986
Then open a new PR, referencing this closed PR in your message.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/backend Changes made to the backend area/frontend Changes made to the frontend area/resources Changes made in the resources directory enhancement size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant