Modernize platform, structure, and UX
CI / build (push) Canceled after 0s

Phase 3:
- Declare PowerPointApi 1.5 and replace template manifest values
- Remove the dead command pipeline and the tracked Babel/polyfill setup
- Extract constants, status/settings contexts, PowerPoint services, and an error boundary
- Build with ES2020 and strict TypeScript; hash production assets and drop prod source maps
- Add Vitest tests, CI, LICENSE, Node 20 pinning, and prune unused dependencies
- Correct the README, user guide, developer guide, and audit notes

Phase 4:
- Add a persisted 16:9/4:3 slide size setting used by all layout tools
- Add dark mode with Office/system theme detection
- Make sections collapsible and move to accessible Fluent controls
- Announce status through aria-live and add semantic status icons
- Add a progress counter with cooperative cancellation and a Stop button
- Update the tracked dependency tree for the pruned packages
This commit is contained in:
schihei committed 2026-11-25 12:01:40 +01:00
1 parent e57258afe9
commit 89989c04e9
6211 files changed
+7028 -274819

No files matched your search

+111 -55
View File
@@ -8,49 +8,59 @@ A productivity toolkit that enhances PowerPoint with specialized formatting and
### Content Tools
- **Match Properties**: Copy visual properties (line style, fill color, text formatting) from the first selected shape to all other selected shapes.
- **Match Sizes**: Resize all selected shapes to match the dimensions of the first selected shape.
- **Match Properties**: Copy visual properties (line style, fill color, text formatting) from the first shape in the selection to all other selected shapes.
- **Match Sizes**: Resize all selected shapes to match the dimensions of the first shape in the selection.
- **Swap Positions**: Swap the position of two selected shapes while maintaining their size and formatting.
- **Insert Titles**: Add slide titles to slides that are missing them.
- **Round Image**: Create circular images by generating an elliptical mask and selecting both shapes for intersection.
- **Insert Titles**: Collect the titles from every slide and insert them into a selected text box to build an agenda or table of contents.
- **Round Image**: Create an elliptical mask over an image. Select both shapes and use **Shape Format → Merge Shapes → Intersect** to finish the crop.
### Slide Enhancement Tools
- **Progress Bar**: Add or remove a visual progress indicator at the bottom of each slide showing the current position in the presentation.
- **Confidential Marking**: Add or remove a "Confidential" label to all slides in the presentation.
- **Progress Bar**: Add a visual progress indicator to every slide (two shapes per slide) showing the current position in the presentation.
- **Confidential Marking**: Add or remove a full-width, bottom-centered "– Confidential –" label on all slides.
- **Draft Watermark**: Add or remove a "DRAFT" watermark on slide masters to mark in-progress presentations.
### Alignment Tools
- **Horizontal Alignment**: Align selected objects to the left, center, or right of the slide.
- **Vertical Alignment**: Align selected objects to the top, middle, or bottom of the slide.
- **Horizontal Alignment**: Align selected objects to the left edge, center, or right edge of the slide.
- **Vertical Alignment**: Align selected objects to the top edge, middle, or bottom edge of the slide.
### Grid & Guidelines Tools
- **Custom Grid**: Create a customizable grid with adjustable spacing, opacity, and color.
- **Custom Grid**: Create a grid on the current slide with adjustable spacing, opacity, and color.
- **Guidelines**: Add horizontal or vertical guidelines at specific positions with customizable colors.
> Grids and guidelines are ordinary slide shapes. They are included in slideshow, print, and export output. Remove them before presenting.
### Settings
- **Slide size**: Select Widescreen (16:9) or Standard (4:3). The setting is stored with the presentation and is used by alignment, grid, progress bar, title, and marking tools.
## Requirements
The add-in uses the PowerPoint JavaScript API **1.5** (selection APIs, shape fill/line/text formatting). Supported hosts include Microsoft 365 PowerPoint on Windows/Mac, PowerPoint on the web, and PowerPoint 2019 or later on Mac.
## Installation
### For End Users
1. Download the latest release from the [Releases](https://github.com/your-org/edison-powerpoint-addin/releases) page.
2. Follow the installation instructions provided with the download.
1. Download the latest release from the [Releases](https://gitea.h3132.de/Edison/powerpoint-toolbox/releases) page.
2. Sideload the add-in by following the included instructions.
3. Open PowerPoint and find the Edison add-in in the ribbon.
### For Developers
To set up the development environment:
Prerequisites: Node.js 20 LTS or newer and npm.
1. Clone the repository:
```
git clone https://github.com/your-org/edison-powerpoint-addin.git
cd edison-powerpoint-addin
git clone https://gitea.h3132.de/Edison/powerpoint-toolbox.git
cd powerpoint-toolbox
```
2. Install dependencies:
```
npm install
npm ci
```
3. Build the project:
@@ -58,7 +68,7 @@ To set up the development environment:
npm run build
```
4. Start the development server:
4. Start the development server and sideload the add-in:
```
npm run start
```
@@ -67,98 +77,144 @@ To set up the development environment:
### Project Structure
- `/src/taskpane/components/` - React components for each tool
- `/src/commands/` - Command handlers for add-in functionality
- `/assets/` - Images and icons
```
src/taskpane/
├── components/ # React components and reusable UI
│ ├── App.tsx # Root layout, status, settings UI
│ ├── ActionButton.tsx # Button with processing/error handling
│ ├── ConfirmButton.tsx # Button with a confirmation dialog
│ ├── ErrorBoundary.tsx # Render error fallback
│ ├── Section.tsx # Collapsible section grouping
│ └── <tool>.tsx # One component per tool
├── context/ # StatusContext, SettingsContext
├── services/ # Batched PowerPoint operations, cancellation
├── types/ # Office.js type helpers and globals
├── constants.ts # Slide presets and shape name constants
├── Root.tsx # Theme, settings, and error boundary providers
├── index.tsx # Entry point
└── taskpane.html
assets/ # Images and icons
docs/ # Developer and user documentation
manifest.xml # Add-in manifest
```
### Key Development Commands
- `npm run build` - Build the project for production
- `npm run build:dev` - Build with development settings
- `npm run dev-server` - Start the development server
- `npm run lint` - Check code quality
- `npm run lint:fix` - Fix linting issues
- `npm run start` - Start the add-in in PowerPoint
- `npm run stop` - Stop the running add-in
- `npm run lint` - Check code quality
- `npm run typecheck` - Run TypeScript without emitting files
- `npm test` - Run unit tests with Vitest
- `npm run validate` - Validate the manifest file
### Creating New Tools
To add a new tool to the add-in:
1. Create a new component in `/src/taskpane/components/`
2. Follow the pattern of existing components, using the Office.js API for PowerPoint
3. Import and add your component to `App.tsx`
4. Update this documentation to include your new tool
1. Create a component in `src/taskpane/components/`.
2. Use `useStatusContext()` from `../context/StatusContext` for status and processing state.
3. Use `useSettings()` from `../context/SettingsContext` when a tool depends on slide dimensions.
4. Keep PowerPoint operations in a service in `src/taskpane/services/` when they are reused or batch-heavy.
5. Add the component to `App.tsx` inside a `Section`.
6. Add tests for pure logic (title ranking, grid math, parsing).
7. Update this documentation.
## User Guide
### Getting Started
1. Open PowerPoint and navigate to the "Home" tab
2. Click on the "Edison Pane" button to open the add-in taskpane
3. The taskpane displays all available tools organized by category
1. Open PowerPoint and navigate to the **Home** tab.
2. Click **Edison Pane** to open the task pane.
3. Expand a section to access its tools.
### Using Content Tools
#### Match Properties
1. Select multiple shapes (the first shape is the source)
2. Click "Match Properties" in the Edison pane
3. All selected shapes will adopt the properties of the first selected shape
1. Select multiple shapes. The first shape in the selection (z-order) is the source.
2. Click **Match Properties**.
3. All selected shapes adopt the source's line, fill, and text formatting where supported.
#### Match Sizes
1. Select multiple shapes (the first shape is the source)
2. Click "Match Sizes" in the Edison pane
3. All selected shapes will be resized to match the first selected shape
1. Select multiple shapes.
2. Click **Match Sizes**.
3. All selected shapes are resized to the source's width and height.
#### Swap Positions
1. Select exactly two shapes
2. Click "Swap Positions" in the Edison pane
3. The shapes will exchange positions while maintaining their size and formatting
1. Select exactly two shapes.
2. Click **Swap Positions**.
3. The shapes exchange positions while keeping their size and formatting.
#### Insert Titles
1. Click "Insert Titles" in the Edison pane
2. Slides without titles will have a title placeholder added
1. Select the text box that should receive the agenda.
2. Choose a title detection method and whether to include slide numbers.
3. Click **Insert Titles** and confirm.
4. The selected text box content is replaced with the collected titles.
#### Round Image
1. Select an image
2. Click "Round Image" in the Edison pane
3. The image will be cropped to a circular shape
1. Select an image.
2. Click **Round Image**.
3. An elliptical mask is created and both shapes are selected.
4. In PowerPoint choose **Shape Format → Merge Shapes → Intersect**.
### Using Slide Enhancement Tools
#### Progress Bar
1. Click "Add Progress Bar" to add a progress indicator to all slides
2. Click "Remove Progress Bar" to remove the progress indicators
1. Click **Add** to add a progress indicator to every slide.
2. Click **Remove** (with confirmation) to remove all progress indicators.
3. Adding again replaces existing bars instead of duplicating them.
#### Confidential Marking
1. Click "Add Confidential" to add the confidential label to all slides
2. Click "Remove Confidential" to remove all confidential labels
1. Click **Add** to add a full-width, bottom-centered confidential label to every slide.
2. Click **Remove** (with confirmation) to remove the labels.
#### Draft Watermark
1. Click "Add Draft" to add a DRAFT watermark to the slide masters
2. Click "Remove Draft" to remove all DRAFT watermarks
1. Click **Add** to add a DRAFT watermark to every slide master.
2. Click **Remove** (with confirmation) to remove the watermarks.
### Using Alignment Tools
1. Select one or more shapes
2. Click on the desired alignment button (Left, Center, Right, Top, Middle, Bottom)
3. All selected shapes will be aligned accordingly
1. Select one or more shapes.
2. Click the desired alignment button.
3. Shapes are aligned to the slide edges or center using the slide size from **Settings**.
### Grid & Guidelines
#### Custom Grid
1. Navigate to the slide where the grid should appear.
2. Set spacing (minimum 4 pt), opacity (0–100), and color.
3. Click **Add** to create the grid. Click **Remove** to delete it.
4. The grid is a set of shapes on the current slide and appears in slideshow/export output.
#### Guidelines
1. Set the position, orientation, and color.
2. Click **Add** to create a guideline.
3. Click **Remove** to delete all guidelines on the current slide.
## Tips
- **Selection order**: For Match Properties and Match Sizes, the source is the first shape in PowerPoint's selection/z-order, which is not guaranteed to be the shape you clicked first. Verify the source shape before applying.
- **Slide size**: Set the correct slide size before using alignment, grid, progress bar, or marking tools.
- **Long operations**: A progress counter and **Stop** button appear for large presentations.
- **Destructive actions**: Removals and Insert Titles ask for confirmation.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Version History
- v1.2.0 - Batched operations, confirmations, cancellation/progress, slide size setting, dark mode, accessibility, tests, and CI
- v1.1.0 - Performance improvements, code quality, and UI enhancements
- v1.0.0 - First stable release
- v0.1.0 - Initial release with core functionality
- v0.1.0 - Initial release with core functionality