npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

north-plugin-device-test

v1.1.0

Published

Cordova Device Plugin

Downloads

5

Readme

North-Plugin-Device-Test Cordova Plugin

Gain priceless insights into your customers with smaller devices and how they use your app.

![Screencapture GIF](http://i.giphy.com/l41YoTcqOaWsgknpS.gif =250x)

Why?

As a product designer, user experience is really what matters most. Often engineers over-see things like reachability, font sizes in smaller screen sizes, and white space in larger screens. This plugin allows you to programatically set the web view in Cordova to a specific device size and anchor it to the left or right of your test device.

Important Notes

This is iOS only, I may attempt an Android version but haven't decided yet.

It should go without saying, but you need a device larger than the device being set otherwise you won't see the whole thing and the offsets will get crazy.

This plugin is written in Swift, this means you'll need the bridging header. If you do not have this already, or don't know how to make one go here: https://github.com/akofman/cordova-plugin-add-swift-support

I will not cover any support relating to the header.

This plugin is not meant to be used in production. Your app will most likely be rejected if it is using this because it's pretty far outside of the user guidelines on apps. If you want to try and submit your app using this plugin as a feature, let me know if they accept it!

Installation

Using Cordova cordova plugin add north-plugin-device-test Using Ionic Framework ionic plugin add north-plugin-device-test

Use

There are only two functions, setDevice and anchor. These must be wrapped in the Cordova Ready or Ionic Platform Ready events to function.

$ionicPlatform.ready(function() { /* Test device calls go here */ }

setDevice

deviceTest.setDevice('iPhone4s');

Possible values for the device are: iPhone4s iPhoneSE iPhone6 iPhone6Plus

anchor

The plugin defaults the anchor to the left side of the screen

deviceTest.anchor('left');

Possible values for anchor are: left right

Use Case

If you want to test your app on iPhone 4S with a right handed user, you would call: deviceTest.anchor('right'); deviceTest.setDevice('iPhone4s');

Things maybe coming

  • Some kind of event callback in case you need to update your UI in multiple areas of the app
  • iPad support, the resolutions don't match exactly, so working on that so you can test all sizes including iPad mini.