Skip to content

feat(localities-geocode): add structured response panel#115

Open
shwetadeshmukh wants to merge 1 commit intomasterfrom
feat/improve-localities-geocode-response-ui
Open

feat(localities-geocode): add structured response panel#115
shwetadeshmukh wants to merge 1 commit intomasterfrom
feat/improve-localities-geocode-response-ui

Conversation

@shwetadeshmukh
Copy link
Copy Markdown
Contributor

@shwetadeshmukh shwetadeshmukh commented Apr 30, 2026

Issue

Closes #114

Describe your changes

Adds a div in the localities-geocode sample with a structured response panel that surfaces the full geocode result alongside the map.

  • Adds a response-panel containing:
    • A summary of the geocoded location
    • An address-components breakdown
    • A collapsible <details> block with the raw JSON response from Api
    • A copy-to-clipboard button with visual confirmation (.copied state swaps the icon to a checkmark)
  • Extracts a reusable copy-button SCSS mixin in shared/scss/_mixins.scss so future samples can reuse the same styling.

How to test

  1. Test on PR deploy
  2. Open the localities-geocode sample in the browser.
  3. Empty state — confirm the right-hand panel shows the hint "Enter an address to geocode or click on the map to reverse geocode."
  4. Forward geocode — type an address in the search box; click Enter; confirm the panel populates with summary, address components, and collapsible raw JSON.
  5. Reverse geocode — click anywhere on the map; confirm the panel updates with the reverse-geocoded result.
  6. Copy button — open Raw JSON, click the copy icon; confirm the icon swaps to a checkmark and the JSON is on your clipboard.

Checklist:

  • My code follows the style guidelines for this repo
  • My code passes the SonarCloud check and does not add new code smells
  • I have performed a self-review of my code
  • My changes generate no new warnings/errors
  • I have added tests that prove my fix is effective or that my feature works
  • I don't require ops changes for this PR to go to prod
  • This change does not include a migration

Documentation

N/A — sample-only change; no public API surface affected.

Libs/SDKs

N/A — no library or SDK changes.

- Display geocode summary, address components, and collapsible raw JSON
- Add copy-to-clipboard button for raw JSON output
@shwetadeshmukh shwetadeshmukh marked this pull request as ready for review April 30, 2026 12:13
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Geocode/Reverse geocode demo to show full API response

1 participant