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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@patch-adams/plugin-feedback

v1.0.14

Published

Feedback widget plugin for Patch-Adams - inject a feedback form into Rise courses

Readme

@patch-adams/plugin-feedback

A feedback widget plugin for Patch-Adams that injects a customizable feedback form into Rise courses.

Features

  • Star rating (configurable 3-10 stars)
  • Issue type dropdown with subtypes
  • Comment field with character counter
  • Auto-detects language from <html lang> or <body lang> attribute
  • Live language switching (English/French)
  • Submits to configurable endpoint
  • Fully customizable appearance and behavior

Installation

npm install @patch-adams/plugin-feedback

Usage

Configure the feedback plugin in your patch configuration:

import { patchCourse } from '@patch-adams/core';
import feedbackPlugin from '@patch-adams/plugin-feedback';

const result = await patchCourse(courseZip, {
  plugins: {
    feedback: {
      enabled: true,
      tabText: 'Feedback',
      tabColor: '#da291c',
      position: 'right',
      endpoint: 'https://api.example.com/feedback',
      showRating: true,
      showIssueType: true,
      showComment: true,
    },
  },
});

Language Detection

The widget automatically detects the language from the HTML document:

  1. Checks <html lang="xx"> attribute
  2. Falls back to <body lang="xx"> attribute
  3. Falls back to config.locale value
  4. Defaults to English

Language variants are normalized: fr-CAfr, en-USen

Live switching: If the lang attribute changes at runtime (e.g., via JavaScript or DevTools), the widget automatically re-renders with the new language.

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enabled | boolean | true | Enable/disable the plugin | | endpoint | string | - | URL to POST feedback data | | method | 'POST' | 'PUT' | 'POST' | HTTP method | | headers | object | - | Additional headers for the request | | position | 'left' | 'right' | 'right' | Tab position | | tabText | string | 'Feedback' | Text on the tab button | | tabColor | string | '#da291c' | Tab background color | | tabTextColor | string | '#ffffff' | Tab text color | | zIndex | number | 9999 | Widget z-index | | showRating | boolean | true | Show star rating | | ratingRequired | boolean | false | Require rating to submit | | ratingStars | number | 5 | Number of stars (3-10) | | showIssueType | boolean | true | Show issue type dropdown | | issueTypeRequired | boolean | false | Require issue type | | issueTypes | array | default types | Custom issue types | | showComment | boolean | true | Show comment field | | commentRequired | boolean | false | Require comment | | commentMaxLength | number | 500 | Max comment length | | locale | 'en' | 'fr' | 'en' | Default locale (auto-detected at runtime) | | translations | object | - | Custom translation overrides | | autoClose | boolean | true | Auto-close after success | | autoCloseDelay | number | 2000 | Delay before auto-close (ms) | | debug | boolean | false | Enable debug logging | | includeMetadata | object | all true | What metadata to include |

Custom Issue Types

{
  issueTypes: [
    {
      id: 'content',
      label: 'Content Issue',
      subtypes: [
        { id: 'typo', label: 'Typo / Grammar' },
        { id: 'incorrect', label: 'Incorrect Information' },
      ],
    },
    {
      id: 'technical',
      label: 'Technical Issue',
    },
    {
      id: 'other',
      label: 'Other',
    },
  ],
}

Metadata

By default, feedback submissions include:

  • courseId - From data-pa-course-id attribute on <html>
  • courseTitle - From LRS bridge if available
  • lessonId - Current URL hash or pathname
  • userAgent - Browser user agent
  • timestamp - ISO 8601 timestamp
  • url - Current page URL

Submitted Data Format

{
  "rating": 4,
  "issueType": "content",
  "issueSubtype": "typo",
  "comment": "Found a typo on slide 3",
  "metadata": {
    "courseId": "course-123",
    "courseTitle": "Safety Training",
    "lessonId": "#/lessons/intro",
    "userAgent": "Mozilla/5.0...",
    "timestamp": "2024-01-15T10:30:00.000Z",
    "url": "https://example.com/course/#/lessons/intro"
  }
}

License

MIT