review-lens-react 0.2.1 → 1.0.0

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 CHANGED
@@ -52,7 +52,8 @@ export function AppReviewMode() {
52
52
  <ReviewLensProvider
53
53
  config={{
54
54
  googleClientId: import.meta.env.VITE_GOOGLE_CLIENT_ID,
55
- spreadsheetId: import.meta.env.VITE_REVIEW_LENS_SPREADSHEET_ID,
55
+ contentSpreadsheetId: import.meta.env.VITE_REVIEW_LENS_CONTENT_SPREADSHEET_ID,
56
+ usersSpreadsheetId: import.meta.env.VITE_REVIEW_LENS_USERS_SPREADSHEET_ID,
56
57
  projectKey: "landing-pages-app",
57
58
  contentId: "article-123"
58
59
  }}
@@ -92,7 +93,8 @@ Config:
92
93
  | Name | Required | Description |
93
94
  | --- | --- | --- |
94
95
  | `googleClientId` | yes, unless `adapter` is provided | OAuth web client id from Google Cloud. |
95
- | `spreadsheetId` | yes, unless `adapter` is provided | Google Sheet id from the Sheet URL. |
96
+ | `contentSpreadsheetId` | yes, unless `adapter` is provided | Google Sheet id for review feedback and messages. |
97
+ | `usersSpreadsheetId` | yes, unless `adapter` is provided | Google Sheet id for user roles and authentication metadata. |
96
98
  | `sheetName` | no | Feedback sheet name. Defaults to `Feedback`. |
97
99
  | `projectKey` | yes | Stable app/project key, for example `landing-pages-app`. |
98
100
  | `contentId` | yes | Stable content key shared by localhost and production. |
@@ -186,15 +188,17 @@ https://your-production-app.example.com
186
188
 
187
189
  Use the generated client id as `googleClientId`.
188
190
 
189
- ### 5. Create the Google Sheet
191
+ ### 5. Create the Google Sheets
190
192
 
191
- Create one shared Google Sheet and copy its id from the URL:
193
+ Create a content Google Sheet and copy its id from the URL:
192
194
 
193
195
  ```text
194
196
  https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit
195
197
  ```
196
198
 
197
- Share the Sheet with every reviewer/developer who should use the overlay. Users need Sheet access because the browser writes directly to the Google Sheets API as the signed-in user.
199
+ Use this id as `contentSpreadsheetId`. Share the content Sheet with every reviewer/developer who should create or update review content.
200
+
201
+ Create a separate users/auth Google Sheet and use its id as `usersSpreadsheetId`. Normal reviewers only need read access to this Sheet; admins can keep write access to themselves.
198
202
 
199
203
  ### 6. Add the `Feedback` tab
200
204
 
@@ -214,7 +218,7 @@ Create a tab named `Messages` with this header row:
214
218
  id,feedbackId,body,authorEmail,createdAt
215
219
  ```
216
220
 
217
- ### 8. Add the `Users` tab
221
+ ### 8. Add the `Users` tab in the users Sheet
218
222
 
219
223
  Create a tab named `Users` with this header row:
220
224
 
@@ -261,7 +265,8 @@ If your app has a different URL model, pass a custom normalizer:
261
265
  <ReviewLensProvider
262
266
  config={{
263
267
  googleClientId,
264
- spreadsheetId,
268
+ contentSpreadsheetId,
269
+ usersSpreadsheetId,
265
270
  projectKey: "landing-pages-app",
266
271
  contentId: article.id,
267
272
  normalizeUrl: (url) => new URL(url).pathname.replace(/^\/preview/, "")