-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Canvas: New basic elements #84205
Canvas: New basic elements #84205
Conversation
❌ Failed to run Playwright plugin e2e tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on these @Develer!
Screen.Recording.2024-03-13.at.9.18.38.AM.mov
I think we need to figure out the question of how we handle these elements styling properties (such as background image / color / border)
With rectangle it is easy as the element fills the entire div making it very straightforward. However with ellipse and now these three added elements it is not clear that the styling should apply to the background of the element vs the element itself
IMO these settings should probably apply to the element themselves vs the background. How we address this might be a little tricky and is dependent on the WIP work here refactoring ellipse's approach to styling options
What I'm not sure about is providing ability to modify both element style and background styles and whether or not we need to update moveable's selection rendering (this might be very tricky, and maybe not necessary given draw.io does a box selection approach regardless of the element)
TLDR; I think we really need to figure out the current WIP of ellipse styling refactor, get to a "good enough" resolution for the time being to unblock this work
cc @lukasztyrala - interested in your thoughts here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
From user's perspective, it will be expected that:
This is something we should address in future iterations. Apart from that, LGTM. |
Yes, that's what I already done in one of the last commits. At least ellipse, triangle, cloud, and parallelogram shapes have their own (not a container's) border and background. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! Did notice an issue with the cloud being cut off with larger border sizes. Also text layout on the triangle can get a little wonky but those can both be left for follow-ups I think 😄
Just an example of what I mean with the cloud:
![Screenshot 2024-03-19 at 11 11 46 AM](https://private-user-images.githubusercontent.com/199847/314147585-d88040d1-7b0d-42f4-855c-b6167f8e543f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxODkwMjUsIm5iZiI6MTcyMjE4ODcyNSwicGF0aCI6Ii8xOTk4NDcvMzE0MTQ3NTg1LWQ4ODA0MGQxLTdiMGQtNDJmNC04NTVjLWI2MTY3ZjhlNTQzZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyOFQxNzQ1MjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jODFkMjBhNGZmNjgzMzVjMjA1Njk0M2ViMzMyNDIxM2I5YzllMWVlODAxMGZiZGM3NmFlOGIxN2MwMmE4NzI4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.74tQa0wPfZdGKG9stFB0ZzSeIT3qqcAPMFFefCFXxlM)
Also, is the next step to add support for custom SVG elements 🤔 😆
…s datalinks gdev dashboard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will work on adding the migration code accounting for ellipse options changes and then I think this is in a "good enough" state to be merged, hopefully we can revisit the known bugs / issues as part of bug cleanup for actual G11 release build 😬
I tried to address an issue I noticed where transparency background color is displayed as all black / is broken for the svg elements but wasn't able to figure out what was going wrong / the difference between color handling between svg elements / rectangle. I suspect it may be related to:
I created this github issue to follow up on this |
I'm going to defer to @Develer to merge this / run through and test things to make sure my changes didn't break anything 😬 I think we have a fair bit to come back to and address as part of polishing this up for main release 😅 |
What is this feature?
This PR implements new canvas elements like triangles, clouds, and parallelograms.
Which issue(s) does this PR fix?:
Fixes #83270 #74903
Special notes for your reviewer:
Please check that:
Screen.Recording.2024-03-18.at.17.57.38.mov
Added new shapes to existing canvas gdev dashboard for testing data links
Added.new.shapes.to.gdev.datalink.test.dashboard.mov