-
Notifications
You must be signed in to change notification settings - Fork 33
Content Helper: Improve some messages #3343
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
Content Helper: Improve some messages #3343
Conversation
📝 WalkthroughWalkthroughThe changes update error message links and their attributes in three components related to Content Helper authorization errors. URLs and Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI_Component
participant ContentHelperError
User->>UI_Component: Triggers action requiring authorization
UI_Component->>ContentHelperError: Checks for authorization error
ContentHelperError-->>UI_Component: Returns ParselySuggestionsApiNoAuthorization error
UI_Component->>UI_Component: Constructs error message with updated links and attributes
UI_Component-->>User: Displays error message with secure, updated links
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm warn config production Use ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
Documentation and Community
|
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: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (8)
build/admin-settings.asset.phpis excluded by!build/**build/admin-settings.jsis excluded by!build/**build/content-helper/dashboard-page.asset.phpis excluded by!build/**build/content-helper/dashboard-page.jsis excluded by!build/**build/content-helper/dashboard-widget.asset.phpis excluded by!build/**build/content-helper/dashboard-widget.jsis excluded by!build/**build/content-helper/editor-sidebar.asset.phpis excluded by!build/**build/content-helper/editor-sidebar.jsis excluded by!build/**
📒 Files selected for processing (3)
src/content-helper/common/content-helper-error.tsx(1 hunks)src/content-helper/dashboard-page/pages/traffic-boost/sidebar/components/tabs-content.tsx(2 hunks)src/js/admin-settings.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{js,ts,tsx,jsx}`: "Perform a detailed review of the provided code with following key aspects in mind: - Review the code to ensure it is well-structured and adheres to best ...
**/*.{js,ts,tsx,jsx}: "Perform a detailed review of the provided code with following key aspects in mind:
- Review the code to ensure it is well-structured and adheres to best practices.
- Verify compliance with WordPress coding standards.
- Ensure the code is well-documented.
- Check for security vulnerabilities and confirm the code is secure.
- Optimize the code for performance, removing any unnecessary elements.
- Validate JSDoc comments for accuracy, currency, and adherence to WordPress coding standards.
- Ensure each line comment concludes with a period.
- Confirm every JSDoc comment includes a @SInCE tag indicating the next version of the plugin to include the code.
- Guarantee compatibility with the latest version of WordPress, avoiding deprecated functions or features."
src/js/admin-settings.tssrc/content-helper/dashboard-page/pages/traffic-boost/sidebar/components/tabs-content.tsxsrc/content-helper/common/content-helper-error.tsx
🪛 Biome (1.9.4)
src/content-helper/dashboard-page/pages/traffic-boost/sidebar/components/tabs-content.tsx
[error] 105-105: Avoid passing children using a prop
The canonical way to pass children in React is to use JSX elements
(lint/correctness/noChildrenProp)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: E2E against WordPress latest
🔇 Additional comments (3)
src/js/admin-settings.ts (1)
279-279: Improved link security and user experience.The link to request access to Content Helper AI functionality now opens in a new tab (
target="_blank") and includesrel="noopener"for security. This ensures the new page cannot access the opener window via JavaScript, which is a security best practice for external links.src/content-helper/common/content-helper-error.tsx (1)
111-111: Enhanced link security and updated destination URL.The link has been updated to point to a more specific destination (
https://wpvip.com/content-helper/#content-helper-form) and now includes proper security attributes (target="_blank"andrel="noopener"). This change improves both user experience and security.src/content-helper/dashboard-page/pages/traffic-boost/sidebar/components/tabs-content.tsx (1)
6-7: Added necessary imports for safer message handling.Added
escapeHTMLandsprintfimports to properly escape HTML and construct messages with variable substitution, which is essential for the improved error message handling.
Description
This PR improves some Content Helper messages, and escapes an unescaped message.
@alecgeatches, I'll be merging this now with the release being today, but I'd welcome a post-merge review.
Motivation and context
Related to #3341 and #3337.
Summary by CodeRabbit