Parse.ly Dashboard: Apply some minor presentation adjustments#3326
Parse.ly Dashboard: Apply some minor presentation adjustments#3326acicovic wants to merge 5 commits intoadd/traffic-boostfrom
Conversation
📝 WalkthroughWalkthroughThis update revises menu and submenu titles in the WordPress admin for the Parse.ly dashboard, updates page headers to reflect new naming, dynamically changes the browser page title based on navigation, and removes the dashboard header component from the dashboard page. No changes were made to underlying logic or exported interfaces. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AdminMenu (PHP)
participant DashboardPage (React)
participant Browser
User->>AdminMenu: Loads WP Admin
AdminMenu-->>User: Shows menu with updated titles
User->>DashboardPage: Navigates to dashboard or traffic boost
DashboardPage->>Browser: Updates document title dynamically based on hash path
Possibly related PRs
Suggested labels
Suggested reviewers
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. ✨ 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
|
…to-parsely-dashboard-pages
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/content-helper/dashboard-page/pages/dashboard/page-component.tsx (1)
15-15: Consider removing commented code instead of commenting it out.Rather than commenting out the import and component usage, it would be better to remove them entirely to keep the codebase clean and avoid confusion for other developers.
-// import { DashboardHeader } from './header-component'; - - { /* <DashboardHeader /> */ }Also applies to: 74-74
src/content-helper/dashboard-page/dashboard-page.tsx (1)
90-104: Add missing @SInCE tag and period in JSDoc comment.The function has proper JSDoc documentation, but according to the coding guidelines, every JSDoc comment should include a @SInCE tag and each comment should end with a period.
/** * Updates the page title based on the passed hash path. * * @since 3.19.0 +* @since 3.19.0 * * @param {string} hashPath The hash path. + */
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
build/content-helper/dashboard-page.asset.phpis excluded by!build/**build/content-helper/dashboard-page.jsis excluded by!build/**
📒 Files selected for processing (4)
src/UI/class-dashboard-page.php(3 hunks)src/content-helper/dashboard-page/dashboard-page.tsx(2 hunks)src/content-helper/dashboard-page/pages/dashboard/page-component.tsx(2 hunks)src/content-helper/dashboard-page/pages/traffic-boost/page-component.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.{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/content-helper/dashboard-page/pages/traffic-boost/page-component.tsxsrc/content-helper/dashboard-page/pages/dashboard/page-component.tsxsrc/content-helper/dashboard-page/dashboard-page.tsx
`**/*.{html,php}`: "Perform a detailed review of the provided code with following key aspects in mind: - Review the HTML and PHP code to ensure it is well-structured and adheres ...
**/*.{html,php}: "Perform a detailed review of the provided code with following key aspects in mind:
- Review the HTML and PHP code to ensure it is well-structured and adheres to best practices.
- Ensure the code follows WordPress coding standards and is well-documented.
- Confirm the code is secure and free from vulnerabilities.
- Optimize the code for performance, removing any unnecessary elements.
- Validate comments for accuracy, currency, and adherence to WordPress coding standards.
- Ensure each line comment concludes with a period.
- Verify code compatibility with the latest version of WordPress, avoiding deprecated functions or features."
src/UI/class-dashboard-page.php
🔇 Additional comments (5)
src/UI/class-dashboard-page.php (3)
150-150: Menu title properly updated to maintain consistency.The menu page title has been updated to be more concise as "Parse.ly" which aligns with the PR objectives to improve the presentation of the Parse.ly Dashboard.
162-162: Submenu page title appropriately renamed.The submenu page title has been properly updated to "Parse.ly Dashboard" to provide a clearer description of this specific section within the Parse.ly menu.
172-172: Beta label properly added to Traffic Boost menu item.The "(beta)" label has been appropriately added to the Traffic Boost menu item, which aligns with the PR objectives and clearly communicates the feature's status to users.
src/content-helper/dashboard-page/pages/traffic-boost/page-component.tsx (1)
32-32: Beta label correctly added to page header.The beta label has been properly added to the Traffic Boost page header, maintaining consistency with the menu item label changes and clearly communicating the feature's beta status to users.
src/content-helper/dashboard-page/dashboard-page.tsx (1)
97-104: Excellent implementation of dynamic page title update.The function effectively updates the document title to reflect the correct page title when navigating to the Traffic Boost section, ensuring consistency between the menu labels and page titles.
|
@acicovic These changes all look good to me! Does it make sense to still have a "Dashboard" page at all? It's currently just the same as the "Traffic Boost (beta)" page, but with fewer posts and no search bar. There's really not a reason to view that page at this time, the regular Traffic Boost page is strictly better. I think it might make sense to have the Traffic boost page be the root page and remove the dashboard until it has another purpose. What do you think? |
|
Hey @alecgeatches, this code is actually a couple of days old (when I wasn't sure about what to do with the Dashboard page yet). Today and with the latest discussions, I do agree we should remove the Dashboard page (tried briefly yesterday but something wasn't working out). Do you think we should just close this PR? |
|
Closing this in favor of #3327. |
Description
This PR:
How has this been tested?
Manually checked that the changes are reflected in the UI.
Summary by CodeRabbit
New Features
Style
Refactor