From 1aeef10ebe30ae86ef71a59148e3e1ef5ad7b793 Mon Sep 17 00:00:00 2001 From: Heiko Joerg Schick Date: Sat, 22 Mar 2025 19:53:09 +0100 Subject: [PATCH] Standardize documentation across all *.tsx files - Add file-level JSDoc comments to components that were missing them - Ensure consistent documentation format across all components - Improve code maintainability and readability --- src/taskpane/components/App.tsx | 7 +++++++ src/taskpane/components/InsertTitles.tsx | 7 +++++++ src/taskpane/components/MatchProperties.tsx | 7 +++++++ src/taskpane/components/MatchSizes.tsx | 7 +++++++ src/taskpane/components/ProgressBarButtons.tsx | 7 +++++++ src/taskpane/components/RoundImage.tsx | 7 +++++++ src/taskpane/components/SwapPositions.tsx | 7 +++++++ 7 files changed, 49 insertions(+) diff --git a/src/taskpane/components/App.tsx b/src/taskpane/components/App.tsx index eb6b7fbd..c5013076 100644 --- a/src/taskpane/components/App.tsx +++ b/src/taskpane/components/App.tsx @@ -1,3 +1,10 @@ +/** + * @file App.tsx + * @description Main application component for the PowerPoint toolbox add-in. + * This component serves as the container for all tool components and provides + * a context for status messages and processing state that can be used by child components. + */ + import * as React from "react"; import { useEffect, useState } from "react"; import MatchSizes from "./MatchSizes"; diff --git a/src/taskpane/components/InsertTitles.tsx b/src/taskpane/components/InsertTitles.tsx index 69d9eaa7..dd507714 100644 --- a/src/taskpane/components/InsertTitles.tsx +++ b/src/taskpane/components/InsertTitles.tsx @@ -1,3 +1,10 @@ +/** + * @file InsertTitles.tsx + * @description Component that provides functionality to collect and insert slide titles + * from all slides in a PowerPoint presentation into a selected text box. This allows users + * to quickly generate a table of contents or agenda slide with all presentation titles. + */ + import * as React from "react"; import { TextBulletListRegular } from "@fluentui/react-icons"; import { useStatusContext } from "./App"; diff --git a/src/taskpane/components/MatchProperties.tsx b/src/taskpane/components/MatchProperties.tsx index 72b53f7b..87639a84 100644 --- a/src/taskpane/components/MatchProperties.tsx +++ b/src/taskpane/components/MatchProperties.tsx @@ -1,3 +1,10 @@ +/** + * @file MatchProperties.tsx + * @description Component that provides functionality to match visual properties between shapes + * in PowerPoint presentations. This allows users to copy line, fill, and text properties from + * one shape to multiple other shapes, ensuring consistent styling across elements. + */ + import * as React from "react"; import { ColorRegular } from "@fluentui/react-icons"; import { useStatusContext } from "./App"; diff --git a/src/taskpane/components/MatchSizes.tsx b/src/taskpane/components/MatchSizes.tsx index 15cd326c..32ce46bb 100644 --- a/src/taskpane/components/MatchSizes.tsx +++ b/src/taskpane/components/MatchSizes.tsx @@ -1,3 +1,10 @@ +/** + * @file MatchSizes.tsx + * @description Component that provides functionality to match dimensions between shapes + * in PowerPoint presentations. This allows users to make multiple shapes the same width, + * height, or both dimensions, based on the first selected shape. + */ + import * as React from "react"; import { ArrowFitInRegular, ArrowMaximizeRegular, ArrowMinimizeRegular } from "@fluentui/react-icons"; import { useStatusContext } from "./App"; diff --git a/src/taskpane/components/ProgressBarButtons.tsx b/src/taskpane/components/ProgressBarButtons.tsx index ff2ad3c3..d9480be2 100644 --- a/src/taskpane/components/ProgressBarButtons.tsx +++ b/src/taskpane/components/ProgressBarButtons.tsx @@ -1,3 +1,10 @@ +/** + * @file ProgressBarButtons.tsx + * @description Component that provides functionality to add and remove progress bars + * on PowerPoint slides. The progress bars visually indicate the current position within + * the presentation, with colored segments showing completed and upcoming slides. + */ + import * as React from "react"; import { Button, diff --git a/src/taskpane/components/RoundImage.tsx b/src/taskpane/components/RoundImage.tsx index 2dff9958..9652aaab 100644 --- a/src/taskpane/components/RoundImage.tsx +++ b/src/taskpane/components/RoundImage.tsx @@ -1,3 +1,10 @@ +/** + * @file RoundImage.tsx + * @description Component that provides functionality to create circular or rounded images + * in PowerPoint presentations. This tool creates a mask shape that can be used with + * PowerPoint's built-in shape intersection feature to crop images into a circular shape. + */ + import * as React from "react"; import { CircleRegular } from "@fluentui/react-icons"; import { useStatusContext } from "./App"; diff --git a/src/taskpane/components/SwapPositions.tsx b/src/taskpane/components/SwapPositions.tsx index d5c5f52e..7261a551 100644 --- a/src/taskpane/components/SwapPositions.tsx +++ b/src/taskpane/components/SwapPositions.tsx @@ -1,3 +1,10 @@ +/** + * @file SwapPositions.tsx + * @description Component that provides functionality to swap the positions of two selected shapes + * in PowerPoint presentations. This allows users to quickly exchange the locations of two objects + * while maintaining their individual properties and content. + */ + import * as React from "react"; import { ArrowSwapRegular } from "@fluentui/react-icons"; import { useStatusContext } from "./App";