Skip to content

Now the wizard uses a custom header and the content has been changed#274

Merged
gin0115 merged 4 commits into
trunkfrom
feature/gh265-improve-wizard
Nov 21, 2025
Merged

Now the wizard uses a custom header and the content has been changed#274
gin0115 merged 4 commits into
trunkfrom
feature/gh265-improve-wizard

Conversation

@gin0115

@gin0115 gin0115 commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator

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

  • Added a new .iawmlf-wizard__header section 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]
  • Refactored wizard footer layout to use a flex column and added a new .iawmlf-wizard__footer__actions container 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

  • Step navigation buttons now display context-aware labels based on the current wizard step, guiding users through the setup process more clearly. (templates/admin/wizard/footer.php)

Content and Instructional Updates

  • Rewrote the introductory content for each wizard step to be more user-friendly and informative, replacing placeholder text and clarifying the plugin’s functionality. (templates/admin/wizard/step-1.php, templates/admin/wizard/step-2.php, templates/admin/wizard/step-3.php) [1] [2] [3]

Minor Wording Change

  • Updated the completion message to reference the "Advanced Settings page" instead of "Wayback Link Fixer Settings" for consistency. (templates/admin/wizard/complete.php)

Testing instructions

Mentions #265

Summary by CodeRabbit

  • Style
    • Redesigned setup wizard header with logo and centered layout
    • Updated step content with clearer explanations and renamed field labels for preservation/automatic fixes
    • Footer layout improved with grouped action buttons, contextual Previous/Next labels, and adjusted progress spacing
  • Bug Fixes
    • Corrected tooltip/translation text from "inedible" to "ineligible for redirect"

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 21, 2025

Copy link
Copy Markdown

Walkthrough

Reworks 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

  • a8cteam51/internet-archive-wayback-machine-link-fixer PR 205 — Performs wide rename/selector changes (wlf_* → iawmlf_*) and matching template/CSS/JS updates that overlap this PR's identifier/name changes.
  • a8cteam51/internet-archive-wayback-machine-link-fixer PR 203 — Makes security-related edits (access guards and output sanitization) in the same wizard template files modified here.
  • a8cteam51/internet-archive-wayback-machine-link-fixer PR 187 — Modifies the Setup_Wizard rendering and related admin wizard templates that this PR also updates.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: a custom wizard header implementation and rewritten step content throughout the wizard interface.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9375114 and 791c3e7.

📒 Files selected for processing (3)
  • languages/internet-archive-wayback-machine-link-fixer.pot (1 hunks)
  • src/Dashboard/Setup_Wizard.php (1 hunks)
  • templates/admin/dashboard/page.php (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Dashboard/Setup_Wizard.php
⏰ 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 (2)
languages/internet-archive-wayback-machine-link-fixer.pot (1)

784-787: Typo fix in msgid looks correct and consistent

Updating the msgid to “%1$s being redirected, %2$s ineligible for redirect” fixes the previous typo without changing placeholder structure, and it matches the updated usage in templates/admin/dashboard/page.php. No further changes needed.

templates/admin/dashboard/page.php (1)

50-55: Dashboard tooltip copy and translation key now aligned

The updated tooltip string (“ineligible for redirect”) fixes the wording, stays consistent with the sidebar label and the POT entry, and preserves the sprintf placeholders and translation domain. All good.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3f821c and 9375114.

⛔ Files ignored due to path filters (1)
  • assets/images/icon.svg is 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:

  1. Line 409: The opening parenthesis of the multi-line printf call must be the last content on the line (PHPCS violation).
  2. Line 410: IAWMLF_URL is output without escaping. Although it's likely a constant, it should be wrapped in esc_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 __() to esc_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>'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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.

@gin0115 gin0115 linked an issue Nov 21, 2025 that may be closed by this pull request
@gin0115 gin0115 merged commit 4c3af7d into trunk Nov 21, 2025
11 checks passed
This was referenced Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inedible > ineligible

1 participant