Now the wizard uses a custom header and the content has been changed#274
Conversation
WalkthroughReworks the admin setup wizard UI: adds new header markup with logo and updated title, updates wizard CSS (header, footer, actions, progress bar spacing), replaces several step templates with new intro/label text and feature content, makes footer buttons step-aware with dynamic Previous/Next labels, and corrects a translated string from "inedible" to "ineligible". No changes to exported/public declarations or control flow logic. Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (1)
🔇 Additional comments (2)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
assets/images/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (7)
assets/css/src/admin/_wizard.scss(4 hunks)src/Dashboard/Setup_Wizard.php(1 hunks)templates/admin/wizard/complete.php(1 hunks)templates/admin/wizard/footer.php(2 hunks)templates/admin/wizard/step-1.php(1 hunks)templates/admin/wizard/step-2.php(1 hunks)templates/admin/wizard/step-3.php(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
templates/admin/wizard/complete.php (1)
src/Dashboard/Settings_Page.php (1)
Settings_Page(23-1101)
🪛 GitHub Actions: PHP Coding Standards
src/Dashboard/Setup_Wizard.php
[error] 409-409: PHPCS: Opening parenthesis of a multi-line function call must be the last content on the line (PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[error] 411-411: PHPCS: All output should be run through an escaping function (WordPress.Security.EscapeOutput.OutputNotEscaped)
⏰ 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). (1)
- GitHub Check: build (ubuntu-latest, 8.1)
🔇 Additional comments (6)
templates/admin/wizard/step-1.php (1)
22-46: Excellent content improvements!The new welcome message and feature list provide clear, user-friendly information about how the plugin works. The three-point explanation (timing, reliability, automation) effectively sets expectations for users.
templates/admin/wizard/step-3.php (1)
25-30: Good UX improvements.The updated intro text clearly explains the auto-archiving feature, and the label change to "Automatically preserve:" is more user-friendly and action-oriented than the generic "Post Types."
templates/admin/wizard/step-2.php (1)
25-31: Good UX improvements.The updated intro text concisely explains the link-fixing feature, and the label change to "Automatically fix broken links in:" is more descriptive and user-friendly than the generic "Post Types."
assets/css/src/admin/_wizard.scss (1)
16-28: Well-structured CSS improvements.The new header styling provides a clean, centered layout for the logo and title. The footer restructure from row to column layout with a dedicated actions container improves the visual hierarchy and button alignment. Margin normalization on progress bar paragraphs prevents spacing inconsistencies.
Also applies to: 86-86, 99-119
templates/admin/wizard/footer.php (1)
27-73: Excellent UX improvement with step-aware navigation.The switch statement provides context-aware button labels that clearly indicate which step the user is navigating to (e.g., "Next Step: Configure the Link Fixer"). The restructured footer with a consolidated actions container improves the visual layout and makes the navigation flow more intuitive.
src/Dashboard/Setup_Wizard.php (1)
408-416: Fix escaping and formatting violations.Two critical issues flagged by pipeline:
- Line 409: The opening parenthesis of the multi-line
printfcall must be the last content on the line (PHPCS violation).- Line 410:
IAWMLF_URLis output without escaping. Although it's likely a constant, it should be wrapped inesc_url()for security hardening.Apply this diff to fix both issues:
- echo '<div class="iawmlf-wizard__header">'; - printf('<img src="%1$s" alt="%2$s" class="iawmlf-wizard__title__logo" /> ', - esc_url( IAWMLF_URL . 'assets/images/icon.svg' ), - __( 'Internet Archive Logo', 'internet-archive-wayback-machine-link-fixer' ) - ); - echo '<h1 class="iawmlf-wizard__title">'; - esc_html_e( 'Internet Archive Wayback Machine Link Fixer Setup', 'internet-archive-wayback-machine-link-fixer' ); - echo '</h1>'; - echo '</div>'; + echo '<div class="iawmlf-wizard__header">'; + printf( + '<img src="%1$s" alt="%2$s" class="iawmlf-wizard__title__logo" /> ', + esc_url( IAWMLF_URL . 'assets/images/icon.svg' ), + esc_attr__( 'Internet Archive Logo', 'internet-archive-wayback-machine-link-fixer' ) + ); + echo '<h1 class="iawmlf-wizard__title">'; + esc_html_e( 'Internet Archive Wayback Machine Link Fixer Setup', 'internet-archive-wayback-machine-link-fixer' ); + echo '</h1>'; + echo '</div>';Note: Also changed
__()toesc_attr__()for the alt attribute to ensure proper escaping context.Likely an incorrect or invalid review comment.
| // translators: %s is a link to the plugin settings page. | ||
| esc_html__( 'Setup is now complete! You can edit these settings at any time from the %s page.', 'internet-archive-wayback-machine-link-fixer' ), | ||
| '<a href="' . esc_url( Settings_Page::get_page_url() ) . '">' . esc_html__( 'Wayback Link Fixer Settings', 'internet-archive-wayback-machine-link-fixer' ) . '</a>' | ||
| '<a href="' . esc_url( Settings_Page::get_page_url() ) . '">' . esc_html__( 'Advanced Settings page', 'internet-archive-wayback-machine-link-fixer' ) . '</a>' |
There was a problem hiding this comment.
🧩 Analysis chain
Verify link text matches the actual page title.
The link text "Advanced Settings page" should match the actual settings page title for consistency. Based on the codebase, Settings_Page::register_page() uses "Wayback Link Fixer Settings" as the page title and "Settings" as the menu title. Consider using one of these for clarity.
Run this script to verify the actual page title:
🏁 Script executed:
#!/bin/bash
# Check the Settings_Page registration to confirm the page title
rg -A 10 "function register_page" --type php | grep -A 5 "add_submenu_page"Length of output: 894
Update link text to match the actual page title.
The link text "Advanced Settings page" does not match the actual settings page title. According to Settings_Page::register_page(), the page title is "Wayback Link Fixer Settings" and the menu title is "Settings". Update line 30 in templates/admin/wizard/complete.php to use one of these existing titles for consistency.
🤖 Prompt for AI Agents
In templates/admin/wizard/complete.php around line 30, the anchor text "Advanced
Settings page" is inconsistent with the registered page title; replace that link
text with the existing title "Wayback Link Fixer Settings" (or "Settings" if you
prefer the menu label) so the anchor reads '<a href="...">Wayback Link Fixer
Settings</a>' using the same esc functions already present.
Changes proposed in this Pull Request
This pull request updates the onboarding/setup wizard for the Internet Archive Wayback Machine Link Fixer plugin, focusing on improving the user experience and clarity of the wizard interface. The main changes include a redesigned header, improved step navigation with dynamic button labels, and clearer instructional content for each setup step.
UI/UX Improvements
.iawmlf-wizard__headersection with a logo and centered title to the wizard interface for better branding and visual hierarchy. (src/Dashboard/Setup_Wizard.php,assets/css/src/admin/_wizard.scss) [1] [2].iawmlf-wizard__footer__actionscontainer for step navigation buttons, improving layout consistency and responsiveness. (assets/css/src/admin/_wizard.scss,templates/admin/wizard/footer.php) [1] [2] [3]Navigation Enhancements
templates/admin/wizard/footer.php)Content and Instructional Updates
templates/admin/wizard/step-1.php,templates/admin/wizard/step-2.php,templates/admin/wizard/step-3.php) [1] [2] [3]Minor Wording Change
templates/admin/wizard/complete.php)Testing instructions
Mentions #265
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.