Skip to content

Commit 062c630

Browse files
Rishi PrasadRishi Prasad
Rishi Prasad
authored and
Rishi Prasad
committed
Add source path to Feedback modal
1 parent d0595e8 commit 062c630

8 files changed

+434
-24
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/node_modules
33
/.pnp
44
.pnp.js
5+
/demo
56

67
# testing
78
/coverage

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
src
22
webpack.config.js
33
.babelrc
4-
.eslintrc.js
4+
.eslintrc.js
5+
demo

README.md

+68-12
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,37 @@
55

66
# Feeder: feeder-react-feedback
77

8-
Embeddable Feedback React component hooked up to an [admin dashboard](http://feeder-admin-client.now.sh/). The fastest way to start collecting feedback across your React projects! ⚡
8+
![Feeder Banner](https://i.imgur.com/e56rlxF.png)
9+
10+
Embeddable Feedback React component hooked up to an [admin dashboard](http://feeder.sh/). The fastest way to start collecting feedback across your React projects! ⚡
911

1012
## Quick Links
1113

1214
### External
1315

1416
- [Component Demo/Playground](http://feeder-xi.now.sh/)
15-
- [Admin Dashboard](http://feeder-admin-client.now.sh/)
17+
- [Admin Dashboard](http://feeder.sh/)
1618

1719
### Documentation
1820

19-
- [Features](#features)
20-
- [Install via NPM](#install-via-npm)
21-
- [Usage](#usage)
22-
- [Props](#props)
23-
- [FAQs](#faqs)
24-
- [What is the Admin Dashboard?](#what-is-the-admin-dashboard)
25-
- [Usage with SSR React Frameworks (e.g. Gatsby, Next)](#will-this-work-with-ssr-react-frameworks)
26-
- [Tips](#tips)
21+
- [Feeder: feeder-react-feedback](#feeder-feeder-react-feedback)
22+
- [Quick Links](#quick-links)
23+
- [External](#external)
24+
- [Documentation](#documentation)
25+
- [Features](#features)
26+
- [Install via NPM](#install-via-npm)
27+
- [Usage](#usage)
28+
- [Props](#props)
29+
- [API](#api)
30+
- [URL & Endpoint](#url--endpoint)
31+
- [Create Feedback Endpoint Fields](#create-feedback-endpoint-fields)
32+
- [Custom Styling](#custom-styling)
33+
- [FAQs](#faqs)
34+
- [What is the Admin Dashboard?](#what-is-the-admin-dashboard)
35+
- [Will this work with SSR React frameworks?](#will-this-work-with-ssr-react-frameworks)
36+
- [Tips](#tips)
37+
- [Default Email Value](#default-email-value)
38+
- [Subprojects](#subprojects)
2739

2840
## Features
2941

@@ -54,7 +66,7 @@ class App extends Component {
5466
}
5567
```
5668

57-
After importing the component, create an Account/Project on the [admin dashboard](http://feeder-admin-client.now.sh/) and pass in your project's `projectId` as a prop to the `Feedback` component.
69+
After importing the component, create an Account/Project on the [admin dashboard](http://feeder.sh/) and pass in your project's `projectId` as a prop to the `Feedback` component.
5870

5971
## Props
6072

@@ -74,11 +86,55 @@ After importing the component, create an Account/Project on the [admin dashboard
7486
| textColor | Text color - can accept any value that is valid for the CSS3 `color` property (hex, rgba, etc.) | string | no | "#000000" |
7587
| zIndex | z-index of Modal and Trigger Button | string | no | "100000000" |
7688

89+
---
90+
91+
## API
92+
93+
If you want to render your own Feedback form/modal, but still have access to the Feeder monitoring system/admin dashboard, you can send a `POST` request to the Feeder API directly.
94+
95+
### URL & Endpoint
96+
97+
Send a `POST` request to Feeder's "create feedback" endpoint and make sure to pass in all required endpoint fields.
98+
99+
- `Create Feedback Endpoint`: https://feeder-node-1337.herokuapp.com/feedback/create
100+
101+
### Create Feedback Endpoint Fields
102+
103+
The following should be passed as an object in the post request to `/feedback/create`. Requests without all the required fields will fail.
104+
105+
- `projectId`: required (create an account on Feeder, create a project, and copy your projectId)
106+
- `feedbackMsg`: optional (but no reason not to have this!)
107+
- `feedbackType`: optional
108+
- `feedbackEmail`: optional
109+
- `subProject`: optional
110+
- `feedbackSrc`: optional
111+
112+
## Custom Styling
113+
114+
You can override any CSS classes in the Feedback component. Below is a list of CSS classes used in the component, but the easiest way to find specific class names and styles to override is to use the browser tools and inspect the element you are targeting.
115+
116+
- `frf-feedback-container`: wrapper container
117+
- `frf-trigger-button`: main trigger button that opens up modal
118+
- `frf-feedback-icon-open`: trigger button icon when modal is open
119+
- `frf-feedback-icon`: trigger button icon when modal is closed
120+
- `frf-dialog`: css transition class for fade in of modal
121+
- `frf-modal-container`: modal content
122+
- `frf-modal-content-container`: form content
123+
- `frf-modal-input-group`: form input label + input
124+
- `frf-modal-label`: form input label
125+
- `frf-modal-input`: form input
126+
- `frf-modal-feedback-types`: group of feedback types
127+
- `frf-modal-feedback-type`: individual feedback type
128+
- `frf-modal-feedback-selected`: selected feedback type
129+
- `frf-modal-button`: main submit button
130+
- `frf-modal-button-loader`: loading indicator when submitted
131+
- `frf-water`: "Feedback powered by Feeder.sh" watermark (if you want to hide this, just target this selector and add a `display: none`)
132+
77133
## FAQs
78134

79135
### What is the Admin Dashboard?
80136

81-
The [admin dashboard](http://feeder-admin-client.now.sh/) is where all the feedback for each project is collected. Each project has a unique id that is passed as a prop to the `<Feedback/>` component.
137+
The [admin dashboard](http://feeder.sh/) is where all the feedback for each project is collected. Each project has a unique id that is passed as a prop to the `<Feedback/>` component.
82138

83139
You can add collaborators to each project as well, which will give them the ability to view all the feedback for a given project. The admin dashboard also allows users to export all project-specific data to CSV.
84140

dist/Feedback.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)