Skip to content

feat(samples): add advanced place details and search samples - #1647

Merged
ejhaselden merged 19 commits into
mainfrom
add-advanced-place-elements
Aug 27, 2026
Merged

feat(samples): add advanced place details and search samples#1647
ejhaselden merged 19 commits into
mainfrom
add-advanced-place-elements

Conversation

@ejhaselden

Copy link
Copy Markdown
Contributor

Added samples for Advanced Place Details, Advanced Place Details Compact, Advanced Place Search Text, and Advanced Place Search Nearby based on their existing Essentials counterparts.

@snippet-bot

snippet-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 30 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Comment thread samples/ui-kit-advanced-place-details-compact/index.html
Change-Id: I8fcdb3b6d1babe4b18daa0fcd3c903c39d812332

@willum070 willum070 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code Review / Minor Fixes Summary:

Great work on these new UI Kit samples! I just pushed a single batched commit to the branch to clean up a few TypeScript and ESLint warnings so we don't have to bypass the linters.

Here is a quick breakdown of what was updated across the 5 samples:

  • Enforced Strict TypeScript (No more any or @ts-nocheck): Ripped out the eslint-disable and @ts-nocheck comments across all index.ts files. Because some of the newer web components aren't fully natively typed in the global map yet, I added explicit generic types to the querySelector calls (e.g., document.querySelector<HTMLElement & { places: ... }> instead of casting to any).
  • HTML Attributes vs. JS Properties: In a few places, the code was assigning a string (the place ID) directly to a JS property that expects a full Place object (like placeRequest.place = event.placeId). I swapped these to use .setAttribute('place', \places/${event.placeId}`). This keeps TS happy and automatically prepends the required places/` resource name prefix!
  • Event Listener Safety: Fixed a few minor event typings. For example, in place-list, the gmp-error listener was throwing a TS error because e.detail doesn't exist on a standard DOM Event. I cast it to a CustomEvent and swapped a logical OR (||) to a nullish coalescing operator (??) to satisfy ESLint. Also added strict truthy checks for event.placeId to satisfy template literal rules.
  • Housekeeping: Updated the copyright headers to 2026 and ran prettier --write across the board so the build runs completely green.

Comment thread samples/ui-kit-advanced-place-details/README.md Outdated
Comment thread samples/ui-kit-advanced-place-details/README.md Outdated
Comment thread samples/ui-kit-advanced-place-details/README.md Outdated
Comment thread samples/ui-kit-advanced-place-details/index.html
Comment thread samples/ui-kit-advanced-place-details/index.ts Outdated
Comment thread samples/ui-kit-advanced-place-details-compact/README.md Outdated
Comment thread samples/ui-kit-advanced-place-details-compact/README.md Outdated
Comment thread samples/ui-kit-advanced-place-details-compact/style.css Outdated
Comment thread samples/ui-kit-advanced-place-details-compact/index.ts
Comment thread samples/ui-kit-advanced-place-list/index.html
@ejhaselden
ejhaselden merged commit 2ef4f80 into main Aug 27, 2026
11 checks passed
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.

3 participants