Update tw-colorsearch extension#17805
Conversation
|
Thank you for your contribution! 🎉 🔔 @magicjaqk 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. Due to our current reduced availability, the initial review may take up to 10-15 business days |
There was a problem hiding this comment.
PR Summary
This PR updates the tw-colorsearch extension to support OKLCH color format and modernizes dependencies, with significant changes to color handling and UI functionality.
- Added OKLCH color format support using the culori library, with all color definitions converted from HEX to OKLCH
- Upgraded @raycast/api to v1.79.0 and added necessary dependencies for color manipulation
- Added new "Copy Oklch" action in the UI alongside existing HEX and RGB options
- Simplified ESLint configuration by extending from @raycast base config
- Unnecessary Swift-related entries added to .gitignore should be removed as they're not relevant for this TypeScript extension
5 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
| @@ -1,3 +1,8 @@ | |||
| # ColorPicker Changelog | |||
|
|
|||
| ## [Feature]- {PR_MERGE_DATE} | |||
There was a problem hiding this comment.
syntax: Remove the dash between [Feature] and {PR_MERGE_DATE}. The format should be ## [Feature] - {PR_MERGE_DATE}
| ## [Feature]- {PR_MERGE_DATE} | |
| ## [Feature] - {PR_MERGE_DATE} |
| hex: formatHex(tw_colors[colorName][shade]) || "", | ||
| rgb: HexToRGB(tw_colors[colorName][shade]), |
There was a problem hiding this comment.
logic: HexToRGB may fail if formatHex returns empty string. Add null check before conversion
| hex: formatHex(tw_colors[colorName][shade]) || "", | |
| rgb: HexToRGB(tw_colors[colorName][shade]), | |
| hex: formatHex(tw_colors[colorName][shade]) || "", | |
| rgb: formatHex(tw_colors[colorName][shade]) ? HexToRGB(formatHex(tw_colors[colorName][shade])!) : "rgb(0, 0, 0)", |
| .raycast-swift-build | ||
| .swiftpm | ||
| compiled_raycast_swift |
There was a problem hiding this comment.
logic: These Swift-related ignore patterns (.raycast-swift-build, .swiftpm, compiled_raycast_swift) should be removed as they are not relevant for a TypeScript/JavaScript extension and may cause confusion
| .raycast-swift-build | |
| .swiftpm | |
| compiled_raycast_swift |
| <Action.CopyToClipboard title="Copy HEX" content={item.hex.toUpperCase()} /> | ||
| <Action.CopyToClipboard title="Copy RGB" content={item.rgb} /> | ||
| <Action.CopyToClipboard title="Copy Hex" content={item.hex.toUpperCase()} /> | ||
| <Action.CopyToClipboard title="Copy Rgb" content={item.rgb} /> |
There was a problem hiding this comment.
The RGB should be upper cased. See https://en.wikipedia.org/wiki/RGB_color_model.
| <Action.CopyToClipboard title="Copy Rgb" content={item.rgb} /> | |
| <Action.CopyToClipboard title="Copy RGB" content={item.rgb} /> |
| <Action.CopyToClipboard title="Copy Oklch" content={item.oklch} /> | ||
| <Action.CopyToClipboard | ||
| title="Copy TailwindCSS Name" | ||
| title="Copy Tailwind Css Name" |
There was a problem hiding this comment.
Tailwind CSS is a trademark. Let's use the correct spelling.
| title="Copy Tailwind Css Name" | |
| title="Copy Tailwind CSS Name" |
| "@raycast/eslint-config": "^1.0.11", | ||
| "@types/culori": "^2.1.1", | ||
| "@types/node": "^20.8.10", | ||
| "@types/react": "^18.3.3", | ||
| "eslint": "^7.32.0", | ||
| "eslint-config-prettier": "^8.3.0", | ||
| "prettier": "^2.5.1", | ||
| "react": "^18.2.0", |
There was a problem hiding this comment.
Since you've upgraded most dependencies, would you mind updating the eslint and prettier in the PR? The eslint can be upgraded to version 8.
There was a problem hiding this comment.
I have updated the dependencies and the title. Thank you.
| "eslint": "^7.32.0", | ||
| "eslint-config-prettier": "^8.3.0", | ||
| "prettier": "^2.5.1", | ||
| "react": "^18.2.0", |
There was a problem hiding this comment.
The react is optional. We can consider removing it for a faster installation.
|
Is this ready @LitoMore |
LitoMore
left a comment
There was a problem hiding this comment.
@pernielsentikaer LGTM. Keeping the react dependency should be fine.
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool