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

release v4 tracker #6159

Closed
7 of 10 tasks
asturur opened this issue Feb 16, 2020 · 43 comments
Closed
7 of 10 tasks

release v4 tracker #6159

asturur opened this issue Feb 16, 2020 · 43 comments

Comments

@asturur
Copy link
Member

asturur commented Feb 16, 2020

  • Fix the textbox handlers for width, they do not work with scale
  • Update the clipping demo in demos/ to make use of clipPath
  • Try to make work the example with the polygon point editing
  • Write a descriptive documentation of the new api
  • Add example for clone control
  • Make an example with the different kind of positioning ( offsets, withConnection, outof bounding box)
  • Fix positioning of offsetX in controls, is wrong.
  • Verify every control has the right size // this won't be done. Can be a follow up
  • Semplify the control interaction area with a circle.
  • fix issue setControlsVisibility not working properly in 4.0.0-beta7 #6201
@asturur asturur pinned this issue Feb 16, 2020
@asturur asturur changed the title relese v4 tracker release v4 tracker Feb 23, 2020
@onassar
Copy link

onassar commented Feb 29, 2020

Has clipTo been deprecated in 4.0.x?

@asturur
Copy link
Member Author

asturur commented Feb 29, 2020

it was deprecated in 2.0, removed in 4.0

@onassar
Copy link

onassar commented Feb 29, 2020 via email

@asturur
Copy link
Member Author

asturur commented Feb 29, 2020

clipPath property on the object.

clipTo has been deprecated because:

  • required functions to be be serialized/unserialized, with relevant security problems
  • could not exported to svg
  • could not be nested

clipPath on the other hand is sometimes slower and still suffer from blurry edges

@onassar
Copy link

onassar commented Feb 29, 2020

clipPath is slower? Do you have examples of how to use it?

@asturur
Copy link
Member Author

asturur commented Feb 29, 2020

http://fabricjs.com/clippath-part1

Those are the tutorials we have, follow the links there are 4 pages.

@onassar
Copy link

onassar commented Feb 29, 2020

Okay thanks!

@onassar
Copy link

onassar commented Mar 1, 2020

Hi @asturur
I've found a number of SVG parsing bugs in 4.0.0-beta.7. I'd be happy to catalogue them all, but I don't know where to do that (and don't want to annoy you).

  1. What process would you like me to follow for that?
  2. Will 4.0.0 be actively worked on? I'm worried about integrating it into our project whereas 3.6.1 might be more stable.

Thanks!

@asturur
Copy link
Member Author

asturur commented Mar 2, 2020

To catalogue a svg parsing bug:

  • search if is already described in an issue ( it can be super old or closed )
  • if is not, open a new issue.
  • in both cases, old or new issue, find an SVG that trigger the bug and post it in the issue.

Version 4 should be actively worked on, it has a bug on the textbox handlers, a bug on using offsetX on custom controls, and also is missing the scalingFlip behaviour.
Those are the bug i know of,

@onassar
Copy link

onassar commented Mar 2, 2020

Okay. The reason I asked was because the SVG worked fine in the Kitchensink demo, but not with 4.0.0-beta7. I'll create a fiddle to test things, and then open new issues.

@onassar
Copy link

onassar commented Mar 4, 2020

Is there any way to fix the blurriness with clipPath? I'm upgraded to 4.0.0 and the blurriness is quite powerful sometimes.

@asturur
Copy link
Member Author

asturur commented Mar 5, 2020

yes can be fixed of course. is a matter to let the clippath know how much the object is zoomed. ideally is simple, for some reason is harder with nested clippaths

@onassar
Copy link

onassar commented Mar 5, 2020

okay let me know when you have a fix and i'll test it. i use vectors a lot in our app, so i can test this very extensively with all sorts of vectors (sprites, colored, etc)

@arcatdmz
Copy link
Contributor

arcatdmz commented Mar 6, 2020

Regarding #4885 -- now I think it would be great if I can publish the pressure-sensitive brush by the time v4 is released. When would you plan to release it?

@asturur
Copy link
Member Author

asturur commented Mar 17, 2020

fixed the textbox control in v4. with #6219

@danielsfirnaciuc
Copy link

Hi @asturur
I want to ask you if you have still planned for the 4.0 release the image filters to Text objects 😄

@AdamMadrzejewski
Copy link

Would be good to have a breaking changes page from version 3 to version 4.

There was also a recent discussion about clipPath on StackOverflow with some high number of votes. Seems there is a little of confusion about using clipPath as replacement to clipTo.

I've created a SandBox from the original clipTo demo to work on beta-8 version. Anyway I can't get it animated https://codesandbox.io/s/stackoverflow-60664120-fabric-js-400-beta8-mi0y7

@asturur
Copy link
Member Author

asturur commented Mar 21, 2020

the breaking changes are all collected in the changelog for now, and a page could be done.
For 4.0 only the controls are released, we can introduce the filters on objects as soon as 4.0 is done, they would be a new feature and not a breaking change. FIlters for images would continue to work as usual.

@shaktippatel
Copy link

"object:scaling" event not return target object in Version 4.0.0-beta.9

@stale
Copy link

stale bot commented Apr 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Apr 19, 2020
@asturur asturur removed the stale Issue marked as stale by the stale bot label Apr 20, 2020
@asturur
Copy link
Member Author

asturur commented Apr 20, 2020

i think b11 is defintely fixing the control positioning that i wasn't able to make it work in every situation with b8-9-10.

@asturur
Copy link
Member Author

asturur commented Apr 20, 2020

I have still some doubt the interface chosen is the best. The problem is balancing how much code run for each control versus how useful and versatile is the information you get in the positionHanlder to write your own.

One example is padding. Padding is automatically considered by internal fabric code.
If you want to have padding on object and some control that is not influenced by padding ( because for example is positioned over polygon points ) you have to write your own position handler, and that is ok. But at that point all the calculation done by fabricJS are not useful for you, you have to do them from scratch and you will be doing them for each control more than once per control set.

We are talking about very few scripting time, but still i always try to do something that is not too much blunt.
This time i had to choice for working versus i cannot make it to work at all.

@asturur
Copy link
Member Author

asturur commented May 3, 2020

Refixed lockScalingFlip

@bbernhard
Copy link

Hi,

first of all: It's really great to see that much development on fabric.js. I've started using fabric.js with version 1.x and now - a few years later - the major version is already at 4. Awesome work!

The thing that I am most excited about, is the controls API. I've seen this example here and it really looks impressive - can't wait to give that a try. Not sure if this is the right place to ask this question, but: Is it also possible to "build up" a polygon with points? e.g something like that:

polygon_annotation

I've mimicked that behavior with fabric.js v1.x about 3 years ago and while it is still working, I would like to get rid off that code when migrating to v4 as it's hard to maintain and doesn't perform that well with big polygons (I am pretty sure, that's my fault...that was one of the first things I implemented with fabric.js and I am sure i did a lot of rookie mistakes). Is that something the controls API will be capable of or is that out of scope?

@asturur
Copy link
Member Author

asturur commented May 6, 2020

Hi @bbernhard building a polygon with points is something that can be done with a custom brush.
Ideally you build up your polygon with points ( out of scope for the controls api ) and then, as the example you have seen, add a control for each point, that is exactly what the api is for.

@bbernhard
Copy link

Hi @bbernhard building a polygon with points is something that can be done with a custom brush.
Ideally you build up your polygon with points ( out of scope for the controls api ) and then, as the example you have seen, add a control for each point, that is exactly what the api is for.

Many thanks for the reply!

I hope I am not spamming this thread here, but I would have one short question regarding the custom brush: Is it possible to use custom brushes without free drawing? I always assumed that those brushes can only be used in conjunction with free drawing? And I think free drawing is probably not what I want, if I want to build up a polygon point-by-point or am I missing something here? 🤔

@asturur
Copy link
Member Author

asturur commented May 7, 2020

So there is not a nice brush api yet. But is not even that far.
As today drawingMode activate a brush, meaning that mousedown/move/up get routed to the brush code rather than the standard code. mouseup is usually the trigger between currentlyDrawing: true/false.

Now if that would be a decision from the brush, you would have your custom code to write to react to those situations. The difference with a brush is that you do not have to add object to the canvas during the draw process, and that the main canvas does not get refreshed while you draw.

@bbernhard
Copy link

So there is not a nice brush api yet. But is not even that far.
As today drawingMode activate a brush, meaning that mousedown/move/up get routed to the brush code rather than the standard code. mouseup is usually the trigger between currentlyDrawing: true/false.

Now if that would be a decision from the brush, you would have your custom code to write to react to those situations. The difference with a brush is that you do not have to add object to the canvas during the draw process, and that the main canvas does not get refreshed while you draw.

Many thanks - that sounds really promising. Will look into that! :)

@stale
Copy link

stale bot commented May 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label May 22, 2020
@bendadaniel
Copy link

@asturur Hi, I am about to start new project build on fabricjs, I see there is a beta of version 4.0. Should I start building app on 3.6 and migrate to v4 when stable version will be realeased or start on 4 beta immediately? Is it posible do it without v4 docs? What is you advice? Thank you for you amazing work on this library.

@stale stale bot removed the stale Issue marked as stale by the stale bot label May 24, 2020
@asturur
Copy link
Member Author

asturur commented May 24, 2020

I wish you would build on 4.0 beta.
The reason beta is not out is because i did not write full docs, so i did not release to be pushed to write extensive documentation.

The code is in good shape and any 4.0 beta bug would take precedence over anything else.

It also depends what is your project is about.
You need control customization? go with 4.0.
You do not need them and want to play safe? stay on 3.6.3
You do not need them and want to help? go with 4.0

@stale
Copy link

stale bot commented Jun 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jun 7, 2020
@stale stale bot closed this as completed Jun 14, 2020
@melchiar melchiar reopened this Jun 14, 2020
@stale stale bot removed the stale Issue marked as stale by the stale bot label Jun 14, 2020
@asturur
Copy link
Member Author

asturur commented Jun 22, 2020

I started the descriptive API, till now this is what i got.
http://fabricjs.com/controls-api

Going to improve asap and make some interactive demo of different control setup for let people better understand what they can do.

Also i think i m going to change a small interface in the api, instead of declaring a control with position: { x, y } i m adding simply x and y, so the init interface is coherent with the class.

@melchiar
Copy link
Member

looks good @asturur. Just a note though that the new doc page looks like it's missing the bootstrap.css reference :)

@stale
Copy link

stale bot commented Jul 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jul 6, 2020
@bulolo
Copy link

bulolo commented Jul 10, 2020

#6448
textbox controls bug

@stale stale bot removed the stale Issue marked as stale by the stale bot label Jul 10, 2020
@kalnode
Copy link

kalnode commented Jul 16, 2020

My custom control handles...

Works (with Fabric 3.6.1):
https://codepen.io/MarsAndBack/pen/bGExXzd

Fails (with Fabric 4.0.0-rc.1):
https://codepen.io/MarsAndBack/pen/VweEQmN

Are changes coming to this aspect of Fabric?

@asturur
Copy link
Member Author

asturur commented Jul 16, 2020

the custom control function you wrote equal to set cornerStyle = 'circle' in fabricJS version 2.x up. No need to write a function for it.

Fabric 4 breaks any control customization that exists today and offer an API to build them with a stable interface.
So yes, any pre-existing control customization will break 100%.
Fabricjs 3.6.3 control properties and options will continue to work.

@kalnode
Copy link

kalnode commented Jul 16, 2020

Thanks for the prompt response!
I'm specifically trying to customize the stroke thickness for the control handles; this seemed the only way to do that. Moreover I'll be putting in svg icons for some handles in the future. However I'll look into the version 4 stuff soon! thx

@asturur
Copy link
Member Author

asturur commented Jul 17, 2020

There are properties to make the border thicker without the need of overrides, since fabric 1.6.2
http://fabricjs.com/docs/fabric.Object.html#borderScaleFactor
here is described how to add svg icons to controls
http://fabricjs.com/custom-control-render

@stale
Copy link

stale bot commented Jul 31, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jul 31, 2020
@asturur
Copy link
Member Author

asturur commented Aug 6, 2020

go away bot

@stale stale bot removed the stale Issue marked as stale by the stale bot label Aug 6, 2020
@asturur
Copy link
Member Author

asturur commented Aug 6, 2020

Released.
If is not perfect we will fix it.
I have 3-4 exciting things i want to do and i need to get rid of this release to move forward.

@asturur asturur closed this as completed Aug 6, 2020
@asturur asturur unpinned this issue Aug 17, 2020
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

No branches or pull requests