nilbuild / nilbuild/driver.js

Feature Request: add prop for sharp edges in generateStageSvgPathString function

Open
#570 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
26.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hey team,

I have a suggestion for the generateStageSvgPathString function. It would be great if we could add a prop to the StageDefinition interface to allow sharp edges for the highlight box. Right now, it only supports rounded edges with stageRadius.

Proposed Change:

Add a sharpEdges prop to StageDefinition. If sharpEdges is true, the function should generate sharp edges instead of rounded ones.

Example:

const stageDefinition: StageDefinition = {
  x: 100,
  y: 100,
  width: 200,
  height: 200,
  sharpEdges: true, 
};

const pathString = generateStageSvgPathString(stageDefinition);

This would give more flexibility in how the highlight box looks. Let me know if this is something you'd consider. Happy to help with a pull request if needed.

Thanks!

Best,
Aga

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the TypeScript definitions for StageDefinition and the implementation of generateStageSvgPathString. Trace how stageRadius currently shapes the highlight box, then verify that a StageDefinition with sharpEdges: true produces sharp corners while existing rounded-edge behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.