Repository navigation
refactor(samples): replace gmp-place-content-config in react-ui-kit-place-details-latlng - #1765
Open
ejhaselden wants to merge 1 commit into
Open
ejhaselden wants to merge 1 commit into
ejhaselden wants to merge 1 commit into
Conversation
…lace-details-latlng Removes the deprecated <gmp-place-content-config> wrapper so the content elements are direct children of <gmp-place-details>, which is the current Places UI Kit composition pattern. Adds <gmp-place-name> explicitly: the content config always displayed the place name, but with direct children only the included elements render.
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.
Replaces the deprecated
<gmp-place-content-config>element in thereact-ui-kit-place-details-latlngsample with the current Places UI Kit pattern, where content elements are direct children of the widget.Changes
<gmp-place-details>withinsertAdjacentHTML(), instead of wrapping them in a<gmp-place-content-config>element.<gmp-place-name>. The content config always displayed the place name. With direct children, only the elements you include are rendered.The request element, the content elements and their attributes, and the region tags are unchanged.
Testing
npm run build --workspace=samples/react-ui-kit-place-details-latlngpasses (sample checks, Prettier, ESLint,tsc, and Vite).3.66.11a) and beta (3.66.11a-beta) channels: the before and after screenshots of the widget are identical. It also resolves thePlaceContentConfigElement is deprecatedconsole warning on3.66.11a.