-
Notifications
You must be signed in to change notification settings - Fork 97
feat(SharedBlueprints): add character limit counter - AB-900 #1262
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
base: dev
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughA single Vue component is enhanced to enforce a maximum description length of 8192 characters with real-time character count feedback, validation errors, and disabled publish/propose actions when the limit is exceeded. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
HackerOne Code Security Review🟢 Scan Complete: 1 Issue(s) Here's how the code changes were interpreted and info about the tools used for scanning. 📖 Summary of ChangesThe changes involve implementing description length validation in the BuilderSettingsDeploySharedBlueprint component. A new constant defines the maximum description length, and form validation has been added to prevent publishing when the description exceeds this limit. A character counter is now displayed, and the publish button is disabled if the description is too long.
ℹ️ Issues DetectedNOTE: These may not require action! Below are unvalidated results from the Analysis Tools that ran during the latest scan for transparency. We investigate each of these for accuracy and relevance before surfacing them as a potential problem. How will I know if something is a problem?
🧰 Analysis tools
⏱️ Latest scan covered changes up to commit 285cd0f (latest) |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/ui/src/builder/settings/BuilderSettingsDeploySharedBlueprint.vue (1)
132-134: Consider whether the validation error message should be displayed.The validation correctly sets an error message when the description exceeds the limit. However, unlike the name field (Line 14) which passes
:error="errors.name"toWdsTextInput, the textarea doesn't have a mechanism to displayerrors.descriptionas text. Users will see the red border and red character counter, but not the explanatory error message.If this is intentional (per the PR requirements focusing on the character counter), this is fine. Otherwise, consider displaying the error message for better UX.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/ui/src/builder/settings/BuilderSettingsDeploySharedBlueprint.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: tests (firefox)
- GitHub Check: build (3.12)
- GitHub Check: tests (chromium)
- GitHub Check: tests (webkit)
- GitHub Check: build (3.10)
- GitHub Check: build (3.13)
- GitHub Check: build (3.11)
- GitHub Check: build (3.9)
🔇 Additional comments (6)
src/ui/src/builder/settings/BuilderSettingsDeploySharedBlueprint.vue (6)
119-122: LGTM!The reactive computed properties correctly track description length and over-limit status. Note that JavaScript's
.lengthcounts UTF-16 code units rather than grapheme clusters, so complex emojis may count as multiple characters—ensure the backend uses consistent counting logic.
24-27: LGTM!The conditional error styling correctly provides immediate visual feedback when the description exceeds the limit or has a validation error.
29-37: LGTM!The character counter implementation matches the PR requirements perfectly—it displays the current and maximum character count and applies error styling when the limit is exceeded.
278-278: LGTM!The publish/propose button is correctly disabled when the description exceeds the character limit, preventing invalid submissions as specified in the PR requirements.
319-328: LGTM!The character counter styling is clean and conventional—unobtrusive positioning with clear error state differentiation through color.
79-80: Verify the character limit matches backend validation.The frontend enforces an 8192-character limit for descriptions, but no corresponding backend validation was found for this field in the examined code. Ensure that any backend endpoint accepting descriptions has matching character limit validation to prevent inconsistencies between client and server.
|
✅ Xiaoyong W reviewed all the included code changes and associated automation findings and determined that there were no immediately actionable security flaws. Note that they will continue to be notified of any new commits or comments and follow up as needed throughout the duration of this pull request's lifecycle. Reviewed with ❤️ by PullRequest |
|
Due to inactivity, PullRequest has cancelled this review job. You can reactivate the code review job from the PullRequest dashboard. |
Summary by CodeRabbit
New Features
Style
✏️ Tip: You can customize this high-level summary in your review settings.