Skip to content

feat: trace_width modified#18

Merged
imrishabh18 merged 3 commits intomainfrom
feat/trace-width
Aug 15, 2024
Merged

feat: trace_width modified#18
imrishabh18 merged 3 commits intomainfrom
feat/trace-width

Conversation

@imrishabh18
Copy link
Copy Markdown
Member

No description provided.

@imrishabh18 imrishabh18 requested a review from seveibar August 15, 2024 19:52
Comment thread lib/index.ts
order: z.number().optional(),
offset: route_hint_point.optional(),
offsets: z.array(route_hint_point).optional(),
traceWidth: z.number().optional(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm intentional? I think this should also be supported, you can do either, both options have different precedence

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I am following the syntax where the traceWidth is added inside of the route. And then the default takes precedence

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so then traceWidth should exist here too right, both options should be supported.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also traceWidth should use the length zod type, that way it can be defined like "0.1mm"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay, we can add the support for this as well. Will make the update for the soup as well

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@imrishabh18 FWIW it's okay for the soup to pre-compute the width of each point on the route. The way to think about this is "props" is ergonomic for users and "soup" is ergonomic for renderers, we don't want the renderer to have to contain the logic to figure out what the width is at each point.

@imrishabh18 imrishabh18 requested a review from seveibar August 15, 2024 20:10
@imrishabh18 imrishabh18 merged commit e748897 into main Aug 15, 2024
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.

3 participants