[WEB-3045] fix: sticky placeholder, gray color value#6436
Conversation
WalkthroughThe pull request introduces changes to three files related to the sticky editor and color palette components. The modifications include updating the background color for the gray color in the color palette, removing the placeholder prop from the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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 (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
web/core/components/editor/sticky-editor/color-palette.tsx (1)
11-11: LGTM! Consider standardizing color variables.The change to use
rgba(var(--color-background-90))for the gray background aligns with the PR objective. However, consider standardizing all colors to use the same variable pattern for better maintainability.Consider updating other colors to follow the same pattern:
- backgroundColor: "var(--editor-colors-peach-background)", + backgroundColor: "rgba(var(--color-peach-90))",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
web/core/components/editor/sticky-editor/color-palette.tsx(1 hunks)web/core/components/editor/sticky-editor/editor.tsx(0 hunks)web/core/components/stickies/sticky/inputs.tsx(2 hunks)
💤 Files with no reviewable changes (1)
- web/core/components/editor/sticky-editor/editor.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript)
- GitHub Check: Analyze (python)
🔇 Additional comments (2)
web/core/components/stickies/sticky/inputs.tsx (2)
7-8: LGTM! Clean import addition.The import of
isCommentEmptyfrom@plane/utilsis properly organized in the imports section.
72-76: LGTM! Clean implementation of dynamic placeholder.The placeholder function effectively implements the requirement to show/hide placeholder based on content state.
Let's verify the reliability of the
isCommentEmptyutility:✅ Verification successful
Implementation of
isCommentEmptyis reliable and correctly used.The utility function has a robust implementation that properly handles all edge cases (undefined, empty strings, empty HTML paragraphs) and is consistently implemented across the codebase. Its usage in the placeholder logic is correct and follows the expected behavior.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for the implementation and tests of isCommentEmpty utility echo "Searching for isCommentEmpty implementation:" rg -p "export.*isCommentEmpty" -t typescript echo "\nSearching for isCommentEmpty tests:" rg -p "test.*isCommentEmpty" -t typescriptLength of output: 345
Script:
#!/bin/bash # Search for isCommentEmpty implementation with correct flags and context echo "Searching for isCommentEmpty implementation:" rg -p "isCommentEmpty" -g "*.{ts,tsx}" -B 2 -A 5 echo -e "\nSearching specifically for exports of isCommentEmpty:" rg "export.*(function|const) isCommentEmpty" -g "*.{ts,tsx}" echo -e "\nSearching for test files containing isCommentEmpty:" rg "isCommentEmpty" -g "*{test,spec}.{ts,tsx}"Length of output: 8557
Script:
#!/bin/bash # Search for tests with various patterns and locations echo "Searching for tests in common test locations:" rg "isCommentEmpty" -g "**/__tests__/**" -g "**/*.test.*" -g "**/*.spec.*" -g "**/tests/**" echo -e "\nSearching for the complete implementation to verify edge cases:" rg -A 5 "export const isCommentEmpty" -g "*.{ts,tsx}"Length of output: 1573
Description
This PR improves on the following things-
Type of Change
Summary by CodeRabbit
UI Changes
Utility Updates
The changes subtly modify the visual and interactive aspects of the sticky editor and color palette, focusing on improving the user interface and content handling.