galadrim-feedback 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -25
- package/dist/index.cjs +338 -100
- package/dist/index.mjs +338 -100
- package/dist/types/libs/backend-client/api.d.ts +114 -0
- package/dist/types/src/components/molecules/kanban/LinkToTicketModal.d.ts +1 -0
- package/dist/types/src/contexts/kanban/KanbanContext.d.ts +2 -0
- package/dist/types/src/contexts/kanban/KanbanProvider.d.ts +2 -0
- package/dist/types/src/contexts/kanban/useKanbanContext.d.ts +2 -0
- package/dist/types/src/services/notion.d.ts +2 -1
- package/dist/types/src/services/trello.d.ts +3 -1
- package/libs/backend-client/api.ts +190 -0
- package/libs/backend-client/configuration.ts +96 -117
- package/package.json +1 -1
- package/src/components/atoms/buttons/Button.tsx +3 -0
- package/src/components/atoms/buttons/CloseButton.tsx +8 -2
- package/src/components/molecules/feedbacks/item/FeedbackItemHovered.tsx +4 -0
- package/src/components/molecules/feedbacks/item/FeedbackListItem.tsx +3 -0
- package/src/components/molecules/feedbacks/item/FeedbackPin.tsx +4 -0
- package/src/components/molecules/feedbacks/menu/FastAccessButtons.tsx +3 -0
- package/src/components/molecules/feedbacks/menu/FilterButton.tsx +3 -0
- package/src/components/molecules/feedbacks/menu/MenuButton.tsx +3 -0
- package/src/components/molecules/feedbacks/menu/MenuItem.tsx +3 -1
- package/src/components/molecules/feedbacks/shared/FeedbackTextArea.tsx +3 -0
- package/src/components/molecules/forms/ResetPasswordForm.tsx +6 -2
- package/src/components/molecules/forms/SignInForm.tsx +9 -0
- package/src/components/molecules/kanban/CreateCardModal.tsx +25 -2
- package/src/components/molecules/kanban/LinkToTicketModal.tsx +82 -0
- package/src/components/molecules/notion/NotionCreateCardModal.tsx +1 -0
- package/src/components/molecules/trello/TrelloProjectModal.tsx +3 -0
- package/src/components/organisms/Collaborators.tsx +3 -1
- package/src/components/organisms/Settings.tsx +8 -9
- package/src/contexts/feedback/FeedbackProvider.tsx +0 -1
- package/src/contexts/kanban/KanbanContext.tsx +4 -0
- package/src/contexts/kanban/KanbanProvider.tsx +6 -0
- package/src/index.tsx +2 -0
- package/src/services/notion.ts +32 -1
- package/src/services/trello.ts +25 -0
- package/src/utils/triggerEvents.tsx +12 -26
package/README.md
CHANGED
|
@@ -25,36 +25,99 @@ This will copy the complete installation prompt to your clipboard. Then simply p
|
|
|
25
25
|
<details>
|
|
26
26
|
<summary><h3>🤖 Quick Install with Cursor</h3></summary>
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
````
|
|
29
29
|
Install and configure Galadrim Feedback in this React project:
|
|
30
30
|
|
|
31
31
|
1. Install dependencies:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
2.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
yarn add axios galadrim-feedback
|
|
33
|
+
|
|
34
|
+
2. Configure Path Generation Plugin:
|
|
35
|
+
Galadrim Feedback requires a plugin to add file path data to your components. We recommend using the SWC plugin for performance, but a Babel plugin is also available for older projects.
|
|
36
|
+
|
|
37
|
+
#### SWC Configuration (Recommended)
|
|
38
|
+
1. Install the necessary packages:
|
|
39
|
+
`yarn add -D swc-plugin-react-generate-paths`
|
|
40
|
+
|
|
41
|
+
2. Configure your build tool:
|
|
42
|
+
**For Vite:**
|
|
43
|
+
Install `@vitejs/plugin-react-swc` and update your `vite.config.ts`:
|
|
44
|
+
```typescript
|
|
45
|
+
// vite.config.ts
|
|
46
|
+
import { defineConfig } from "vite";
|
|
47
|
+
import react from "@vitejs/plugin-react-swc";
|
|
48
|
+
|
|
49
|
+
export default defineConfig({
|
|
50
|
+
plugins: [
|
|
51
|
+
react({
|
|
52
|
+
plugins: [["swc-plugin-react-generate-paths", {}]],
|
|
53
|
+
}),
|
|
54
|
+
],
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**For Next.js (Turbopack):**
|
|
59
|
+
Update your `next.config.js`:
|
|
60
|
+
```javascript
|
|
61
|
+
// next.config.js
|
|
62
|
+
module.exports = {
|
|
63
|
+
experimental: {
|
|
64
|
+
swcPlugins: [
|
|
65
|
+
[
|
|
66
|
+
"swc-plugin-react-generate-paths",
|
|
67
|
+
{
|
|
68
|
+
displayName: true,
|
|
69
|
+
ssr: true,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### Babel Configuration
|
|
78
|
+
If your project uses Babel, you can use the Babel plugin instead.
|
|
79
|
+
|
|
80
|
+
1. Install the plugin:
|
|
81
|
+
`yarn add -D babel-plugin-react-generate-paths`
|
|
82
|
+
|
|
83
|
+
2. Configure your build tool:
|
|
84
|
+
**For Vite:**
|
|
85
|
+
```typescript
|
|
86
|
+
// vite.config.ts
|
|
87
|
+
import { defineConfig } from "vite";
|
|
88
|
+
import react from "@vitejs/plugin-react";
|
|
89
|
+
|
|
90
|
+
export default defineConfig({
|
|
91
|
+
plugins: [
|
|
92
|
+
react({
|
|
93
|
+
babel: {
|
|
94
|
+
plugins: [["babel-plugin-react-generate-paths"]],
|
|
95
|
+
},
|
|
96
|
+
}),
|
|
97
|
+
],
|
|
98
|
+
});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**For other Babel setups (e.g. `.babelrc`):**
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"plugins": ["babel-plugin-react-generate-paths"]
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
50
108
|
|
|
51
109
|
3. Configure FeedbackRoot component:
|
|
52
110
|
- Run `pwd` command in the frontend root directory and use this absolute path for rootDir prop
|
|
53
111
|
- Detect navigation package used in the project:
|
|
54
|
-
* If using React Router (react-router-dom):
|
|
112
|
+
* If using React Router Dom (react-router-dom):
|
|
55
113
|
- Import: import { useNavigate } from "react-router-dom";
|
|
56
114
|
- Hook: const navigate = useNavigate();
|
|
57
115
|
- Navigate prop: navigate={(path) => navigate(path)}
|
|
116
|
+
|
|
117
|
+
* If using React Router (react-router):
|
|
118
|
+
- Import: import { useNavigate } from "react-router";
|
|
119
|
+
- Hook: const navigate = useNavigate();
|
|
120
|
+
- Navigate prop: navigate={(path) => navigate(path)}
|
|
58
121
|
* If using Next.js router (next/router):
|
|
59
122
|
- Import: import { useRouter } from "next/router";
|
|
60
123
|
- Hook: const router = useRouter();
|
|
@@ -68,19 +131,19 @@ Install and configure Galadrim Feedback in this React project:
|
|
|
68
131
|
* Import "galadrim-feedback/dist/styles.css"
|
|
69
132
|
* Add <FeedbackRoot> component with these props:
|
|
70
133
|
- rootDir="{absolute path from pwd command}"
|
|
71
|
-
- projectId="
|
|
134
|
+
- projectId="${PROJECT_ID}"
|
|
72
135
|
- navigate={(path) => navigate(path)} (using detected navigation method)
|
|
73
136
|
- position="bottom-right"
|
|
74
|
-
- notionDatabaseId
|
|
75
|
-
* Place it inside the router context but outside main content areas
|
|
137
|
+
- notionDatabaseId="${NOTION_DATABASE_ID}"
|
|
138
|
+
* Place it inside the router context but outside main content areas, if needed you can wrap it in a layout component that is parent to the rest of the app
|
|
76
139
|
|
|
77
140
|
4. Verification:
|
|
78
141
|
- Show all modified files
|
|
79
142
|
- Confirm the navigation setup works with the detected router
|
|
80
|
-
- List any manual steps needed (like getting projectId from admin)
|
|
143
|
+
- List any manual steps needed (like getting projectId from admin) (see https://feedback.galadrim.ovh/admin)
|
|
81
144
|
|
|
82
145
|
Be very specific about file paths and exact code to add. Show the complete import statements and component setup.
|
|
83
|
-
|
|
146
|
+
````
|
|
84
147
|
|
|
85
148
|
</details>
|
|
86
149
|
|
|
@@ -227,6 +290,16 @@ import "galadrim-feedback/dist/styles.css"; // Don't forget to import the CSS st
|
|
|
227
290
|
|
|
228
291
|
This concludes the installation of **Galadrim Feedback** in your project!
|
|
229
292
|
|
|
293
|
+
### Kanban Integration
|
|
294
|
+
|
|
295
|
+
Once **Galadrim Feedback** is installed and configured, you can connect to a kanban board to manage your feedback:
|
|
296
|
+
|
|
297
|
+
- **Notion Integration**: If you provide a `notionDatabaseId` prop to the FeedbackRoot component, you'll be able to connect to a Notion kanban board through the settings menu. The Notion token is linked to the specific project for that particular kanban database.
|
|
298
|
+
|
|
299
|
+
- **Trello Integration**: If no `notionDatabaseId` is provided, you'll be able to connect to Trello instead through the settings menu. You can choose which Trello board to link with the project. Unlike Notion, the Trello token is linked to your account, so once you connect Trello for the first time, you only need to select the board for other projects without re-authenticating.
|
|
300
|
+
|
|
301
|
+
The kanban integration allows you to link feedback items to tickets/cards in your project management tool, creating a seamless workflow from feedback collection to task management.
|
|
302
|
+
|
|
230
303
|
</details>
|
|
231
304
|
|
|
232
305
|
## Account Creation
|