Skip to content
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

Update google-chrome extension #16287

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

rsperezn
Copy link
Contributor

@rsperezn rsperezn commented Jan 11, 2025

Description

Screencast

Checklist

- Merge branch \'contributions/merge-1734247600391\'
- Pull contributions
- Ignore .idea
- Add configurable profile path
- Initial commit
- fix dep
- Merge branch \'contributions/merge-1734247600391\'
- Ignore .idea
- Add configurable profile path
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: google-chrome Issues related to the google-chrome extension labels Jan 11, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Jan 11, 2025

Thank you for your contribution! 🎉

🔔 @rgomezcasas @bromanko @crisboarna @andreaselia @rtyke @karolre @Aiee @nagauta @a-laughlin @tleo19 @Tarocch1 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.

@rsperezn
Copy link
Contributor Author

This allows us to configure the Chrome profile path rather than hardcoding it

@rsperezn
Copy link
Contributor Author

image

@a-laughlin
Copy link
Contributor

Thanks for submitting a new PR. Taking a look now.

Comment on lines 13 to 24
const getChromeFilePath = (fileName: string, profile?: string) => {
const { profilePath } = getPreferenceValues<Preferences>();
if (profilePath) {
return path.join(profilePath, fileName);
}
return path.join(
userLibraryDirectoryPath(),
...defaultChromeProfilePath,
profile ?? DEFAULT_CHROME_PROFILE_ID,
fileName
);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Many bug reports come from an incorrect profile location. Checking whether the file exists here, and explaining what to do if it doesn't, would help prevent those reports.

- Fix conflict
- Pull contributions
- Improve placeholder
rsperezn and others added 2 commits January 13, 2025 09:30
- Fix merge
- Pull contributions
- Fix linting again
@a-laughlin
Copy link
Contributor

It looks like in the two commits, 6547884 has the message updated and linting unchanged, then commit 71712ec has linting updated and message unchanged. Up for one more with both?

@a-laughlin
Copy link
Contributor

a-laughlin commented Jan 13, 2025

Great! Looks good to merge once reviewed by Raycast folks. cc @pernielsentikaer

Side note I got curious and looked at what happens to the new error message once it's thrown. It appears to be ignored (useBookmarksSearch) and unhandled (useHistorySearch).

Error handling is inconsistent and could use some cleanup. To avoid blocking this PR, I created a separate issue for updating error handling in useHistorySearch and useBookmarksSearch.

Merging this without improving the error handling will still improve the errors. In the bookmarks case, the error will be as unhelpful as it currently is. In the unhandled useHistorySearch case, the new helpful error will replace the inaccurate Google Chrome not installed message.

@rsperezn
Copy link
Contributor Author

yeah @a-laughlin I guess we can have a new erroView for it, great call and thanks for the patience reviewing the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension fix / improvement Label for PRs with extension's fix improvements extension: google-chrome Issues related to the google-chrome extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants