-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Update google-maps-search extension #17775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Fix linting issues: Remove empty arrow function and improve TypeScript types - Fixed AI evals, - Big changes including integration of the Google Places API and the addition of AI tools. - Merge branch \'contributions/merge-1741737528976\' - Pull contributions - Big changes including integration of the Google Places API and the addition of AI tools. - Added info about getting an API key - ## [2.0] - 2025-03-07 - Initial commit
Thank you for your contribution! 🎉 🔔 @ratoru @aeither @klaussner @krsntn you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. You can expect an initial review within five business days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Major update to the Google Maps Search extension adding Google Places API integration, AI tools, and enhanced search functionality with improved UI components.
- Missing
{PR_MERGE_DATE}
template string in the latest CHANGELOG.md entry title## [2.0] - 2025-03-11
launchCommand
intravel-home.tsx
needs to be wrapped in a try-catch block per Raycast guidelines- Since this PR has
tools
in package.json, it should also includeai
withevals
(already present) - Deeply nested navigation logic in
nearby-places-search-form.tsx
could be simplified to improve maintainability - Missing validation for radius input and error handling in search submission for nearby places functionality
💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!
30 file(s) reviewed, 60 comment(s)
Edit PR Review Bot Settings | Greptile
- Fix build errors and improve type safety - Fixing @greptile-apps messages and improving code maintainability.
As I mentioned in the Slack thread, could you please change the file name cases back? Also, updating so many irrelevant files is not good for reviewers to review your code. I appreciate your work and understanding. |
I've done that in
Can you clarify what you mean by "irrelevant"? |
Files or code that are not relevant to the current work content. But I just realized your current PR updated most of the code. Then it should be fine. Sorry for confusing you, in this case I think it's reasonable to change everything to camelCase. |
Right — this is a major (breaking) update, integrating the Google Places API. I basically rewrote the whole thing (or at least directed Claude to do so!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This PR continues to improve the Google Maps Search extension with significant code organization and error handling enhancements.
- Duplicate files with different naming conventions (e.g.,
nearbyPlacesSearchForm.tsx
andnearby-places-search-form.tsx
) should be consolidated to follow kebab-case convention - Several files have inconsistent error handling - recommend standardizing on
showFailureToast
from@raycast/utils
throughout - The default search radius in
unit-conversions.ts
(50km/31mi) seems unusually large and should be reduced - The
getUnitSystemForApi
andgetTravelModeForApi
functions inunit-conversions.ts
use unsafe type casting tounknown
- Consider adding input validation for negative numbers in unit conversion functions
60 file(s) reviewed, 65 comment(s)
Edit PR Review Bot Settings | Greptile
extensions/google-maps-search/src/components/nearby-places-search-form.tsx
Outdated
Show resolved
Hide resolved
extensions/google-maps-search/src/components/nearbyPlacesSearchForm.tsx
Outdated
Show resolved
Hide resolved
extensions/google-maps-search/src/components/nearbyPlacesSearchForm.tsx
Outdated
Show resolved
Hide resolved
extensions/google-maps-search/src/components/nearbyPlacesSearchForm.tsx
Outdated
Show resolved
Hide resolved
- refactor: improve type system organization and remove redundancies - refactor: improve type system organization and remove redundancies
Hey @chrismessina 👋 Awesome improvements! 🔥 What's going on here? I guess because of the rename and then rename again it may have kept the old files? 😄 |
Thanks! :)
Yeah, I'm confused about this — and couldn't figure out how to clean it up! It seems like the files have been renamed successfully, but Git is confused about them. What do you suggest? |
@chrismessina the easiest and quickest solution I can think of is moving the files to a directory outside of Git so it counts as deleting them, commit it, and then put the correct files back, and then another commit after that. What do you think? |
I'll give it a try...! |
- Add TODO - Markdown linting - Re-adding files to fix Git issues. - Pull contributions - Trying to reset renamed files status. - Pull contributions
@andreaselia ok, I discovered the root of the issue... I needed to run this command:
That revealed the files that were not appearing locally and I was able to remove them. Should be set for review now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
Based on the latest changes since the previous reviews, here's my summary of the key updates:
Major update to the Google Maps Search extension focusing on improved error handling, code organization, and type safety across utility functions and components.
- Improved error handling in
src/utils/apiHelpers.ts
with detailed stack traces and standardized API request handling usingshowFailureToast
- Enhanced storage utilities in
src/utils/storageHelpers.ts
with comprehensive type validation and batch operations support - Added new
src/utils/mapRenderer.ts
for handling static map generation with proper error handling and URL length limits - Added robust form validation in
src/components/nearbyPlacesSearchForm.tsx
with proper type checking and error messages - Improved distance calculations and unit conversions with proper constant definitions and type safety in
src/utils/unitConversions.ts
The changes show good progress in standardizing error handling and improving type safety throughout the codebase. The focus has been on making the utilities more robust and maintainable.
38 file(s) reviewed, 26 comment(s)
Edit PR Review Bot Settings | Greptile
extensions/google-maps-search/src/components/placeDetailView.tsx
Outdated
Show resolved
Hide resolved
extensions/google-maps-search/src/components/nearbyPlacesSearchForm.tsx
Outdated
Show resolved
Hide resolved
- Linted! - Add type safety, error handling and improve formatting based on greptile comments
Arggh, this is killing me! How do I get rid of these kabob files?? |
Hi @chrismessina. You can use GitHub's VS Code Web Editor to delete them. Simply press the . key on this page to open the editor. |
Hey @chrismessina, I've deleted the kebab files. I think there may be a small bug with the publish script at the moment which makes it a little more difficult to delete files from git locally when using it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This PR continues to enhance the Google Maps Search extension with improved code organization and error handling.
- Improved error handling in
findNearbyPlaces.ts
andsearchPlaces.ts
with propershowFailureToast
implementation and API key validation - Added new
mapRenderer.ts
utility with support for multiple places, colored markers, and URL length handling - Improved type safety in
locationHelpers.ts
with function overloading forformatLocation
and consistent parameter naming - Consolidated storage operations in
storageHelpers.ts
with enhanced type validation and batch operations - Added comprehensive unit conversion constants and improved type safety in
unitConversions.ts
The changes show good progress in standardizing error handling and improving type safety across the codebase.
60 file(s) reviewed, 25 comment(s)
Edit PR Review Bot Settings | Greptile
extensions/google-maps-search/src/components/placeDetailView.tsx
Outdated
Show resolved
Hide resolved
extensions/google-maps-search/src/components/placeDetailView.tsx
Outdated
Show resolved
Hide resolved
Need to merge so I can pull new contributions.
Attempting to fix my out of date repo!
I'm also getting errors with
|
Description
A significant update to the Google Maps extension, including support for AI Tools.
Screencast
2025-03-11.18.02.59.CleanShot.mp4
Changelog
Added
use-geocoding.ts
hook for centralized geocoding logicvalidation.ts
for form input validationapi-helpers.ts
for standardized API request handlingstorage-helpers.ts
for robust LocalStorage operationslocation-helpers.ts
for location data handlingformatting.ts
with comprehensive formatting utilitiesChanged
./src/types
any
types with proper type definitionsStorageValue
type with recursive JSON-serializable definitionFixed
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder