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

ionic-feedback-module

v5.1.1

Published

Component for collecting user's feedback in an app built with Ionic

Downloads

14

Readme

ionic-feedback-module

The dependencies used by the latest version are the same as needed for Ionic 4.0.0. For older versions use:

| ionic-feedback-module | Ionic | Angular | ----- | -------- | ------ | 5.0.0 | >= 4.0.0 | ^7.0.0 | 4.0.0 | >= 3.9.0 | ^5.0.0 | 3.0.0 | >= 3.0.0 | ^4.0.0

The module is thought as an easy to integrate solution for sending feedback. Typically, the user shakes her device, a popup opens, the user can enter what went wrong, and finally the report is sent, including some additional information like screenshot, logs, app and device info.

The report is sent to a web service, which can do anything with the data, e.g. forward by mail to the developer, store it in a database, ...

A sample app using this module is ionic-feedback-sample.

A sample backend web service is ionic-feedback-backend.

Usage

npm package

npm install ionic-feedback-module --save

Cordova plugins

Additionally, you will need some Cordova plugins:

import module

In your app.module.ts, you have to import the module:

import { FeedbackModule } from "ionic-feedback-module";

@NgModule({
  ...
  imports: [
    FeedbackModule,
    ...
  ],

registering for Shake events

In your app.component.ts, you have to inject 2 components into your constructor:

  • FeedbackService: processes the shake
  • FeedbackViewerModalService: shows a modal in case of a shake event
import { FeedbackService, FeedbackViewerModalService } from "ionic-feedback-module";

constructor(
  platform: Platform,
  feedbackService: FeedbackService,
  private feedbackViewerModalService: FeedbackViewerModalService) {

  platform.ready().then(() => {
    feedbackService.shaken.subscribe(() => {
      this.feedbackViewerModalService.openModal();
    });
    feedbackService.startWatchForShake();
  });
}

Configuration

It is recommended to place the configuration in environment.ts:

export const environment = {
  feedback: {
    ...
  }
}

Just call `configure' before regisstering for shake events:

feedbackService.configure(environment.feedback);

Its structure is defined in the interface FeedbackConfiguration:

  • isEnabled: the shaken event is fired only if this is set to true
  • appKey: app key used for authorization with the backend (see below)
  • appSecret: app secret used for authorization with the backend (see below)
  • url: url of the backend (see below)
  • language: language used for the modal; see "multi language support"
  • translation: custom language used for the modal; see "multi language support"
  • categories: array of categories shown in the modal; could be something like error, improvement, smile, frown, ...
  • attachScreenshot: specifies, if a screenshot should be attached; valid values are Yes, No and Ask (ask the user if she wants to include it) this requires the Screenshot plugin
  • attachDeviceInfo: specifies, if device info should be attached; valid values are Yes, No and Ask (ask the user if she wants to include it) this requires the Device plugin
  • attachAppInfo: specifies, if app info should be attached; valid values are Yes, No and Ask (ask the user if she wants to include it) this requires the AppVersion plugin
  • attachLogMessages: specifies, if log messages should be attached; valid values are Yes, No and Ask (ask the user if she wants to include it)

Backend

For the backend, you need a service which can process the message with all provided infos. As a reference implementation, you can use ionic-feedback-backend. This implementation is also deployed to Azure. There is also the Swagger documentation of the service available.

If you want, you can also use this implementation for your app. But in this case, you need to register your app. As a result of the registration you will get your own AppKey and AppSecret. Every feedback will be sent by mail to an email address you specified.

So, if you are still interested in using this backend, just drop me a note.

multi language support

With language parameter in the configuration, you can use to select the language. Currently en and de are supported.

If you need another language, either open an issue, or just use the translation configuration. This parameter you can use to pass your completely own texts. Just fill the FeedbackViewerTranslation object.

API

see API documentation.