Skip to content

Commit

Permalink
Polish docs (ueman#127)
Browse files Browse the repository at this point in the history
* fix paths in ci

* fix web

* improve readme

* Improve docs & issue template

* fix filetype

* fxi template

* fix template

* remove placeholder + description

* add master channel
  • Loading branch information
ueman authored Oct 16, 2021
1 parent 5c0794d commit 32194ae
Show file tree
Hide file tree
Showing 15 changed files with 271 additions and 80 deletions.
33 changes: 0 additions & 33 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md

This file was deleted.

95 changes: 95 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: 🐞 Bug report
description: Report broken functionality.
labels: [bug]

body:
- type: markdown
attributes:
value: |
🧐 **Guidelines:**
- Search through [existing issues](https://github.com/ueman/feedback/issues?q=is%3Aissue) first to ensure that this bug has not been reported before.
- Write a descriptive title for your issue. Avoid generic or vague titles such as "Something's not working" or "A couple of problems".
- Keep your issue focused on one single problem. If you have multiple bug reports, please create separate issues for each of them.
- Provide as much context as possible in the details section. Include screenshots, screen recordings, links, references, or anything else you may consider relevant.
- If you want to ask a question instead of reporting a bug, please use [discussions](https://github.com/ueman/feedback/discussions/new) instead.
- type: input
attributes:
label: Version
description: Which version of feedback does this bug affect?
placeholder: ver X.Y.Z
validations:
required: true

- type: dropdown
attributes:
label: Library
description: Which library is affected by this bug?
multiple: true
options:
- feedback
- feedback_gitlab
- feedback_sentry
validations:
required: true

- type: dropdown
attributes:
label: Flutter channel
description: Which Flutter channel are you using?
multiple: true
options:
- stable
- beta
- dev
- master
validations:
required: true

- type: input
attributes:
label: Flutter version
description: Which Flutter version are you using?
validations:
required: true

- type: dropdown
attributes:
label: Platform
description: Which platform are you using?
multiple: true
options:
- Android
- iOS
- Web
- Linux
- macOS
- Windows
validations:
required: true

- type: textarea
attributes:
label: Details
description: Clear and thorough explanation of the bug.
placeholder: I was doing X expecting Y to happen, but Z happened instead.
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Minimum steps required to reproduce the bug.
placeholder: |
- Step 1
- Step 2
- Step 3
validations:
required: true

- type: textarea
attributes:
label: Output of `flutter doctor -v`
description: The input is automatically formatted as shell output
render: shell
4 changes: 2 additions & 2 deletions .github/workflows/feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
branches:
- master
paths:
- "feedback"
- "feedback/**"
- ".github/workflows/feedback.yml"
pull_request:
paths:
- "feedback"
- "feedback/**"
- ".github/workflows/feedback.yml"

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
branches:
- master
paths:
- "feedback_gitlab"
- "feedback_gitlab/**"
- ".github/workflows/gitlab.yml"
pull_request:
paths:
- "feedback_gitlab"
- "feedback_gitlab/**"
- ".github/workflows/gitlab.yml"

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
branches:
- master
paths:
- "feedback_sentry"
- "feedback_sentry/**"
- ".github/workflows/sentry.yml"
pull_request:
paths:
- "feedback_sentry"
- "feedback_sentry/**"
- ".github/workflows/sentry.yml"

jobs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/web-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
- uses: erickzanardo/flutter-gh-pages@v7
- uses: bluefireteam/flutter-gh-pages@v7
with:
workingDir: example
webRenderer: canvaskit
baseHref: /feedback/
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

---

💰 Using this library in a commercial product? Consider [becoming a sponsor](https://github.com/ueman#sponsor-me).

---

A Flutter package for obtaining better feedback. It allows the user to provide interactive feedback
directly in the app, by annotating a screenshot of the current page, as well as by adding text.

Expand All @@ -23,7 +27,7 @@ directly in the app, by annotating a screenshot of the current page, as well as

## Demo

An interactive web example is available here: <a href="https://flutter-feedback.netlify.app/"><img src="https://img.shields.io/badge/Try-Flutter%20Web%20demo-blue" alt="Online demo"></a>. It also contains a small tutorial on how to use this library.
An interactive web example is available here: <a href="https://ueman.github.io/feedback/"><img src="https://img.shields.io/badge/Try-Flutter%20Web%20demo-blue" alt="Online demo"></a>. It also contains a small tutorial on how to use this library.

## Motivation

Expand All @@ -44,10 +48,15 @@ understand.
Depending on your use case there are wide variety of solutions.
These are a couple suggestions:

| Plugin | Package |
|--------------------------------|--------------------------------|
| GitLab Issue | [feedback_gitlab](https://pub.dev/packages/feedback_gitlab) |
| Sentry User Feedback | [feedback_sentry](https://pub.dev/packages/feedback_sentry) |


| Target | Notes |
|--------------------------------|--------------------------------|
| Upload to a server | To upload the feedback to a server you should use for example a [MultipartRequest](https://pub.dev/documentation/http/latest/http/MultipartRequest-class.html). |
| GitLab Issue | [feedback_gitlab](https://pub.dev/packages/feedback_gitlab) |
| Share via platform share dialog | [share_plus on pub.dev](https://pub.dev/packages/share_plus). Also shown in the example. |
| Firebase | [Firestore](https://pub.dev/packages/cloud_firestore), [Cloud Storage](https://pub.dev/packages/firebase_storage), [Database](https://pub.dev/packages/firebase_database)
| Jira | Jira has a [REST API to create issues and upload files](https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#creating-an-issue-examples) |
Expand All @@ -57,10 +66,6 @@ These are a couple suggestions:

If you have sample code on how to upload it to a platform, I would appreciate a pull request to the example app.

## 📣 Author

- Jonas Uekötter: [GitHub](https://github.com/ueman) and [Twitter](https://twitter.com/ue_man)

## Sponsoring
## 📣 Maintainer

I'm working on my packages on my free-time, but I don't have as much time as I would. If this package or any other package I created is helping you, please consider to [sponsor](https://github.com/ueman#sponsor-me) me. By doing so, I will prioritize your issues or your pull-requests before the others.
Hey, I'm Jonas Uekötter. I created this awesome software. Visit my [GitHub profile](https://github.com/ueman) and follow me on [Twitter](https://twitter.com/ue_man). If you like this, please leave a like or star it on GitHub.
74 changes: 57 additions & 17 deletions feedback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

---

💰 Using this library in a commercial product? Consider [becoming a sponsor](https://github.com/ueman#sponsor-me).

---

A Flutter package for obtaining better feedback. It allows the user to provide interactive feedback
directly in the app, by annotating a screenshot of the current page, as well as by adding text.

Expand All @@ -23,7 +27,7 @@ directly in the app, by annotating a screenshot of the current page, as well as

## Demo

An interactive web example is available here: <a href="https://flutter-feedback.netlify.app/"><img src="https://img.shields.io/badge/Try-Flutter%20Web%20demo-blue" alt="Online demo"></a>. It also contains a small tutorial on how to use this library.
An interactive web example is available here: <a href="https://ueman.github.io/feedback/"><img src="https://img.shields.io/badge/Try-Flutter%20Web%20demo-blue" alt="Online demo"></a>. It also contains a small tutorial on how to use this library.

## Motivation

Expand Down Expand Up @@ -53,7 +57,7 @@ dependencies:
feedback: x.y.z # use the latest version found on pub.dev
```
Then, run `flutter packages get` in your terminal.
Then, run `flutter pub get` in your terminal.

### Use it

Expand All @@ -80,24 +84,64 @@ BetterFeedback.of(context).show((UserFeedback feedback) {
// Do something with the feedback
});
```
Provide a way to hide the feedback panel by calling `BetterFeedback.of(context).hide();`
Provide a way to hide the feedback panel by calling `BetterFeedback.of(context).hide();`

### Use the feedback

Depending on your use case there are wide variety of solutions.
These are a couple suggestions:

| Target | Notes |
|--------|---------|
| Upload to a server | To upload the feedback to a server you should use for example a [MultipartRequest](https://pub.dev/documentation/http/latest/http/MultipartRequest-class.html). |
| GitLab Issue | GitLab has a [REST API to create issues](https://docs.gitlab.com/ee/api/issues.html) |
#### GitLab plugin

The [feedback_gitlab](https://pub.dev/packages/feedback_gitlab) plugin creates
an issue on [GitLab](https://about.gitlab.com/) for each feedback submitted by the users.

Just use it as shown in the following example. It openes the feedback ui and
after the user has submitted his feedback, it gets automatically uploaded
to GitLab.

```dart
import 'package:feedback_gitlab/feedback_gitlab.dart';
BetterFeedback.of(context).showAndUploadToGitLab(
projectId: 'project-Id', // Required, use your GitLab project id
apiToken: 'api-token', // Required, use your GitLab API token
gitlabUrl: 'gitlab.org', // Optional, defaults to 'gitlab.com'
);
```
The API token needs access to `read_api` and `write_repository`.
See [GitLabs docs](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#limiting-scopes-of-a-project-access-token)
for more information on API tokens.


#### Sentry plugin
The [feedback_sentry](https://pub.dev/packages/feedback_sentry) submits the
feedback to Sentry as Sentry User Feedback. It works with [sentry](https://pub.dev/packages/sentry) and [sentry_flutter](https://pub.dev/packages/sentry_flutter).

Just use it as shown in the following example. It openes the feedback ui and
after the user has submitted his feedback, it gets automatically uploaded
to Sentry.

```dart
import 'package:feedback_sentry/feedback_sentry.dart';
BetterFeedback.of(context).showAndUploadToSentry(
name: 'Foo Bar', // optional
email: '[email protected]', // optional
);
```

#### Other use cases

| Target | Notes |
|--------------------------------|--------------------------------|
| Upload to a server | To upload the feedback to a server you should use for example a [MultipartRequest](https://pub.dev/documentation/http/latest/http/MultipartRequest-class.html). |
| Share via platform share dialog | [share_plus on pub.dev](https://pub.dev/packages/share_plus). Also shown in the example. |
| Firebase | [Firestore](https://pub.dev/packages/cloud_firestore), [Cloud Storage](https://pub.dev/packages/firebase_storage), [Database](https://pub.dev/packages/firebase_database)
| Jira | Jira has a [REST API to create issues and upload files](https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#creating-an-issue-examples) |
| Jira | Jira has a [REST API to create issues and upload files](https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#creating-an-issue-examples) |
| Trello | Trello has a [REST API to create issues and upload files](https://developer.atlassian.com/cloud/trello/rest/api-group-actions/) |
| E-Mail | You can use the users email client like [in the sample app](https://github.com/ueman/feedback/blob/master/example/lib/main.dart) to send feedback to yourself using the [flutter_email_sender](https://pub.dev/packages/flutter_email_sender) plugin. |


If you have sample code on how to upload it to a platform, I would appreciate a pull request to the example app.

### 🎨 Configuration & customization
Expand Down Expand Up @@ -150,18 +194,14 @@ in the screenshot.
## ⚠️ Known Issues and limitations

- Platform views are invisible in screenshots (like [webview](https://pub.dev/packages/webview_flutter) or [Google Maps](https://pub.dev/packages/google_maps_flutter)). For further details, see this [Flutter issue](https://github.com/flutter/flutter/issues/25306).
- Web only works with Flutter's CanvasKit Renderer, for more information see [Flutter Web Renderer docs](https://flutter.dev/docs/development/tools/web-renderers).
- Web only works with Flutter's CanvasKit Renderer. For more information on how to use it, see [Flutter Web Renderer docs](https://flutter.dev/docs/development/tools/web-renderers).

## 📣 Author
## 📣 Maintainer

- Jonas Uekötter: [GitHub](https://github.com/ueman) and [Twitter](https://twitter.com/ue_man)
Hey, I'm Jonas Uekötter. I created this awesome software. Visit my [GitHub profile](https://github.com/ueman) and follow me on [Twitter](https://twitter.com/ue_man). If you like this, please leave a like or star it on GitHub.

## Issues, questions and contributing

You can raise issues [here](https://github.com/ueman/feedback/issues).
If you've got a question do not hesitate to ask it [here](https://github.com/ueman/feedback/discussions).
Contributions are also welcome. You can do a pull request on GitHub [here](https://github.com/ueman/feedback/pulls). Please take a look at [`up for grabs`](https://github.com/ueman/feedback/issues?q=is%3Aopen+is%3Aissue+label%3Aup-for-grabs) issues first.

## Sponsoring

I'm working on my packages on my free-time, but I don't have as much time as I would. If this package or any other package I created is helping you, please consider to [sponsor](https://github.com/ueman#sponsor-me) me. By doing so, I will prioritize your issues or your pull-requests before the others.
Contributions are also welcome. You can do a pull request on GitHub [here](https://github.com/ueman/feedback/pulls). Please take a look at [`up for grabs`](https://github.com/ueman/feedback/issues?q=is%3Aopen+is%3Aissue+label%3Aup-for-grabs) issues first.
Binary file added feedback/example/web/icons/Icon-maskable-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added feedback/example/web/icons/Icon-maskable-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 32194ae

Please sign in to comment.