Added the feature for custom backgrounds#11850
Open
JaiswalShivang wants to merge 2 commits intoopenstreetmap:developfrom
Open
Added the feature for custom backgrounds#11850JaiswalShivang wants to merge 2 commits intoopenstreetmap:developfrom
JaiswalShivang wants to merge 2 commits intoopenstreetmap:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements support for multiple custom background layers in the iD editor, addressing issue #8874. Previously, only a single custom background was supported. The implementation adds full CRUD operations for managing multiple named custom backgrounds with data persistence across sessions.
Changes:
- Adds support for multiple custom backgrounds stored as JSON array in
background-custom-templatespreference - Implements UI for adding, editing, naming, and deleting custom backgrounds directly in the background list
- Includes migration logic to convert existing single custom background to new multi-background format
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
modules/ui/settings/custom_background.js |
Modified to support editing both new and existing custom backgrounds with name and template fields |
modules/ui/sections/custom_background_list.js |
New file (unused) that appears to be a duplicate/abandoned implementation |
modules/ui/sections/background_list.js |
Integrated custom backgrounds list with edit/delete buttons into main background pane |
modules/renderer/background_source.js |
Updated Custom factory to accept id and name parameters, show "Custom: {name}" prefix |
modules/renderer/background.js |
Added migration logic and multi-custom background initialization |
data/core.yaml |
Added localization strings for custom backgrounds UI |
css/80_app.css |
Added styling for custom background list items and action buttons |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@tordans - Thank you again for your detailed feedback on PR #11836. I've completely rewritten the implementation based on your guidance.
|
157d62a to
3d25497
Compare
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.
feat: Multiple custom background layers with CRUD operations
Fixes #8874
Summary
This PR enables users to add, edit, name, and delete multiple custom background layers in the iD editor. Previously, only a single custom background was supported.
Demo Video
2026-02-05.22-21-29.mp4
Changes
User-Facing Changes
Technical Changes
background-custom-templatespreference:[ { "id": "custom-1", "name": "My Tiles", "template": "https://..." }, { "id": "custom-2", "name": "Berlin 2025", "template": "https://..." } ]