Git Product home page Git Product logo

toolkit's People

Contributors

arneg avatar boomshop avatar m1us avatar mattcph avatar tobij avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toolkit's Issues

replace TK.destroy() by node.remove()

The DOM standard defines the node.remove() method, which currently does exactly what TK.destroy() does. It is currently not implemented in IE, but can be replaced by a polyfill. node.remove() is semantically much clearer than TK.destroy().

Clock labeling API

I propose a new API for formatting click entries. Instead of passing all individual Date entries, simply pass just the date object itself.

new API for outer_height et. al.

outer_height and the other similar functions currently exist in two variants. One variant simply calculates the effective dimensions, while the second variants tries to update the style properties in order to set the effective dimensions. Both variants force a relayout, which is not necessary (but can be fixed). Furthermore, the set-variant forces a style recalculation and it would be nice to somehow seperate that step (e.g. by optionally passing the computed style of the element).

Pager DOM does not scale

The current pager implementation, which uses one huge div, which is moved scrolled from one page to the other does harm rendering performance severely. Hiding the pages using visibility:hidden does not help.

Pager: animation flickering and hidden state problems

this is two issues:

  • the default animation may lead to flickering, because after the animation is done, pages go back their initial state briefly
  • sometimes pages stick around (this is triggered by some kind of unfortunate timing when changing pages)

'snap' option in Ranged

The documentation of the 'snap' option is confusing (to me). It also does not seem to mention all the possible options (e.g. array of values). Lets make is clearer and possibly simplify the API. Less options is often better.

Pager autosizing

The Pager autosized itself and all contained pages on initialization and resize. This is maybe unavoidable, but could certainly also be done in CSS when doing the layout.

Tooltip keep_inside feature

The tooltip keep_inside feature calculates the tooltip width in order to make sure it does not extend across the window boundary. This happens (potentially) on every mousemove event and is very expensive.

Make all internal methods private functions

Many widgets contain private drawing functions or event callbacks. They are usually prefixed by an underscore. Make them all "private" methods be moving them into the outer function scope. This is purely a cosmetic change, but can improve inlining.

'snap' feature and user input

The snap feature currently leads to many subtle bugs in combination with user input. For instance: scrolling happens in pixel values, which are then transformed into the value coordinates, then the value is updated and snapped. Depending on the settings of 'snap' the value might or might not change.

Select set_size

The Select widgets sets its width property to the maximum width of any child entry. This requires calculating their outer_width and forces a relayout.

sprintf vs FORMAT

FORMAT is nice for reusing the same format string. However, it is rather slow when used only once. Write a new sprintf

Event handler leaking

There is many places which leak event handlers. One prominent example is Widget class itself, which does not clean up its event handlers on destroy().

LevelMeter __margin

During initial render, the Levelmeter calculates its __margin. Probably unavoidable.

ButtonArray next/prev arrow placement

The buttonarray has to calculate its own size and the size of all buttons in order to decide whether or not the next/prev buttons should be displayed. Probably unavoidable and also only happens once on initializiation now, which is not so bad.

Using innerHTML

There are many widgets which allow setting html content using innerHTML. Examples are all sorts of labels. This has several disadvantages:

  1. generally performance sucks a bit, because the browser has to parse this as html (which it is usually not)
  2. it makes it impossible to set text, which is invalid html, for instance something which contains safe chars like '<', etc.

Solution: Allow either setting text content or DOM nodes directly. That way setting 'HTML' content has to be done explicitly.

Knob: inconsistent use of options.container

Knob itself extends Circular and sets options.container to an internal svg during initialize. This breaks options.container to work correctly, for instance it is not possible to set after widget creation. I don't really see a reason for this, it also make the initialization difficult. Maybe it would be easier to not Extend Circular, but instead have a circular instance locally similarly to the clock widget.

Circular draw_labels()

This function is already optimized to trigger only one relayout (by getBBox()). Can this be improved further?

Grid draw_lines()

Grid draw_lines() calculates the size of labels in order to place lines correctly. Could this be removed, for instance by hiding the grid behind labels some other way?

Levelmeter: clip/peak/label handling

clip, peak and label are currently set from within the redraw() method. This logic is currently slightly broken and the information could also be out of date, because the age of the data is not taken into account.

Chart draw_title()

Chart draw_title() calculates the title bounding box to improve placement. This forces one relayout, can it be removed?

Scale expensive label positioning

Scale calculates the size of every label in order to

  • align them correctly to the scale dots
  • to make sure the Scale itself is wide/high enough for all labels to fit in

Responsehandler draw delay breaks on Chromium

Chromium recently changed how timer events work in the presence of input events. Essentially, timer events are delayed indefinitely, when there are inputs events firing at the same time. This prevents the delayed draw from happening until the handle is released in the worst case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.