Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toSvg method to Geometry2d for SVG rendering #3676

Closed
wants to merge 1 commit into from

Conversation

steveruizok
Copy link
Collaborator

@steveruizok steveruizok commented May 1, 2024

Related to #3080

This pull request introduces an abstract method toSvg to the Geometry2d class and its derived classes, enabling the rendering of geometric shapes with customizable SVG properties.

  • Adds an abstract method toSvg to the Geometry2d class, allowing for SVG rendering with customizable SVGProps.
  • Implements the toSvg method in derived classes such as Arc2d, Circle2d, Rectangle2d, Polygon2d, Ellipse2d, Stadium2d, and Edge2d, ensuring each geometry type can be rendered as SVG.
  • Ensures attributes like large-arc-flag and sweep-flag are saved internally within the Arc2d class to facilitate SVG rendering, aligning with the proposed changes for improved SVG element attribute handling.

For more details, open the Copilot Workspace session.

Copy link

vercel bot commented May 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
examples ❌ Failed (Inspect) May 1, 2024 8:58pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
tldraw-docs ⬜️ Ignored (Inspect) Visit Preview May 1, 2024 8:58pm

@steveruizok
Copy link
Collaborator Author

This PR was written by Github's new Workspace Copilot, an AI product in technical preview. Let's not land this but interesting to look at.

@colebemis
Copy link

colebemis commented May 1, 2024

👋 Hi @steveruizok, I'm one of the folks working on Copilot Workspace. I'm so happy to see you trying it out.

How was your experience? What could have been better?

@steveruizok
Copy link
Collaborator Author

Hey Cole (feather icons fan since forever). I want to play a bit more before giving notes, but top level impressions are:

  • it's great how many opportunities I had to correct it up front. That kind of prompt generation (ie "hey this is what I think the job is, before I start is that right?") is really good
  • I feel like it would be better for those cliche "engineer stories" rather than end user stories or abstract feature ideas, ie "as an engineer I want to rename this method" or "as a developer I want to wrap this third party library with our own interface" rather than "as a user I want a way to update my invoicing email address"
  • surprisingly fast
  • I want to use it for tests
  • I wasn't able to say "there are folders for examples, each folder contains x y z file, I want a new example for this part of my API"; I would have had to ask for each file individually? Not sure how to make that a good UX because it's a lot of slog work, except by better interface

@colebemis
Copy link

This is super valuable feedback. Thank you, @steveruizok ❤️ Feel free to reach out with any more feedback!

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.

None yet

2 participants