plane/web
M. Palanikannan 0b1efb173f [refactor] Editor code refactoring (#3194)
* removed relative imports from editor core

* Update issue widget file paths and imports to use kebab case instead of camel case, to align with coding conventions and improve consistency.

* Update Tiptap core and extensions versions to 2.1.13 and Tiptap React version to 2.1.13. Update Tiptap table imports to use the new location in package @tiptap/pm/tables. Update AlertLabel component to use the new type definition for LucideIcon.

* updated lock file

* removed default exports from editor/core

* fixed injecting css into the core package itself

* seperated css code to have single source of origin wrt to the package

* removed default imports from document editor

* all instances using index as key while mapping fixed

* Update Lite Text Editor package.json to remove @plane/editor-types as a dependency.

Update Lite Text Editor index.ts to update the import of IMentionSuggestion and IMentionHighlight from @plane/editor-types to @plane/editor-core.

Update Lite Text Editor ui/index.tsx to update the import of UploadImage, DeleteImage, IMentionSuggestion, and RestoreImage from @plane/editor-types to @plane/editor-core.

Update Lite Text Editor ui/menus/fixed-menu/index.tsx to update the import of UploadImage from @plane/editor-types to @plane/editor-core.

Update turbo.json to remove @plane/editor-types#build as a dependency for @plane/lite-text-editor#build, @plane/rich-text-editor#build, and @plane/document-editor#build.

* Remove deprecated import and adjust tippy.js usage in the slash-commands.tsx file of the editor extensions package.

* Update dependencies in `rich-text-editor/package.json`, remove `@plane/editor-types` and add `@plane/editor-core` in `rich-text-editor/src/index.ts`, and update imports in `rich-text-editor/src/ui/extensions/index.tsx` and `rich-text-editor/src/ui/index.tsx` to use `@plane/editor-core` instead of `@plane/editor-types`.

* Update package.json dependencies and add new types for image deletion, upload, restore, mention highlight, mention suggestion, and slash command item.

* Update import statements in various files to use the new package "@plane/editor-core" instead of "@plane/editor-types".

* fixed document editor to follow conventions

* Refactor imports in the Rich Text Editor package to use relative paths instead of absolute paths.

- Updated imports in `index.ts`, `ui/index.tsx`, and `ui/menus/bubble-menu/index.tsx` to use relative paths.
- Updated `tsconfig.json` to include the `baseUrl` compiler option and adjust the `include` and `exclude` paths.

* Refactor Lite Text Editor code to use relative import paths instead of absolute import paths.

* Added LucideIconType to the exports in index.ts for use in other files.
Created a new file lucide-icon.ts which contains the type LucideIconType.
Updated the icon type in HeadingOneItem in menu-items/index.tsx to use LucideIconType.
Updated the Icon type in AlertLabel in alert-label.tsx to use LucideIconType.
Updated the Icon type in VerticalDropdownItemProps in vertical-dropdown-menu.tsx to use LucideIconType.
Updated the Icon type in BubbleMenuItem in fixed-menu/index.tsx to use LucideIconType.
Deleted the file tooltip.tsx since it is no longer used.
Updated the Icon type in BubbleMenuItem in bubble-menu/index.tsx to use LucideIconType.

* ♻️ refactor: simplify rendering logic in slash-commands.tsx

The rendering logic in the file "slash-commands.tsx" has been simplified. Previously, the code used inline positioning for the popup, but it has now been removed. Instead of appending the popup to the document body, it is now appended to the element with the ID "tiptap-container". The "flip" option has also been removed. These changes have improved the readability and maintainability of the code.

* fixed build errors caused due to core's internal imports

* regression: fixed pages not saving issue and not duplicating with proper content issue

* build: Update @tiptap dependencies

Updated the @tiptap dependencies in the package.json files of `document-editor`, `extensions`, and `rich-text-editor` packages to version 2.1.13.

* 🚑 fix: Correct appendTo selector in slash-commands.tsx

Update the `appendTo` function call in `slash-commands.tsx` to use the correct selector `#editor-container` instead of `#tiptap-container`. This ensures that the component is appended to the appropriate container in the editor extension.

Note: The commit message assumes that the change is a fix for an issue or error. If it's not a fix, please provide more context so that an appropriate commit type can be determined.
2023-12-22 18:10:18 +05:30
..
components fix: bugs & improvements (#3189) 2023-12-22 18:09:41 +05:30
constants chore: resolve priority sorting order (#3141) 2023-12-15 17:37:37 +05:30
contexts chore: format all files in monorepo (#3054) 2023-12-10 15:50:45 +05:30
helpers chore: state sequence ordering (#3130) 2023-12-14 16:45:39 +05:30
hooks fix: spreadsheet layout sub-issues property update (#3110) 2023-12-13 23:07:26 +05:30
layouts chore: disable API calls for un-authorized users (#3144) 2023-12-17 00:35:53 +05:30
lib fix: remove get requests from the catch block (#3135) 2023-12-14 19:55:45 +05:30
pages [refactor] Editor code refactoring (#3194) 2023-12-22 18:10:18 +05:30
public chore: image file update, icon consistency, bug fixes and code refactor (#3107) 2023-12-13 23:03:54 +05:30
services chore: issue link mobx integration (#3072) 2023-12-11 22:26:29 +05:30
store fix: bug fixes & improvements (#3159) 2023-12-18 14:59:25 +05:30
styles [refactor] Editor code refactoring (#3194) 2023-12-22 18:10:18 +05:30
types chore: workspace roles (#3024) 2023-12-07 19:59:35 +05:30
.env.example chore: configurations (#3059) 2023-12-11 14:32:28 +05:30
.eslintrc.js chore: eslint config package fixes (#2165) 2023-09-13 12:06:17 +05:30
.prettierignore chore: format all files in monorepo (#3054) 2023-12-10 15:50:45 +05:30
.prettierrc fix: Implementing mobx, refactoring service layer and rewriting components (#2441) 2023-10-15 23:50:12 +05:30
Dockerfile.dev fix: environment file missing for space (#3105) 2023-12-14 16:18:02 +05:30
Dockerfile.web [chore] Update setup.sh, with removed replacement script & added project-level ENVs (#2115) 2023-09-13 20:21:02 +05:30
google.d.ts New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30
manifest.json New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30
next-env.d.ts New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30
next.config.js fix: removed unused packages and upgraded to next 14 (#2944) 2023-12-07 19:59:35 +05:30
package.json fix: upgrading lucide react dependency (#3057) 2023-12-10 17:54:36 +05:30
postcss.config.js feat: Editor Core Packaging and Restructuring (#2358) 2023-10-13 12:05:49 +05:30
sentry.client.config.js New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30
sentry.edge.config.js New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30
sentry.properties New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30
sentry.server.config.js New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30
tailwind.config.js feat: Editor Core Packaging and Restructuring (#2358) 2023-10-13 12:05:49 +05:30
tsconfig.json New Directory Setup (#2065) 2023-09-03 18:50:30 +05:30