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

@zcopur/feedbacky

v1.0.7

Published

Feedbacky allows you to add a simple feedback modal to your website. Feedbacky adds a button to the bottom of your website, and when the button is clicked, it opens a modal containing a form for users to send feedback.

Downloads

502

Readme

Feedbacky

Feedbacky allows you to add a simple feedback modal to your website. Feedbacky adds a button to the bottom of your website, and when the button is clicked, it opens a modal containing a form for users to send feedback.

You can check out the demo app to see how the package works.

Installation

Use the package manager npm to install feedbacky.

npm install @zcopur/feedbacky

Props

| Property | Type | Description | Default Value | | --------------------- | ----------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------- | | userId | number | Retrieves the user ID for logging feedback submissions. | 0 which means anonymous | | companyId | number-required | Provides a company ID, which we supply, for logging via the Google Sheets API. | 0 | | color | string | Button and theme color | "#f27a1a" | | title | string | Feedback form title | "SEND YOUR FEEDBACK" | | buttonText | string | Text displayed on the submit button | "SEND" | | loadingContent | string | Loading message | "loading..." | | placeHolder | string | Input placeholder text | "Share Your Feedback With Us..." | | feedbackImg | React.Element | Icon for feedback | <img src={feedbackIcon} alt="feedbackIcon" draggable={false} /> | | responseSuccessText | string | Message shown on successful submission | "WE HAVE GOT YOUR MESSAGE" | | responseErrorText | string | Message shown on submission error | "PLEASE TRY AGAIN" | | dimmerClick | boolean | Enables closing modal on dimmer click | true | | closeIcon | React.Element | Icon to close feedback modal | <img src={closeIcon} alt="closeIcon" /> | | checkIcon | React.Element | Success check icon | <img src={checkIcon} alt="checkIcon" /> | | dangerIcon | React.Element | Error icon | <img src={dangerIcon} alt="dangerIcon" /> | | shadow | string | Shadow style for modal | "0 10px 20px rgba(0, 0, 0, 0.2)" | | companyId | number | Identifier for the company | 0 |

Usage

import Feedbacky from "@zcopur/feedbacky";

<Feedbacky companyId={1} />;

Remember

To use our modal service, you need a Google service account with a serviceAccountKey shared with us. This account must have write access to a Google Sheet, with the spreadsheetId and sheetName also provided to us ([email protected]). In return, we will supply a companyId for your use of the service.

Logging

The Google Sheet logs data across columns A to E as follows: the comment ID, user ID (or 0 if anonymous), timestamp of when the comment was submitted, rating, and the feedback message.

For example

GoogleSheet Example

Testing

| File | % Stmts | % Branch | % Funcs | % Lines | | ------------------------------------- | ------- | -------- | ------- | ------- | | All files | 100 | 100 | 100 | 100 | | src | 100 | 100 | 100 | 100 | | App.tsx | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | main.tsx | 100 | 100 | 100 | 100 | | service.ts | 100 | 100 | 100 | 100 | | utils.ts | 100 | 100 | 100 | 100 | | src/components/feedBackButton | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | src/components/feedBackModal | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | src/components/feedBackModal/header | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | ...ponents/feedBackModal/inputContent | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | ...ents/feedBackModal/responseContent | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | src/context | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | initialStates.tsx | 100 | 100 | 100 | 100 | | mock.tsx | 100 | 100 | 100 | 100 |

Author

Zeynep Çöpür ❤️