Skip to content

Add support for rounded rectangles in Masters#1460

Open
benjaminclot wants to merge 1 commit into
gitbrent:masterfrom
benjaminclot:master
Open

Add support for rounded rectangles in Masters#1460
benjaminclot wants to merge 1 commit into
gitbrent:masterfrom
benjaminclot:master

Conversation

@benjaminclot
Copy link
Copy Markdown

Change Summary

Support for rounded rectangles in Masters.

Change Description

  • Added 'roundRect' to the MASTER_OBJECTS enum in src/core-enums.ts, enabling recognition of the new master object type.
  • Updated the createSlideMaster function in src/gen-objects.ts to handle roundRect by calling addShapeDefinition with SHAPE_TYPE.ROUNDED_RECTANGLE.

Change Type

  • Bug fix
  • New feature
  • Documentation update

Motivation and Context

Adding rounded rectangles simply by adding a rectRadius on a standard rect in a Master doesn't work.

Copilot AI review requested due to automatic review settings May 18, 2026 13:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds runtime recognition for rounded-rectangle objects in slide masters so master definitions can create roundRect shapes.

Changes:

  • Adds roundRect to the MASTER_OBJECTS enum.
  • Handles roundRect in createSlideMaster via SHAPE_TYPE.ROUNDED_RECTANGLE.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/core-enums.ts Extends recognized master object keys with roundRect.
src/gen-objects.ts Adds slide-master object handling for rounded rectangles.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/gen-objects.ts
else if (MASTER_OBJECTS[key] && key === 'image') addImageDefinition(tgt, object[key])
else if (MASTER_OBJECTS[key] && key === 'line') addShapeDefinition(tgt, SHAPE_TYPE.LINE, object[key])
else if (MASTER_OBJECTS[key] && key === 'rect') addShapeDefinition(tgt, SHAPE_TYPE.RECTANGLE, object[key])
else if (MASTER_OBJECTS[key] && key === 'roundRect') addShapeDefinition(tgt, SHAPE_TYPE.ROUNDED_RECTANGLE, object[key])
Comment thread src/gen-objects.ts
else if (MASTER_OBJECTS[key] && key === 'image') addImageDefinition(tgt, object[key])
else if (MASTER_OBJECTS[key] && key === 'line') addShapeDefinition(tgt, SHAPE_TYPE.LINE, object[key])
else if (MASTER_OBJECTS[key] && key === 'rect') addShapeDefinition(tgt, SHAPE_TYPE.RECTANGLE, object[key])
else if (MASTER_OBJECTS[key] && key === 'roundRect') addShapeDefinition(tgt, SHAPE_TYPE.ROUNDED_RECTANGLE, object[key])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants