Skip to content

Conversation

@obenland
Copy link
Member

Proposed changes:

This PR refactors the Social Web UI to use a cleaner three-panel layout architecture.

Architecture:

  • Replaced custom routing with simpler state-based navigation
  • Implemented three-panel layout: sidebar, stage (main content), and inspector (details panel)
  • Created reusable Page and Panel components for consistent UI structure
  • Organized routes by section (dashboard, followers, following, interactions)

Components:

  • Layout: Dark theme (#1e1e1e) with fullscreen mode support
  • Sidebar: 300px fixed width with visible menu items on dark background
  • Stage: Main content area with DataViews tables and action buttons
  • Inspector: 380px conditional panel for item details

TypeScript improvements:

  • Added explicit action types for Redux store (SetFollowersAction, etc.)
  • Created store.d.ts for @wordpress/data module augmentation
  • Fixed React JSX transform configuration (react-jsx mode)
  • Added missing icon type definitions

Styling:

  • Consolidated styles into style-index.css via style.scss entry point
  • Added fullscreen body class management with useEffect hook
  • Used wpds design tokens for consistency with WordPress Design System
  • Proper margin-based spacing between panels

Other information:

  • Have you written new tests for your changes, if applicable?

N/A - This is a refactoring of the UI structure. All existing functionality remains the same.

Testing instructions:

  1. Check out this branch
  2. Run npm install && npm run build
  3. Navigate to the Social Web admin page in WordPress
  4. Verify the UI renders with:
    • Dark sidebar on the left (300px width) with visible menu items
    • White content panel on the right
    • Fullscreen layout (no WordPress admin UI visible)
  5. Click "Followers" in the sidebar and verify the followers table displays
  6. Click on a follower name to open the inspector panel on the right
  7. Verify the inspector shows follower details with a close button
  8. Repeat for "Following" and "Interactions" sections
  9. Check that all TypeScript builds without errors: npm run build

Major architectural changes:
- Replaced custom routing with simpler state-based navigation
- Implemented three-panel layout (sidebar, stage, inspector)
- Created reusable Page and Panel components for consistent UI structure
- Organized routes by section (dashboard, followers, following, interactions)

Component improvements:
- Layout: Dark theme (#1e1e1e) with fullscreen mode support
- Sidebar: 300px fixed width with visible menu items on dark background
- Stage: Main content area with DataViews tables and action buttons
- Inspector: 380px conditional panel for item details

TypeScript improvements:
- Added explicit action types for Redux store (SetFollowersAction, etc.)
- Created store.d.ts for @wordpress/data module augmentation
- Fixed React JSX transform configuration (react-jsx mode)
- Added missing icon type definitions

Styling:
- Consolidated styles into style-index.css via style.scss entry point
- Added fullscreen body class management with useEffect hook
- Used wpds design tokens for consistency with WordPress Design System
- Proper margin-based spacing between panels
@github-actions github-actions bot added the [Focus] Editor Changes to the ActivityPub experience in the block editor label Oct 30, 2025
@obenland obenland marked this pull request as draft October 30, 2025 02:08
@obenland
Copy link
Member Author

obenland commented Oct 30, 2025

Todos

  • Improve sidebar UI.
  • Add Site Hub.
  • Review mobile layouts.
  • Make strings translatable.

pfefferle and others added 4 commits October 30, 2025 09:17
Changed the sidebar header title from 'ActivityPub' to 'Social Web' and updated menu item labels to use translation functions. This improves localization and better reflects the section's purpose.
- Replace classnames with clsx for better class name handling
- Restructure store into modular files (actions, selectors, reducer, types)
- Replace hardcoded colors with wpds design tokens throughout SCSS
- Move WordPress type declarations to project root /types/
- Create route-specific types.ts files for better organization
- Add ThemedSurface component for consistent styled surfaces
- Refactor Panel component to use ThemedSurface internally
- Simplify design-tokens.scss to use wpds tokens directly

All styling now uses wpds token names with fallback values for consistent theming.
Import style.scss from the JavaScript entry point to bundle all styles
(global styles and component styles) into a single style-index.css file.
This simplifies the build output and ensures fullscreen layout styles are
properly applied.

- Import style.scss in index.tsx to bundle all styles together
- Remove editorStyle from block.json since styles are imported directly
- Remove inline background style from root element
- Clean up debug console.log statements
@obenland obenland marked this pull request as ready for review October 30, 2025 15:14
@obenland
Copy link
Member Author

@pfefferle Looks like your PRs are all based on this branch and this PR is safe to merge?

@pfefferle
Copy link
Member

Feel free to merge it! I am still trying to understand everything ;)

@pfefferle
Copy link
Member

and it seems to break quite some things :(

@obenland obenland merged commit 5c608b2 into add/reader Oct 30, 2025
15 checks passed
@obenland obenland deleted the refactor/social-web-ui-second-pass branch October 30, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] WP Admin [Focus] Editor Changes to the ActivityPub experience in the block editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants