Skip to content

Update tw-colorsearch extension#17805

Merged
raycastbot merged 4 commits intoraycast:mainfrom
ridemountainpig:tw-colorsearch
Mar 13, 2025
Merged

Update tw-colorsearch extension#17805
raycastbot merged 4 commits intoraycast:mainfrom
ridemountainpig:tw-colorsearch

Conversation

@ridemountainpig
Copy link
Contributor

Description

  • Added support for the OKLCH color format.
  • Update dependencies and Tailwind CSS colors to their latest versions.

Screencast

tw-colorpicker 2025-03-13 at 09 14 36

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: tw-colorsearch Issues related to the tw-colorsearch extension labels Mar 13, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Mar 13, 2025

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

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

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}
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Remove the dash between [Feature] and {PR_MERGE_DATE}. The format should be ## [Feature] - {PR_MERGE_DATE}

Suggested change
## [Feature]- {PR_MERGE_DATE}
## [Feature] - {PR_MERGE_DATE}

Comment on lines +319 to 320
hex: formatHex(tw_colors[colorName][shade]) || "",
rgb: HexToRGB(tw_colors[colorName][shade]),
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: HexToRGB may fail if formatHex returns empty string. Add null check before conversion

Suggested change
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)",

Comment on lines +10 to +12
.raycast-swift-build
.swiftpm
compiled_raycast_swift
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Suggested change
.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} />
Copy link
Contributor

Choose a reason for hiding this comment

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

The RGB should be upper cased. See https://en.wikipedia.org/wiki/RGB_color_model.

Suggested change
<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"
Copy link
Contributor

Choose a reason for hiding this comment

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

Tailwind CSS is a trademark. Let's use the correct spelling.

Suggested change
title="Copy Tailwind Css Name"
title="Copy Tailwind CSS Name"

Comment on lines +31 to +37
"@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",
Copy link
Contributor

@LitoMore LitoMore Mar 13, 2025

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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",
Copy link
Contributor

Choose a reason for hiding this comment

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

The react is optional. We can consider removing it for a faster installation.

@pernielsentikaer
Copy link
Collaborator

Is this ready @LitoMore

Copy link
Contributor

@LitoMore LitoMore left a comment

Choose a reason for hiding this comment

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

@pernielsentikaer LGTM. Keeping the react dependency should be fine.

@pernielsentikaer pernielsentikaer self-assigned this Mar 13, 2025
@raycastbot raycastbot merged commit 38427f1 into raycast:main Mar 13, 2025
2 checks passed
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/magicjaqk/tw-colorpicker

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@ridemountainpig ridemountainpig deleted the tw-colorsearch branch March 31, 2025 02:10
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: tw-colorsearch Issues related to the tw-colorsearch extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants