- Add a header, a shared accordion, a docked status region, and token-based styles - Use the blue primary style for every action button and collapse all sections by default - Improve labels, selection hints, destructive confirmations, grid semantics, and narrow-pane layout - Add docs/UI_GUIDELINES.md and update the README, user guide, and developer guide
231 lines
8.7 KiB
Markdown
231 lines
8.7 KiB
Markdown
# Edison PowerPoint Add-in
|
||
|
||
A productivity toolkit that enhances PowerPoint with specialized formatting and content tools for creating professional presentations.
|
||
|
||

|
||
|
||
The add-in opens as a task pane with a header, collapsible tool sections, and a
|
||
status bar docked at the bottom for progress and results. All sections start
|
||
collapsed; click a section title to expand it.
|
||
|
||
## Features
|
||
|
||
### Content Tools
|
||
|
||
- **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**: 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 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 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 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://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
|
||
|
||
Prerequisites: Node.js 20 LTS or newer and npm.
|
||
|
||
1. Clone the repository:
|
||
```
|
||
git clone https://gitea.h3132.de/Edison/powerpoint-toolbox.git
|
||
cd powerpoint-toolbox
|
||
```
|
||
|
||
2. Install dependencies:
|
||
```
|
||
npm ci
|
||
```
|
||
|
||
3. Build the project:
|
||
```
|
||
npm run build
|
||
```
|
||
|
||
4. Start the development server and sideload the add-in:
|
||
```
|
||
npm run start
|
||
```
|
||
|
||
## Development Guide
|
||
|
||
### Project Structure
|
||
|
||
```
|
||
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 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
|
||
|
||
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 **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 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.
|
||
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**.
|
||
3. The shapes exchange positions while keeping their size and formatting.
|
||
|
||
#### Insert Titles
|
||
|
||
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**.
|
||
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** 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** 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** 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 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 grid** to create the grid. Click **Remove grid** 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 guide** to create a guideline.
|
||
3. Click **Remove guides** 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.
|
||
|
||
## Documentation
|
||
|
||
- [User Guide](docs/USER_GUIDE.md)
|
||
- [Developer Guide](docs/DEVELOPERS.md)
|
||
- [UI Guidelines](docs/UI_GUIDELINES.md)
|
||
|
||
## License
|
||
|
||
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
|