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

Async Dart CSS handling - feature request #8689

Closed
DartBot opened this issue Feb 21, 2013 · 7 comments
Closed

Async Dart CSS handling - feature request #8689

DartBot opened this issue Feb 21, 2013 · 7 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Feb 21, 2013

This issue was originally filed by fra...@igindo.com


--FEATURE REQUEST--

Currently, CSS style changes are processed immediately after you set a style property on an Element.
This causes a browser reflow event, depending on how the browser vendor deals with it behind the scenes.

Chrome for example will bundle individual style changes in the background to minimize reflow, other vendors however have less optimized reflow handlers, causing multiple async style changes in our code to trigger unnecessary reflows.

What steps will reproduce the problem?
n/a, CssStyleDeclaration behaviour in general

What is the expected output? What do you see instead?
It would be nice to have if Dart would bundle CSS style changes in the background as well, similar to Chrome's batch handling of style changes and reflow triggers.

Perhaps you could enhance the API?
// M3's style interaction
element.style.foo = 'bar';
// suggestion, existing next to the above syntax
// the > operand would indicate that you want to include this css change with the next update batch
element.style.foo > 'bar';
// Having a Future in return which indicates when your batch, with the css change, has been processed, would be great as well

=> Future futureCssUpdate = element.setStyleAsync('foo', 'bar');

Eventually, one would be able to trigger n-amount of style changes :

element.setStyleAsync('foo', 'bar');
element.setStyleAsync('another foo', 'another bar');
element.setStyleAsync('more foo', 'more bar');
... etc ...

all async, applied to one batch, and trigger a minimal reflow on the next batch iteration.

What version of the product are you using? On what operating system?
M3, win7

Please provide any additional information below.

@anders-sandholm
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-HTML, Triaged labels.

@blois
Copy link
Contributor

blois commented Mar 13, 2013

Added this to the Later milestone.

@efortuna
Copy link
Contributor

efortuna commented Oct 3, 2013

Added html-api label.

@blois
Copy link
Contributor

blois commented Oct 3, 2013

Removed html-api label.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants