Private task link and screenshots#115
Open
veronika-tseleva-cleantalk wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds handling for doBoard “PRIVATE” tasks in the SpotFix widget UI and task-loading pipeline, and improves screenshot generation to avoid transparent backgrounds and to exclude the widget itself from captures.
Changes:
- Hide/disable task title, comments/actions, and other UI elements when the active task is PRIVATE; exclude PRIVATE tasks from the “All spots” list.
- Add task_type propagation through task detail aggregation so the UI can branch on PRIVATE.
- Improve screenshot capture by forcing a non-transparent background color and filtering out the widget element.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| js/src/widget.js | Filters PRIVATE tasks from lists and hides/locks down UI for PRIVATE task view. |
| js/src/main.js | Adds task_type to the object returned by getTaskFullDetails(). |
| js/src/handlers.js | Ensures task details aggregation can proceed even when access is denied. |
| js/src/fileuploader.js | Sets screenshot background color and ignores the widget during capture. |
| js/src/api.js | Adds access-denied handling for task fetches and extends task_get API parameters. |
| dist/doboard-widget-bundle.js | Rebuilt bundle reflecting the source changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1748
to
+1752
| if(taskDetails.task_type === 'PRIVATE'){ | ||
| issuesCommentsContainer.innerHTML = `<span style="text-align: center"> | ||
| This Spot is not available for public viewing. To share it publicly, enable public access in doBoard.com → | ||
| Project → Board → Task Settings. Once enabled, the Spot will be accessible to anyone on the Internet.</span>` | ||
| } |
Comment on lines
+256
to
+260
| const result = await spotfixApiCall(data, 'task_get', accountId); | ||
| const tasks = result.tasks.map((task) => ({ | ||
| taskId: task.task_id, | ||
| taskTitle: task.name, | ||
| userId: task.user_id, | ||
| task_type: task.task_type, | ||
| commentsCount: task.comments_count, | ||
| taskLastUpdate: task.updated, | ||
| taskCreated: task.created, | ||
| taskCreatorTaskUser: task.creator_user_id, | ||
| taskMeta: task.meta, | ||
| taskStatus: task.status, | ||
| viewers: task.comments_viewers, | ||
| taskToken: task.token | ||
| })); | ||
| await spotfixIndexedDB.clearPut(SPOTFIX_TABLE_TASKS, tasks); | ||
| storageSaveTasksCount(tasks); | ||
| return tasks; | ||
|
|
||
| if(result.operation_message === 'Access is denied'){ | ||
| await spotfixIndexedDB.put(SPOTFIX_TABLE_TASKS, {taskId: taskId, task_type: 'PRIVATE', taskMeta:"{}"}); | ||
| return []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://app.doboard.com/1/task/50531