From cf528311dc7e2b5b43d069ab74119b426d5afcd5 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Thu, 10 Apr 2025 05:16:43 -0400 Subject: [PATCH 1/3] gh: create a bug report issue template + template chooser config - have gotten a decent number of issues with no reproductions, so finally decided to make that a requirement for bug reports - require a reproduction, environment details from `envinfo`, and an attestation that the issues were searched - also have gotten a number of duplicates, some within an hour of each other no less - in the issue template and in the template chooser, also refer folks to SO for support - since more beginners find themselves using this library, make them more aware that issues are for bug reports and not support requests, which are better suited for SO or consulting / contracts (than for volunteer maintainers to help debug every use-case for free). - add links to SO, SO's MCVE/MRE docs, upstream `signature_pad`, and GitHub's communication docs --- .github/ISSUE_TEMPLATE/bug-report.yml | 74 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 7 +++ 2 files changed, 81 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..468ce4a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,74 @@ +name: Reproducible Bug Report +description: If you found a bug within `react-signature-canvas` itself and have a minimal reproduction of it. For support requests, use StackOverflow. +body: + # larger description of what this template's intended usage is + - type: markdown + attributes: + value: | + This template is to report a reproducible bug within `react-signature-canvas` itself. + + Issues [should _not_](https://docs.github.com/en/get-started/using-github/communicating-on-github) be used for support requests -- use [StackOverflow](https://stackoverflow.com/search?q=react-signature-canvas) for that instead. + + This should _not_ be used for issues with the underlying `signature_pad` -- use [`signature_pad`'s issues](https://github.com/szimek/signature_pad/issues) for that instead. + + Before opening a new issue, please do a [search of existing issues](https://github.com/agilgur5/react-signature-canvas/issues) and :+1: upvote any existing relevant issues instead. + Do not open duplicates of existing issues. + + # require that users have searched existing issues + - type: checkboxes + attributes: + label: Have you searched the existing issues? + description: Please search to see if an issue already exists for the problem you encountered + options: + - label: I have searched the existing issues and cannot find my problem + required: true + + # require that users provide a minimal reproduction + - type: input + attributes: + label: Provide a link to code that _minimally_ reproduces this bug + description: | + Link to a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) via a public [CodeSandbox](https://codesandbox.io/s/github/agilgur5/react-signature-canvas/tree/codesandbox-example), StackBlitz project, or GitHub repository. + + _Skipping this or providing an invalid link may result in your issue being summarily closed._ + placeholder: 'https://codesandbox.io/p/sandbox/my-minimal-react-signature-canvas-bug-reproduction' + validations: + required: true + + # require that users provide their environment details + - type: textarea + attributes: + label: Provide version numbers for your environment by running the below command + description: npx envinfo --npmPackages react-signature-canvas,react,react-dom,typescript --npmGlobalPackages typescript --binaries --browsers --system os + render: text # render as a ```text code block + # example output to clue in user about what it should look like + placeholder: | + System: + OS: macOS 14.5 + Binaries: + Node: 22.14.0 - ~/.local/share/mise/installs/node/22.14.0/bin/node + Yarn: 1.22.19 - /usr/local/bin/yarn + npm: 10.9.2 - ~/.local/share/mise/installs/node/22.14.0/bin/npm + Browsers: + Chrome: 134.0.6998.166 + Safari: 17.5 + npmPackages: + react: ^19.0.0 => 19.0.0 + react-dom: ^19.0.0 => 19.0.0 + react-signature-canvas: ^1.0.7 => 1.0.7 + typescript: ^4.6.3 => 4.6.4 + validations: + required: true + + # describe the problem + - type: textarea + attributes: + label: Describe the problem, how to reproduce it, and why you believe the behavior is a bug in this library + description: What is the current behavior vs. the expected behavior? + render: markdown # render directly as markdown + # example output to clue in user about what it should look like + placeholder: | + In the provided reproduction, run `npm run typecheck`. This results in a TypeScript error: `Could not find a declaration file for module 'react-signature-canvas'`. + As this library is natively written in TypeScript, I assumed that type declarations should be provided and that a TS build would succeed. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..07e402d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,7 @@ +contact_links: + - name: Search on StackOverflow + url: https://stackoverflow.com/search?q=react-signature-canvas + about: Use StackOverflow for support questions. Issues are for reproducible bug reports and feature requests. + - name: Upstream `signature_pad`'s issues + url: https://github.com/szimek/signature_pad/issues + about: This library is a wrapper around `signature_pad`. If you have an with `signature_pad` itself (as opposed to this wrapper), please see its issue tracker. From 70d5726001e3edbf651af6acb01f60419ee73a64 Mon Sep 17 00:00:00 2001 From: Anton Gilgur <4970083+agilgur5@users.noreply.github.com> Date: Sat, 12 Apr 2025 16:38:20 -0400 Subject: [PATCH 2/3] also search existing issues and give directions on what to do in case of a closed duplicate issue --- .github/ISSUE_TEMPLATE/bug-report.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 468ce4a..973ad55 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -11,7 +11,9 @@ body: This should _not_ be used for issues with the underlying `signature_pad` -- use [`signature_pad`'s issues](https://github.com/szimek/signature_pad/issues) for that instead. - Before opening a new issue, please do a [search of existing issues](https://github.com/agilgur5/react-signature-canvas/issues) and :+1: upvote any existing relevant issues instead. + Before opening a new issue, please do a [search of existing issues](https://github.com/agilgur5/react-signature-canvas/issues?q=is%3Aissue). \ + If a relevant open issue exists, you should :+1: upvote it instead. + If a relevant closed issue exists, please follow the directions of the closing comments. \ Do not open duplicates of existing issues. # require that users have searched existing issues From 9ec1edd9ab05bd668896c412d502f20486fd1996 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 12 Apr 2025 16:39:49 -0400 Subject: [PATCH 3/3] backslashes not necessary for single new line? --- .github/ISSUE_TEMPLATE/bug-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 973ad55..7d67a16 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -11,9 +11,9 @@ body: This should _not_ be used for issues with the underlying `signature_pad` -- use [`signature_pad`'s issues](https://github.com/szimek/signature_pad/issues) for that instead. - Before opening a new issue, please do a [search of existing issues](https://github.com/agilgur5/react-signature-canvas/issues?q=is%3Aissue). \ + Before opening a new issue, please do a [search of existing issues](https://github.com/agilgur5/react-signature-canvas/issues?q=is%3Aissue). If a relevant open issue exists, you should :+1: upvote it instead. - If a relevant closed issue exists, please follow the directions of the closing comments. \ + If a relevant closed issue exists, please follow the directions of the closing comments. Do not open duplicates of existing issues. # require that users have searched existing issues