While debugging some issues with lost of formatting in mobile editors I started researching about how to control input methods in mobile devices: we can control how the user gets corrected for words, autocorrection and spellchecking.
This feature is often desirable, however it causes content-loss in a rich text editor environment.
Continue reading Autocorrect, autocapitalize and autocorrect in contenteditable
When we work with text editors we need to listen to every single event happening at the keyboard level and then act accordingly. For example after typing a space we might need to transform a link-like text into an actual link.
While this feature has been working fine in all the devices, our QA team has found an issue with this component, and digging into the code I found how the space is not being recognized correctly as a space.
Continue reading Android Webview – The space event is not firing as expected
Testing your work on IE: hurting your sentiments.
You did the test in all the browsers available on your machine, maybe even a recent IE, such as IE11 or IE10 and everything is working like a charm, but the company you work for still have customer using IE8 or even worst IE7. So it’s time to test your work on those old platforms.
This is not the easiest of the tasks, for two main resasons:
- Old Internet Explorer are everything but standard compilant browsers.
- Your machine doesn’t have IE at all (Linux and Mac users), or you have IE 10 or 11 installed.
Continue reading Testing your local website in Internet Explorer from Mac, Linux or Windows
So you want to become a super fast reader in seconds, right? Good. I have the right tool for you. It is SquirtJS.
I stumbled upon this project just few months ago. I am been immediately impressed by it, I could read an English web page at a peace of about 400 words per minute, while I for my mother tongue I could reach around 600 wpm.
What is the secret of squirt.io? Simple: rather than moving your eyes while reading, squirt allow you to fix your sight in a position of the page, and it will change the words one by one, at the peace you specify.
After few months of usage, I can tell that this is a great product. It is available as chrome extension as well as a JS bookmark.
Only downside it is that some websites don’t work well with it.
I really like the inline form validation pattern: as the user finishes typing the validation on that input is immediately performed. This improve the user experience, by:
- a 22% increase in success rates,
- a 22% decrease in errors made,
- a 31% increase in satisfaction rating,
- a 42% decrease in completion times, and
- a 47% decrease in the number of eye fixations. (source alistapart.)
Continue reading Showing errors after the user finishes typing with angularjs
I am relatively new to AngularJS, but I don’t miss occasion to be surprised by the simplicity of this spectacular framework.
First of all we define a service which contains the functionality we need. In this case is a “Welcome panel”, where it’s visibility can be managed from different points.
Continue reading Same functionality, same UI, but different controller in AngularJS
In AngularJS if we want to share informations across multiple controllers we should use factories.
I needed to change the page titles from multiple locations, so I made use of an extremely simple factory. We are going to use a local variable, named
title which contains the title, and two exposed methods:
title, which is going to be in charge of returning the title, and
setTitle which we’ll call from the controllers to change the title page.
Continue reading Setting Page titles with AngularJS
The page visibility api allows developers and designers to
control when the user is actually on the page, and when the user is away, for example the tab is
opened but not in focus, or the browser is minimized.
The first use I did of this api is to interrupt server side refreshes of the data, while the user is
not on the page, to avoid consumption of server side resources.
The specification gives us two tools: the first one is a variable
document.hidden which is
true if the page is not on focus, and false while the user is actually on the page. The second tool we have is
visibilitychange which tells us when to look for the value of that variable.
So far so good, but how can we use this?
Continue reading Using the page visibility API in an AngularJS project
Following the official karma “Jenkins CI integration tutorial” I couldn’t get them working together properly.
That’s what I did to let them run together:
Added the Node Version Manager to the bash file:
Continue reading Integrating Jenkins and Karma test runner together
What is a Git Hook
Git hooks are basically bash scripts which are going to run before or after a git command is run.
By default git hooks are located under
/usr/share/git-core/templates. If you are using brew for
managing your git, then the location of the default hooks will be under the folder:
In these folders you can see examples of them.
What I use git hooks for
Continue reading How to setup global git hooks