Open
Conversation
|
Here is the summary of changes. You are about to add 3 region tags.
This comment is generated by snippet-bot.
|
noelle-jung
requested changes
Feb 6, 2026
Comment on lines
+24
to
+27
| let heading = document.getElementById('heading') as HTMLElement; | ||
| let summary = document.getElementById('summary') as HTMLElement; | ||
| let gallery = document.getElementById('gallery') as HTMLElement; | ||
| let expandedImageDiv = document.getElementById( |
Contributor
There was a problem hiding this comment.
These can be chagned to const
Suggested change
| let heading = document.getElementById('heading') as HTMLElement; | |
| let summary = document.getElementById('summary') as HTMLElement; | |
| let gallery = document.getElementById('gallery') as HTMLElement; | |
| let expandedImageDiv = document.getElementById( | |
| const heading = document.getElementById('heading') as HTMLElement; | |
| const summary = document.getElementById('summary') as HTMLElement; | |
| const gallery = document.getElementById('gallery') as HTMLElement; | |
| const expandedImageDiv = document.getElementById( |
| let expandedImageDiv = document.getElementById( | ||
| 'expanded-image' | ||
| ) as HTMLElement; | ||
| let attributionLabel; |
Contributor
There was a problem hiding this comment.
This can be removed and declared inside each block that needs an attributionLabel
| expandedImage.alt = altText; | ||
| expandedImageDiv.innerHTML = ''; | ||
| expandedImageDiv.appendChild(expandedImage); | ||
| attributionLabel = createAttribution(photo.authorAttributions); |
Contributor
There was a problem hiding this comment.
Suggested change
| attributionLabel = createAttribution(photo.authorAttributions); | |
| const attributionLabel = createAttribution(photo.authorAttributions); |
| img.alt = 'Photo of ' + place.displayName; | ||
| img.src = place.photos![0].getURI(); | ||
| expandedImageDiv.appendChild(img); | ||
| attributionLabel = createAttribution(place.photos![0].authorAttributions); |
Contributor
There was a problem hiding this comment.
Suggested change
| attributionLabel = createAttribution(place.photos![0].authorAttributions); | |
| const attributionLabel = createAttribution(place.photos![0].authorAttributions); |
| } | ||
|
|
||
| // Helper function to create attribution DIV. | ||
| function createAttribution(attribution) { |
Contributor
There was a problem hiding this comment.
Add a type for attribution? Also suggest renaming the parameter to attributions since multiple are passed.
Suggested change
| function createAttribution(attribution) { | |
| function createAttribution(attributions: google.maps.places.AuthorAttribution[]) { |
Comment on lines
+79
to
+81
| if (attribution && attribution[0]) { | ||
| attributionLabel.textContent = attribution[0].displayName; | ||
| attributionLabel.href = attribution[0].uri; |
Contributor
There was a problem hiding this comment.
Suggested change
| if (attribution && attribution[0]) { | |
| attributionLabel.textContent = attribution[0].displayName; | |
| attributionLabel.href = attribution[0].uri; | |
| if (attributions && attributions[0]) { | |
| attributionLabel.textContent = attributions[0].displayName; | |
| attributionLabel.href = attributions[0].uri; |
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.
This PR does the following things: