Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 46 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions projects/packages/podcast/changelog/add-admin-tabs-scaffold
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Replace the wp-build placeholder with page chrome (title, tagline) plus tab navigation (Welcome, Settings, Episodes, Distribution). Each tab panel is still empty — PR 4 in the untangle train fills them in.
8 changes: 6 additions & 2 deletions projects/packages/podcast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@
"browserslist": [
"extends @wordpress/browserslist-config"
],
"dependencies": {
"@wordpress/components": "32.6.0",
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0",
"@wordpress/ui": "0.11.0"
},
"devDependencies": {
"@automattic/jetpack-wp-build-polyfills": "workspace:*",
"@babel/core": "7.29.0",
"@babel/runtime": "7.29.2",
"@types/react": "18.3.28",
"@wordpress/browserslist-config": "6.44.0",
"@wordpress/build": "0.13.0",
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0",
"browserslist": "^4.24.0"
},
"optionalDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion projects/packages/podcast/routes/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"private": true,
"dependencies": {
"@types/react": "18.3.28",
"@wordpress/components": "32.6.0",
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0"
"@wordpress/i18n": "6.17.0",
"@wordpress/ui": "0.11.0"
},
"route": {
"path": "/",
Expand Down
57 changes: 55 additions & 2 deletions projects/packages/podcast/routes/dashboard/stage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,59 @@
/**
* Podcast dashboard stage: page chrome + tab navigation.
*
* Placeholder scaffolding only — each tab panel renders a stub. PR 4 in the
* untangle train wires the full AdminPage + jetpack-components integration
* along with the real tab contents.
*/

import { useState, useCallback } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { Tabs } from '@wordpress/ui';

const TAB_VALUES = [ 'settings', 'episodes', 'distribution', 'stats' ] as const;
type TabName = ( typeof TAB_VALUES )[ number ];

const isValidTab = ( value: string | null ): value is TabName =>
!! value && ( TAB_VALUES as readonly string[] ).includes( value );

const Stage = () => {
// "Podcast" is a product name, do not translate.
return <h1>Podcast</h1>;
const [ activeTab, setActiveTab ] = useState< TabName >( 'settings' );

const handleTabChange = useCallback( ( value: string | null ) => {
if ( isValidTab( value ) ) {
setActiveTab( value );
}
}, [] );

return (
<div className="wrap">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Recommend doing a follow-up to use Jetpack's admin-page component to match the visual style with the rest of Jetpack stuff. :-)

<h1>Podcast</h1>
<p>
{ __( 'Publish a podcast and reach your fans, anywhere they listen.', 'jetpack-podcast' ) }
</p>

<Tabs.Root value={ activeTab } onValueChange={ handleTabChange }>
<Tabs.List>
<Tabs.Tab value="settings">{ __( 'Settings', 'jetpack-podcast' ) }</Tabs.Tab>
<Tabs.Tab value="episodes">{ __( 'Episodes', 'jetpack-podcast' ) }</Tabs.Tab>
<Tabs.Tab value="distribution">{ __( 'Distribution', 'jetpack-podcast' ) }</Tabs.Tab>
<Tabs.Tab value="stats">{ __( 'Stats', 'jetpack-podcast' ) }</Tabs.Tab>
</Tabs.List>
<Tabs.Panel value="settings">
<p>{ __( 'Settings — placeholder.', 'jetpack-podcast' ) }</p>
</Tabs.Panel>
<Tabs.Panel value="episodes">
<p>{ __( 'Episodes — placeholder.', 'jetpack-podcast' ) }</p>
</Tabs.Panel>
<Tabs.Panel value="distribution">
<p>{ __( 'Distribution — placeholder.', 'jetpack-podcast' ) }</p>
</Tabs.Panel>
<Tabs.Panel value="stats">
<p>{ __( 'Stats — placeholder.', 'jetpack-podcast' ) }</p>
</Tabs.Panel>
</Tabs.Root>
</div>
);
};

export { Stage as stage };
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Podcast: drop redundant late_initialization load — the package is loaded via jetpack-mu-wpcom on Simple/Atomic, and the host gate makes the Jetpack plugin call a no-op.


2 changes: 0 additions & 2 deletions projects/plugins/jetpack/class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Automattic\Jetpack\Paths;
use Automattic\Jetpack\Plugin\Deprecate;
use Automattic\Jetpack\Plugin\Tracking as Plugin_Tracking;
use Automattic\Jetpack\Podcast\Podcast as Podcast_Init;
use Automattic\Jetpack\Redirect;
use Automattic\Jetpack\Scan_Page\Jetpack_Scan as Scan_Page_Init;
use Automattic\Jetpack\Status;
Expand Down Expand Up @@ -874,7 +873,6 @@ public function late_initialization() {
My_Jetpack_Initializer::init();
Activity_Log_Init::initialize();
Scan_Page_Init::initialize();
Podcast_Init::init();

// Initialize Boost Speed Score
new Speed_Score( array(), 'jetpack-dashboard' );
Expand Down
Loading