Feature implementation from commits 193ae9b..322af8c#2
Feature implementation from commits 193ae9b..322af8c#2codeOwlAI wants to merge 20 commits intofeature-base-branch-2from
Conversation
* pytest bases tests for apiserver * Trimmed spaces * Updated .gitignore for pytest local files
Bumps the pip group with 1 update in the /apiserver/requirements directory: [requests](https://github.com/psf/requests). Updates `requests` from 2.31.0 to 2.32.2 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.31.0...v2.32.2) --- updated-dependencies: - dependency-name: requests dependency-version: 2.32.2 dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: add ARIA attributes * chore: add missing translations * chore: add accessibility translations for multiple languages and configured store according to it * chore: refactor translation file handling and introduce TranslationFiles enum * fix: accessibility issues in workspace sidebar --------- Co-authored-by: JayashTripathy <jayashtripathy371@gmail.com> Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
* refactor: file plugins and types * refactor: image extension storage types * chore: update meta tag name * chore: extension fileset storage key * fix: build errors * refactor: utility extension * refactor: file plugins * chore: remove standalone plugin extensions * chore: refactoring out onCreate into a common utility * refactor: work item embed extension * chore: use extension enums * fix: errors and warnings * refactor: rename extension files * fix: tsup reloading issue * fix: image upload types and heading types * fix: file plugin object reference * fix: iseditable is hard coded * fix: image extension names * fix: collaborative editor editable value * chore: add constants for editor meta as well --------- Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com>
* fix: memoize file upload functions * chore: update extension name * chore: update notation * chore: resolve chokidar package * fix: spelling mistakes
* fix: handle symbols and space * chore: refactor
* fix: return project joining date * fix: added project's joining date * fix: set created_at as read_only_fields --------- Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
…ne#7117) * feat: added a python bg task to crawl work item links for title and description * fix: return meta_data in the response * fix: add validation for accessing IP ranges * fix: remove json.dumps * fix: handle exception by returning None * refactor: call find_favicon_url inside fetch_and_encode_favicon function * chore: type hints * fix: Handle None * fix: remove print statementsg * chore: added favicon and title of links * fix: return null if no title found * Update apiserver/plane/bgtasks/work_item_link_task.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: remove exception handling * fix: reduce timeout seconds * fix: handle timeout exception * fix: remove request timeout handling * feat: add Link icon to issue detail links and update rendering logic * fix: use logger for exception --------- Co-authored-by: sangeethailango <sangeethailango21@gmail.com> Co-authored-by: JayashTripathy <jayashtripathy371@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore: return workspace name and logo in profile settings api * chore: remove unwanted fields * fix: backend * feat: workspace settings * feat: workspce settings + layouting * feat: profile + workspace settings ui * chore: project settings + refactoring * routes * fix: handled no project * fix: css + build * feat: profile settings internal screens upgrade * fix: workspace settings internal screens * fix: external scrolling allowed * fix: css * fix: css * fix: css * fix: preferences settings * fix: css * fix: mobile interface * fix: profile redirections * fix: dark theme * fix: css * fix: css * feat: scroll * fix: refactor * fix: bug fixes * fix: refactor * fix: css * fix: routes * fix: first day of the week * fix: scrolling * fix: refactoring * fix: project -> projects * fix: refactoring * fix: refactor * fix: no authorized view consistency * fix: folder structure * fix: revert * fix: handled redirections * fix: scroll * fix: deleted old routes * fix: empty states * fix: headings * fix: settings description * fix: build --------- Co-authored-by: gakshita <akshitagoyal1516@gmail.com> Co-authored-by: Akshita Goyal <36129505+gakshita@users.noreply.github.com>
| const { editor, filesList, pos, type, uploader } = args; | ||
| const filesArray = Array.from(filesList); | ||
| if (filesArray.length === 0) { |
There was a problem hiding this comment.
🔒 Security Issue
Security: File Validation Removed.
All file validation logic (MIME type and size checks) has been removed, allowing any file type to be uploaded which creates a security vulnerability.
Current Code (Diff):
- const { editor, filesList, pos, type, uploader } = args;
- const filesArray = Array.from(filesList);
- if (filesArray.length === 0) {
+ const { editor, filesList, pos, type, uploader } = args;
+ const filesArray = [];
+ for (let i = 0; i < filesList.length; i += 1) {
+ const file = filesList.item(i);
+ if (file) {
+ filesArray.push(file);
+ }
+ }
+ if (filesArray.length === 0) {📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| const { editor, filesList, pos, type, uploader } = args; | |
| const filesArray = Array.from(filesList); | |
| if (filesArray.length === 0) { | |
| const { editor, filesList, pos, type, uploader } = args; | |
| const filesArray = []; | |
| for (let i = 0; i < filesList.length; i += 1) { | |
| const file = filesList.item(i); | |
| if (file) { | |
| filesArray.push(file); | |
| } | |
| } | |
| if (filesArray.length === 0) { |
🔄 Dependencies Affected
packages/editor/src/core/hooks/use-file-upload.ts
Function: useDropZone
Issue: The useDropZone hook calls uploadFirstFileAndInsertRemaining without validation parameters, expecting validation to happen inside the function
Suggestion: Add validation parameters to the uploadFirstFileAndInsertRemaining call or implement validation before calling it
| editor, | ||
| files: acceptedFiles, | ||
| initialPos: pos, | ||
| event: "drop", |
There was a problem hiding this comment.
🐛 Correctness Issue
Incorrect event type in paste handler.
The handlePaste function uses 'drop' as the event type instead of 'paste', which will cause incorrect tracking and processing of pasted files.
Current Code (Diff):
- event: "drop",
+ event: "paste",📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| event: "drop", | |
| event: "paste", |
🔄 Dependencies Affected
packages/editor/src/core/extensions/custom-image/custom-image.ts
Function: insertImageComponent
Issue: The insertImageComponent function uses the event parameter for tracking files, so using an incorrect event type will cause improper tracking
Suggestion: Update the event parameter to 'paste' to ensure proper file tracking
| } else if (fileType === "attachment") { | ||
| } |
There was a problem hiding this comment.
🐛 Correctness Issue
Empty attachment file handler.
The code detects attachment files but has an empty implementation for handling them, causing a silent failure where users can drop attachments but nothing happens.
Current Code (Diff):
- } else if (fileType === "attachment") {
+ } else if (fileType === "attachment") {
+ // TODO: Implement attachment handling
+ console.error("Attachment handling not implemented yet");📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| } else if (fileType === "attachment") { | |
| } | |
| } else if (fileType === "attachment") { | |
| // TODO: Implement attachment handling | |
| console.error("Attachment handling not implemented yet"); | |
| } |
| @@ -141,7 +141,7 @@ export class IssueLinkStore implements IIssueLinkStore { | |||
| set(this.linkMap, [linkId, key], initialData[key as keyof TIssueLink]); | |||
| }); | |||
| }); | |||
| return initialData; | |||
| throw error; | |||
There was a problem hiding this comment.
🐛 Correctness Issue
Breaking API Change: Error Propagation.
This change modifies error handling to throw errors instead of returning initial data, which could cause application crashes if callers aren't prepared to handle these exceptions.
Current Code (Diff):
- return initialData;
+ throw error;
PR Summary
Editor Improvements: Refactoring and File Handling Enhancements
Overview
This PR implements substantial code refactoring across the editor codebase, replacing string literals with constants from CORE_EXTENSIONS for improved maintainability. It also introduces a new UtilityExtension for file operations, enhances type safety, and improves file handling capabilities.
Change Types
Affected Modules
editor/src/core/extensions/editor/src/core/helpers/editor/src/core/hooks/editor/src/core/plugins/i18n/types/core/store/Notes for Reviewers
Additional Context