Git Product home page Git Product logo

spell's Introduction

spell's People

Contributors

chbrown avatar

Watchers

James Cloos avatar

spell's Issues

Persist input position (caret) when typing uppercase letters

Not sure exactly why updating an input's value resets the cursor / insert position to the end — maybe it's the autofocus attribute? — but it's mildly disconcerting.

This doesn't come up as long as the user only types lowercase, because the Preact diffing algorithm detects no change and thus doesn't update the DOM, so it's not a huge problem.

Split up JS bundle

main.js (minified) is currently 2.3 MB (286 KB gzip'ed). Only 18 KB (7 KB gzip'ed) of that is functional code; the other 99% is dictionary data, which is represented as a trie, encoded as JSON.

There are many optimizations that could reduce the bundle size, like preprocessing identical branches in the trie to refer to the same object (this might reduce browser memory consumption, too?) or other alternatives to JSON.

Even with such speedups, the dictionary will always be a massive part, and on slow connections it would be better UX to load basic vocabulary first, synchronously, and then the less useful (≈ less used) remainder later, asynchronously. Merging two tries won't be trivial, but I doubt it'd be enough to interrupt UI responsiveness.

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.