-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat(toolbar): custom color picker save current pick color and add more color #205
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis PR introduces a custom color picker feature in the toolbar, allowing users to save the current picked color and add more colors. It prevents the toolbar's current color from changing with the cursor's position and enables setting the last selected color directly by clicking the icon. This update facilitates quick color changes via shortcut keys. Changes
|
if (!response.ok) { | ||
throw new Error('Copy image failed') | ||
} | ||
const blob = await response.blob() |
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.
Ensure that the fetch response is checked for success before proceeding to use the blob. This is crucial to avoid runtime errors if the fetch fails.
v4 要合并一下主分支提交 |
@zzxming 这个看下是颜色面板支持自定义颜色,可否贴下效果图呢? |
@zzxming 对勾的颜色太扎眼了,建议深色的用白色,然后浅色的用黑色。 |
@zzxming 有一个小的优化点:目前字体颜色和背景颜色的高亮都分了两部分,如果一直高亮着不好看(之前是跟随光标所在内容的字体颜色和背景颜色,不会一直高亮所以问题不大),建议上面部分不高亮,下面那根短横线高亮即可。 |
已合主干分支 |
这个是滤镜算的对比色,保证所有颜色的情况下都能明显显示出来这个对勾,如果固定的话,用户自定义的颜色值配置不到还是会有看不清的情况。这个没能想到还有什么样式能够明显显示的方法 |
上半部分的高亮可以处理掉,但是 background 的图标是 svg 问题,这个 svg 是一个整体,要修改的话要找一个其他的 svg |
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
<path d="M4.64447006,9.66583547 L3.17597929,8.33216965 L6.15933183,5.11039074 L5.42508645,4.44355783 | ||
<path class="ql-color-label" d="M4.64447006,9.66583547 L3.17597929,8.33216965 L6.15933183,5.11039074 L5.42508645,4.44355783 |
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.
@kagol icon 这个你回头找个好看的吧,在横线的位置加上这个类名就行
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
此 pr 为颜色选择添加更多默认颜色与自定义颜色选择,使工具栏当前颜色不会跟随光标移动而变为光标所在位置的颜色,使点击图标后可直接设置上次选择的颜色。
此修改为实现shortcut-key中颜色修改的快捷设置