Skip to content

Commit f5498da

Browse files
shortovclaude
andcommitted
Fix submenu: restore Overview page, fix collapse nesting, hide rail
- Keep top-level submenu as "Overview" instead of removing it - Fix broken HTML nesting where overview panel div crossed into aeo-audit-content boundary, hiding all stage content - Hide workflow rail on direct-tab pages via CSS - Remove duplicate Settings submenu entry Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6a5c27d commit f5498da

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

admin/css/admin.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
display: none;
7878
}
7979

80+
.aeo-direct-tab .aeo-workflow-rail {
81+
display: none;
82+
}
83+
8084
.aeo-settings h1 {
8185
margin: 0;
8286
font-size: 32px;

admin/views/audit-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@
351351
</div>
352352
</div>
353353
<?php endif; ?>
354+
</div><!-- /.aeo-overview-panel -->
354355

355356
<!-- Loading state -->
356357
<div id="aeo-audit-loading" class="aeo-audit-loading" <?php echo $aeocas_connected ? '' : 'style="display: none;"'; ?>>
@@ -433,7 +434,6 @@
433434
</a>
434435
</nav>
435436
<?php endif; ?>
436-
</div><!-- /.aeo-overview-panel -->
437437

438438
<section class="aeo-stage-shell <?php echo 'connect' === $aeocas_active_stage ? 'is-active' : ''; ?>" id="stage-connect" data-stage="connect" <?php echo 'connect' === $aeocas_active_stage ? '' : 'style="display: none;"'; ?>>
439439
<?php if ( $aeocas_connected ) : ?>

includes/class-aeo-settings.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,18 @@ public function add_menu() {
4646
30
4747
);
4848

49-
// Submenu items link directly to tab query args on the same page.
50-
// We inject raw URLs into the global $submenu array so WordPress
51-
// renders them as sidebar links without registering new page slugs.
49+
// Rename the auto-generated first submenu entry from "AEO Content"
50+
// to "Overview" so it serves as the dashboard landing page.
51+
add_submenu_page(
52+
$base,
53+
__( 'Overview - AEO Content', 'aeo-content-ai-studio' ),
54+
__( 'Overview', 'aeo-content-ai-studio' ),
55+
$cap,
56+
$base,
57+
array( $this, 'render_audit_report' )
58+
);
59+
60+
// Additional submenu items link directly to tab query args.
5261
global $submenu;
5362

5463
$tabs = array(
@@ -57,7 +66,6 @@ public function add_menu() {
5766
array( 'Opportunities', 'opportunities' ),
5867
array( 'Rewrites', 'rewrite' ),
5968
array( 'AI Visibility', 'visibility-overview' ),
60-
array( 'Settings', 'connect' ),
6169
);
6270

6371
foreach ( $tabs as $item ) {
@@ -67,9 +75,6 @@ public function add_menu() {
6775
esc_url( admin_url( $base_url . '&tab=' . $item[1] ) ),
6876
);
6977
}
70-
71-
// Remove the auto-generated duplicate top-level submenu entry.
72-
remove_submenu_page( $base, $base );
7378
}
7479

7580
/**

0 commit comments

Comments
 (0)