Comments (13)
Nice conversation!
from bloc.
Since one of the first versions of Bloc it is forbidden to copy visual elements.
Unfortunately, #copy and #deepCopy methods got lost at some point.
I restored them with a method comment in #copy that describes that decision :)
Thanks for the reminding! 👍
from bloc.
from bloc.
It will not :)
We don't see a point in #duplicate for a real world apps. How often do users duplicate UI elements?
Supporting copying in all widgets and visualisations is somehow too much for a fancy demo-only feature.
I am looking forward to learn arguments why #duplicate is so important 😉
from bloc.
Talking about halos. We are not sure if they will exist in their current form.
from bloc.
As a developer, I see use in #duplicate. It provides an excellent direct way of building applications. For end users it definitely makes sense to be able to clone visual representations of actions. I understand that it is difficult to get the context-dependent semantics right
from bloc.
Aha, interesting input, @StephanEggermont 👍 Thanks!
Here is what I wrote as method comment in #copy:
"Visual elements can not be copied.
The reason for that is unpredictable amount of conflicting copying behaviours.
For example, what should happen if a copied element is added to the parent?
Should we create a new element without the parent or add a copied one to the parent of
the original element? What should we do with View Models? How to deal with event handlers? ...
Thus, we decided that the most consistent behaviour is to forbid all kind of copying
and let users instantiate elements by themselves in the way they want it"
The problem with copy is that it is difficult to maintain it... Let's come back to it later when there is nothing else to do 😉
from bloc.
from bloc.
from bloc.
@dionisiydk I see. So the use case is prototyping. Very interesting 🤔
We will need to think if #copy fits there. I like the final goal!
Does it mean that if I will call #copy on element I will got error?
Yes, self shouldNotImplement
from bloc.
from bloc.
from bloc.
Currently, we see the issue of copying elements as being tightly related to the one of serializing elements. Thus, we will come back to this after we figure out the larger problem. In the meantime, we close the issue.
from bloc.
Related Issues (20)
- Fix BlEventTest
- Event handling doesn't support AnnouncementSet HOT 1
- Calling text: method to change text of a BlTextElement reset its attributes (here text color paint and fontSize)
- Enable BlErrorHandlingExamplesTest HOT 1
- Possible bug on border with linear gradient paint and outskirts centered or outside HOT 2
- Window control for minimize, maximize, close hidden on windows HOT 1
- border and background filling
- BlSpace>>fullscreen: doesn't work at initialization
- Remove references to brick
- CI randomly fails in BATextMeasurerTest>>testIndexAtBetweenAllCharactersInRealPointWithDot
- Border line join round does not work with BlAnnulusSector HOT 2
- Progress bar geometry HOT 4
- bug on background opacity equality
- Rotate Animation isn't centered HOT 4
- SVG: radial gradient doesn't work HOT 1
- SVG: polyline doesn't work
- SVG: BlSvgGroupLayout isn't actually used
- Rewrite SVG parser avoiding creation of intermediate XML nodes? (being more SAX2-like) HOT 1
- SVG: Improve current smoke tests
- SVG: some of the Ant design icons are totally blank HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bloc.