Skip to content

Simplify imagery state management in ID editor - #7264

Open
sumitdahal7 wants to merge 1 commit into
developfrom
fix/7255-imagery-issue-in-id-editor
Open

Simplify imagery state management in ID editor#7264
sumitdahal7 wants to merge 1 commit into
developfrom
fix/7255-imagery-issue-in-id-editor

Conversation

@sumitdahal7

Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI
  • ❓ Other (please specify)

Related Issue

Fixes #7255

Describe this PR

This PR refactors the imagery state management in the iD editor component and fixes an issue where imagery offsets
persisted between projects/tasks.

Key Changes:

  • Simplified Imagery State: Removed the redundant customImageryIsSet local state. The logic now directly checks for
    imagery types and iDContext availability, making the component more predictable and easier to maintain.
  • Fixed Imagery Offset Persistence: Added logic to explicitly reset the imagery offset to [0, 0] if no offset
    parameters are provided in extraIdParams. Previously, the editor would retain the offset from a previously
    visited task or project, leading to incorrect alignment.
  • Default Imagery Enforcement: Ensured that if a project has no specific imagery configured, the editor defaults to
    'Bing' and resets any previous custom background settings.
  • Improved Null Safety: Added guard clauses to ensure iDContext.background() is fully loaded before attempting

Screenshots

@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@danieldegroot2

Copy link
Copy Markdown

cc @tyrasd (feel free to take a look at these changes)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Wrong default imagery in iD editor

2 participants