Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove header-list and toolbar-tip internal dependencies #178

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

zzxming
Copy link
Collaborator

@zzxming zzxming commented Dec 28, 2024

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

请先合并 #176 以保证此 pr 没有冲突

内部存在两处硬编码(搜索TODO可查看),之后可再寻找其他解决方案

Summary by CodeRabbit

  • New Features

    • Added documentation for toolbar tip functionality.
    • Introduced new sidebar menu item for toolbar tips in documentation.
    • Enhanced editor with header list and toolbar tip modules.
  • Dependencies

    • Removed quill package.
    • Added quill-header-list and quill-toolbar-tip plugins.
  • Documentation

    • Created new documentation for toolbar tip feature.
    • Updated installation and usage instructions for new modules.
  • Refactor

    • Simplified toolbar configuration.
    • Updated module registration and language handling in FluentEditor.

Copy link

coderabbitai bot commented Dec 28, 2024

Walkthrough

This pull request introduces several enhancements to the Fluent Editor documentation and core functionality. Key changes include the addition of a new sidebar menu item for '工具栏提示', updates to toolbar configurations, the introduction of a new Vue component for toolbar tips, and modifications to dependency management. The overall structure of the editor's module registration and internationalization approach has been streamlined, focusing on improving plugin integration and user guidance.

Changes

File Change Summary
packages/docs/fluent-editor/.vitepress/sidebar.ts Added new sidebar menu item '工具栏提示' with link '/docs/toolbar-tip'
packages/docs/fluent-editor/demos/add-toolbar-item.vue Streamlined toolbar configuration, removed toolbar-tip mapping
packages/docs/fluent-editor/demos/header-list-container.vue Imported HeaderList, modified toolbar configuration to object format
packages/docs/fluent-editor/demos/header-list.vue Imported HeaderList, updated toolbar configuration and added better-table
packages/docs/fluent-editor/demos/toolbar-tip.vue Introduced new Vue component for toolbar tips with setup syntax
packages/docs/fluent-editor/docs/header-list.md Added installation section for quill-header-list plugin
packages/docs/package.json Removed quill, added quill-header-list and updated quill-toolbar-tip
packages/fluent-editor/package.json Removed quill-header-list and quill-toolbar-tip dependencies
packages/fluent-editor/src/assets/style.scss Removed import for quill-header-list CSS
packages/fluent-editor/src/assets/toolbar.scss Restructured .toolbar-tip__tooltip class, removed quill-toolbar-tip CSS import
packages/fluent-editor/src/config/types/type.ts Added new type alias Constructor
packages/fluent-editor/src/fluent-editor.ts Updated language handling, added lang and langText properties
packages/fluent-editor/src/index.ts Modified import/export statements for FluentEditor
packages/fluent-editor/src/table/formats/header.ts Updated Header class to extend OriginHeader
packages/fluent-editor/src/table/modules/table-operation-menu.ts Changed event handling for CHANGE_LANGUAGE_EVENT
packages/fluent-editor/src/toolbar/toolbar-tip.ts Transformed ToolbarTip class to generateToolbarTip function
packages/docs/fluent-editor/docs/toolbar-tip.md Added documentation for the toolbar-tip feature

Possibly related PRs

  • feat: screenshot #75: The main PR adds a new sidebar menu item for '工具栏提示', which relates to the addition of a new feature for tooltips in the toolbar, enhancing user guidance.
  • feat: base toolbar tip #128: The main PR introduces a new toolbar configuration that includes alignment options, which is relevant to the overall customization of the toolbar, similar to the changes made in the main PR.
  • feat: header-list #146: The main PR adds a header list feature, which is related to enhancing the toolbar's functionality, similar to the addition of new items in the sidebar.
  • feat(blot): Add divider module to toolbar #167: The main PR adds a divider to the toolbar, which aligns with the theme of enhancing toolbar options and user interface elements.
  • refactor: extract i18n to class module #176: The main PR refactors the i18n functionality, which is relevant to the localization aspects of the toolbar and sidebar updates in the main PR.

Suggested reviewers

  • kagol

Poem

🐰 A Rabbit's Ode to Editor's Delight
Toolbar tips dancing, sidebar bright,
Modules weaving with linguistic might,
Quill's plugins pirouette and spin,
Documentation's journey begins!
Code evolves with playful grace 🎉

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 28, 2024
Copy link

Walkthrough

This pull request removes internal dependencies on header-list and toolbar-tip from the fluent-editor package. It introduces new modules quill-header-list and quill-toolbar-tip as external dependencies, updates the i18n configuration, and modifies the toolbar configuration. The changes also include updates to documentation and build configurations.

Changes

Files Summary
packages/docs/fluent-editor/.vitepress/sidebar.ts, packages/docs/fluent-editor/docs/other-modules.md Updated sidebar and added documentation for new modules.
packages/docs/fluent-editor/demos/* Removed internal dependencies and updated demos to use new modules.
packages/fluent-editor/src/* Refactored code to remove internal dependencies and update configurations.
pnpm-lock.yaml, packages/*/package.json Updated package dependencies and lock file.

@zzxming zzxming force-pushed the chore-module-extract branch from ee699aa to 36e3f95 Compare December 28, 2024 18:14
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.

Actionable comments posted: 1

🧹 Nitpick comments (13)
packages/fluent-editor/src/config/types/editor-config.interface.ts (1)

17-20: Preserve explicit types for clarity.

Dropping the explicit File type can reduce clarity. Keeping it ensures that callers don't inadvertently pass incompatible objects.

 imageUpload?: ({ file, callback, editor }: { file: File; callback: Function; editor: any }) => void
 ...
 fileUpload?: ({ file, callback, editor }: { file: File; callback: Function; editor: any }) => void
packages/fluent-editor/src/i18n/index.ts (2)

11-15: Remove unused isFullscreen if not needed.

isFullscreen is declared but never used. Remove to streamline the class definition unless you plan to add relevant functionality later.

-export class I18N {
-  isFullscreen: boolean = false
-  options: I18NOptions = {
+export class I18N {
+  options: I18NOptions = {
     lang: 'en-US',
     langText: LANG_CONF['en-US'],
 }

17-19: Double-check Object.assign usage order.

Object.assign({}, options, this.resolveLanguageOption(options || {})) merges user-provided options before the resolved defaults. Generally, you want defaults first and user overrides last.

- this.options = Object.assign({}, options, this.resolveLanguageOption(options || {}))
+ this.options = Object.assign({}, this.resolveLanguageOption(options || {}), options)
packages/docs/fluent-editor/demos/toolbar-tip.vue (1)

17-19: Consider avoiding direct assignment to global objects.
Assigning hljs, katex, or Html2Canvas to the window object can pollute global scope, making it more difficult to maintain or debug. A more localized import or a dedicated plugin might be preferable.

packages/fluent-editor/src/counter/index.ts (1)

36-37: User-facing language text.
Selecting the correct label for char vs. word is crucial for accurate user feedback. This logic is straightforward and appears correct, but consider adding more descriptive labels if your user base has broader language needs.

packages/fluent-editor/src/table/formats/header.ts (1)

6-8: Extending OriginHeader effectively customizes Quill’s built-in header blot.
This aligns your code with Quill’s internal approach. Just confirm that dynamic attributes introduced (data-xxx) do not break other Quill modules.

packages/fluent-editor/src/link/modules/tooltip.ts (1)

50-50: Gracefully handle missing langText entries.

Using optional chaining for this.quill.langText?.linkplaceholder is good. However, consider a fallback or default string if langText or linkplaceholder is undefined, preventing potential user confusion or blank placeholders in exceptional cases.

packages/fluent-editor/src/custom-clipboard.ts (2)

157-157: Handle missing or empty translation safely.

Updating the clipboard container with this.quill.langText.pasting is correct, but consider verifying this string to ensure a default or localized fallback if it's missing or empty. This prevents placeholder values from appearing in production or leading to runtime errors if undefined.


474-474: Provide a more descriptive placeholder for image copy errors.

Using this.quill.langText['img-error'] fosters better i18n but be sure it is user-friendly and highlights the nature of the error. Include best practices for user-friendly and accessible error messages.

packages/fluent-editor/src/table/modules/table-operation-menu.ts (2)

67-69: Trigger re-initialization with minimal side effects.

Calling this.destroy() upon CHANGE_LANGUAGE_EVENT can abruptly remove the menu. Consider a more granular approach: reset only the necessary properties and re-render to avoid losing user context, especially if the user is actively interacting with the menu.


75-75: Audit direct usage of langText.

Using const langText = this.quill.langText is clear, but ensure consistent usage across the file to prevent confusion between langText references. If large-scale i18n changes arise, consider a single i18n management module to streamline updates.

packages/fluent-editor/src/fullscreen/handler.ts (1)

30-32: Improve type safety by avoiding 'any' type assertion

The type assertion to any reduces type safety. Consider creating an interface for the toolbar-tip module and using proper typing:

+ interface ToolbarTipModule {
+   hideAllTips(): void;
+ }

- const toolbarTipModule = toolbar.quill.getModule('toolbar-tip') as any;
+ const toolbarTipModule = toolbar.quill.getModule('toolbar-tip') as ToolbarTipModule;

Also applies to: 46-48

packages/fluent-editor/src/assets/toolbar.scss (1)

4-12: Consider the implications of increased selector specificity

Moving .toolbar-tip__tooltip under the html selector increases specificity, which:

  1. Makes it harder to override these styles
  2. Could impact theme customization flexibility

Consider using CSS custom properties (variables) for theming instead of nesting under html to maintain lower specificity while achieving the same encapsulation goals.

-html {
-  .toolbar-tip__tooltip {
+.toolbar-tip__tooltip {
    @include setCssVar(text-color, #ffffff);
    @include setCssVar(bg-color, #303133);

    z-index: $fullscreenZIndex-full;
    color: getCssVar(text-color);
    background-color: getCssVar(bg-color);
-  }
}
🛑 Comments failed to post (1)
packages/fluent-editor/src/config/types/editor-config.interface.ts (1)

28-31: 💡 Codebase verification

Migration needed: Top-level lang and langText properties are still in use

Based on the verification results, there are instances where the old top-level lang and langText properties are still being used:

  • In packages/fluent-editor/src/fluent-editor.ts, the class has top-level properties lang and langText
  • Several demo files still use the top-level configuration:
    • packages/docs/fluent-editor/demos/toolbar-tip.vue: uses top-level lang
    • packages/docs/fluent-editor/demos/add-toolbar-item.vue: uses top-level lang
    • packages/docs/fluent-editor/demos/table-text-options.vue: uses top-level langText

However, the new i18n module implementation is already in use as seen in packages/docs/fluent-editor/demos/i18n.vue, which properly uses the new structure under the modules configuration.

🔗 Analysis chain

Confirm the optional i18n usage and usage coverage.

Wrapping lang and langText under i18n clarifies the intent. Ensure that existing calls referencing lang or langText at the top level are properly migrated to the i18n object.


Let me gather more information to understand the full context of these changes.


Let me try one more search to find any existing i18n object usage in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Searching any legacy references to top-level lang/langText in config
rg -A 5 "lang: " | rg -v "i18n"
rg -A 5 "langText: " | rg -v "i18n"

Length of output: 2279


Script:

#!/bin/bash
# Check the FluentEditor class implementation and its usage of i18n config
ast-grep --pattern 'class FluentEditor {
  $$$
}'

# Check for any i18n usage in the codebase
rg -A 5 "i18n\." 

Length of output: 385


Script:

#!/bin/bash
# Search for i18n object configuration in the codebase
rg -A 5 "i18n: {" 

# Check the content of the i18n demo file
cat packages/docs/fluent-editor/demos/i18n.vue

Length of output: 1253

@zzxming zzxming added refactoring and removed documentation Improvements or additions to documentation labels Dec 28, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 28, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (6)
packages/docs/fluent-editor/demos/header-list.vue (2)

12-13: Add error handling for dynamic import.

The dynamic import should include error handling to gracefully handle import failures.

-  import('@opentiny/fluent-editor').then(({ default: FluentEditor }) => {
+  import('@opentiny/fluent-editor')
+    .then(({ default: FluentEditor }) => {
       FluentEditor.register({ 'modules/header-list': HeaderList }, true)
+    })
+    .catch(error => {
+      console.error('Failed to load FluentEditor:', error)
+    })

Line range hint 69-71: Consider internationalizing the static text.

The text "基本用法" should be internationalized for better maintainability and global usage.

Consider using Vue's i18n system:

- <p>基本用法</p>
+ <p>{{ t('basicUsage') }}</p>

And define translations in a separate locale file.

packages/docs/fluent-editor/demos/toolbar-tip.vue (1)

43-61: Add error handling for dynamic import

The dynamic import lacks error handling which could lead to silent failures in production.

  onMounted(() => {
    import('@opentiny/fluent-editor')
+     .catch((error) => {
+       console.error('Failed to load FluentEditor:', error)
+     })
  })
packages/fluent-editor/src/toolbar/toolbar-tip.ts (3)

7-11: Improve type safety for options parameter

The Partial<Record<string, any>> type is too permissive. Consider creating a specific interface for the options to improve type safety.

-constructor(public quill: FluentEditor, options: Partial<Record<string, any>>)
+interface ToolbarTipOptions {
+  tipTextMap?: Record<string, string | { onShow: (target?: HTMLElement, value?: string) => string }>;
+  // Add other option properties as needed
+}
+constructor(public quill: FluentEditor, options: Partial<ToolbarTipOptions>)

20-88: Improve code organization by extracting tooltip map builders

The resolveOptions method contains complex logic for building different types of tooltip maps. Consider extracting these into separate methods for better maintainability.

+private buildButtonTips(langText: Record<string, string>): Record<string, string> {
+  return ['bold', 'italic', /* ... */].reduce((map, name) => {
+    map[name] = langText[name]
+    return map
+  }, {} as Record<string, string>)
+}

+private buildSelectTips(langText: Record<string, string>): Record<string, any> {
+  return ['color', 'background', /* ... */].reduce((map, name) => {
+    map[name] = { onShow: () => langText[name] }
+    return map
+  }, {})
+}

 resolveOptions(options: Partial<Record<string, any>>): Record<string, any> {
   const result = super.resolveOptions(options)
   if (!this.quill.langText) return result
   const langText = this.quill.langText
-  const btnTips = [/* ... */].reduce(/* ... */)
-  const selectTips = [/* ... */].reduce(/* ... */)
+  const btnTips = this.buildButtonTips(langText)
+  const selectTips = this.buildSelectTips(langText)
   // ...
 }

89-105: Document tipTextMap override behavior

Add a comment explaining that user-provided tipTextMap values take precedence over default values.

+      // User-provided tipTextMap values override default tooltip text
       tipTextMap: {
         ...textMap,
         ...options.tipTextMap,
       },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee699aa and 36e3f95.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • packages/docs/fluent-editor/.vitepress/sidebar.ts (1 hunks)
  • packages/docs/fluent-editor/demos/add-toolbar-item.vue (1 hunks)
  • packages/docs/fluent-editor/demos/header-list-container.vue (0 hunks)
  • packages/docs/fluent-editor/demos/header-list.vue (1 hunks)
  • packages/docs/fluent-editor/demos/i18n-custom.vue (1 hunks)
  • packages/docs/fluent-editor/demos/i18n.vue (1 hunks)
  • packages/docs/fluent-editor/demos/toolbar-tip.vue (1 hunks)
  • packages/docs/fluent-editor/docs/header-list.md (0 hunks)
  • packages/docs/fluent-editor/docs/other-modules.md (1 hunks)
  • packages/docs/package.json (1 hunks)
  • packages/fluent-editor/package.json (1 hunks)
  • packages/fluent-editor/src/assets/style.scss (0 hunks)
  • packages/fluent-editor/src/assets/toolbar.scss (1 hunks)
  • packages/fluent-editor/src/config/types/editor-config.interface.ts (1 hunks)
  • packages/fluent-editor/src/config/types/type.ts (1 hunks)
  • packages/fluent-editor/src/counter/index.ts (4 hunks)
  • packages/fluent-editor/src/custom-clipboard.ts (2 hunks)
  • packages/fluent-editor/src/fluent-editor.ts (5 hunks)
  • packages/fluent-editor/src/fullscreen/handler.ts (2 hunks)
  • packages/fluent-editor/src/i18n/index.ts (1 hunks)
  • packages/fluent-editor/src/index.ts (1 hunks)
  • packages/fluent-editor/src/link/modules/tooltip.ts (1 hunks)
  • packages/fluent-editor/src/table/formats/header.ts (1 hunks)
  • packages/fluent-editor/src/table/modules/table-operation-menu.ts (2 hunks)
  • packages/fluent-editor/src/toolbar/toolbar-tip.ts (1 hunks)
💤 Files with no reviewable changes (3)
  • packages/fluent-editor/src/assets/style.scss
  • packages/docs/fluent-editor/docs/header-list.md
  • packages/docs/fluent-editor/demos/header-list-container.vue
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/docs/fluent-editor/demos/i18n-custom.vue
  • packages/fluent-editor/src/config/types/type.ts
  • packages/docs/package.json
  • packages/docs/fluent-editor/docs/other-modules.md
  • packages/fluent-editor/src/index.ts
  • packages/fluent-editor/src/custom-clipboard.ts
  • packages/fluent-editor/src/assets/toolbar.scss
  • packages/fluent-editor/src/table/modules/table-operation-menu.ts
  • packages/docs/fluent-editor/.vitepress/sidebar.ts
  • packages/fluent-editor/src/counter/index.ts
  • packages/docs/fluent-editor/demos/add-toolbar-item.vue
  • packages/fluent-editor/src/fullscreen/handler.ts
  • packages/fluent-editor/package.json
  • packages/fluent-editor/src/link/modules/tooltip.ts
  • packages/docs/fluent-editor/demos/i18n.vue
  • packages/fluent-editor/src/i18n/index.ts
  • packages/fluent-editor/src/config/types/editor-config.interface.ts
🔇 Additional comments (8)
packages/docs/fluent-editor/demos/header-list.vue (3)

2-4: LGTM! Proper migration to external package.

The change from internal dependencies to the external quill-header-list package aligns with the PR objectives. The imports are correctly structured.


18-25: Verify toolbar configuration structure.

The toolbar configuration has been significantly changed to an object-based structure. Please ensure this matches the expected format in the documentation.

Consider extracting the toolbar configuration to a separate constant for better maintainability and reusability.


29-29: Configure or remove empty better-table module.

The better-table module is included but has no configuration. Either provide proper configuration or remove if not needed.

Run this script to check if better-table is used elsewhere:

packages/docs/fluent-editor/demos/toolbar-tip.vue (1)

23-41: ⚠️ Potential issue

Remove header-list from toolbar configuration

The toolbar configuration still includes 'header-list' which contradicts the PR objective of removing header-list dependencies.

  ['link', 'blockquote', 'code', 'code-block'],
  ['image', 'file', 'better-table'],
- ['emoji', 'video', 'formula', 'screenshot', 'fullscreen', 'header-list'],
+ ['emoji', 'video', 'formula', 'screenshot', 'fullscreen'],

Likely invalid or redundant comment.

packages/fluent-editor/src/table/formats/header.ts (2)

Line range hint 9-24: LGTM: Clean implementation with proper type declarations

The class implementation maintains all necessary functionality while properly declaring types for TypeScript. The static create method correctly delegates to the parent class while preserving custom attribute handling.


1-2: Verify type safety with Quill's header format

The transition from HeaderWithID to OriginHeader looks good and aligns with the PR objective of removing internal dependencies. However, let's ensure type safety:

Also applies to: 6-6, 8-8

✅ Verification successful

Let me gather more information about the header format implementation to ensure type safety.


Type safety is maintained with Quill's header format implementation

The verification shows that:

  • The Header class properly extends OriginHeader and maintains all necessary type definitions and methods
  • No other files in the codebase reference HeaderWithID, confirming clean removal
  • The implementation preserves all required Quill header functionality including:
    • Static methods: create() and formats()
    • Instance methods: format() and optimize()
    • Required static properties: blotName and tagName
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if HeaderWithID is still referenced elsewhere in the codebase
rg "HeaderWithID" 

# Verify if there are any other direct dependencies on quill header format
rg -l "from 'quill/formats/header'"

Length of output: 112


Script:

#!/bin/bash
# Check the implementation details of the header format
ast-grep --pattern 'class $_ extends $_ {
  $$$
}'  packages/fluent-editor/src/table/formats/header.ts

# Check for any usage or references to header format methods
rg -A 3 "Header\." packages/fluent-editor/src/table/formats/header.ts

Length of output: 9699

packages/fluent-editor/src/fluent-editor.ts (2)

Line range hint 56-146: LGTM: Toolbar handlers properly maintained

The toolbar handlers are well-maintained with proper functionality for formula, table, and list operations. The implementation is clean and maintains backward compatibility.


16-16: Verify i18n integration completeness

The addition of lang and langText properties along with the I18N module import looks good, but let's ensure the integration is complete:

Also applies to: 34-35

✅ Verification successful

I18n integration is properly implemented and complete

The verification shows that the i18n integration is complete and well-implemented:

  • I18N module is properly registered in the editor's default modules
  • FluentEditor class has the required lang and langText properties
  • Language change events (CHANGE_LANGUAGE_EVENT) are properly handled across components
  • The I18N class has complete implementation with proper language resolution and change management
  • Old i18n implementations are properly contained within the new I18N module
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any remaining old i18n implementations
rg "resolveLanguageOption|changeLanguage"

# Verify i18n usage across components
rg -l "this\.lang|this\.langText"

Length of output: 792


Script:

#!/bin/bash
# Let's check for i18n module registration and usage
ast-grep --pattern 'class I18N {
  $$$
}'

# Check FluentEditor for i18n integration
ast-grep --pattern 'class FluentEditor {
  $$$
}'

# Check for i18n-related imports and usage patterns
rg -A 3 "import.*I18N"

Length of output: 3532


Script:

#!/bin/bash
# Let's check for module registration in FluentEditor
rg -A 10 "registerModule|Quill\.register" packages/fluent-editor/src/fluent-editor.ts

# Check for any i18n event handling
rg "CHANGE_LANGUAGE_EVENT|emitter\.emit.*language"

# Check for language-related properties in FluentEditor
ast-grep --pattern 'class FluentEditor extends Quill {
  $$$
}'

Length of output: 2492

packages/docs/fluent-editor/demos/toolbar-tip.vue Outdated Show resolved Hide resolved
packages/fluent-editor/src/fluent-editor.ts Outdated Show resolved Hide resolved
@kagol
Copy link
Member

kagol commented Dec 30, 2024

@zzxming 这个PR包含了 PR #176 中的提交,PR #176 已合入,应该移除这部分。

@kagol
Copy link
Member

kagol commented Dec 30, 2024

@zzxming 其实我觉得这两个模块demo可以平铺出来,不用移除之前的demo,使用者一般只关注功能,我们的demo只需要把功能演示清楚即可。

后续可以再做一个 API 文档,用来呈现全部的 API 和模块说明等。

@zzxming zzxming force-pushed the chore-module-extract branch from 36e3f95 to 91c0888 Compare December 31, 2024 12:56
@zzxming
Copy link
Collaborator Author

zzxming commented Dec 31, 2024

两个模块demo可以平铺出来,不用移除之前的demo,使用者一般只关注功能,我们的demo只需要把功能演示清楚即可。

保留了之前的 demo,新增一个 demo 用于演示 toolbar-tip 功能

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (2)
packages/fluent-editor/src/fluent-editor.ts (2)

The review comment is correct - lang and langText properties are not initialized in the constructor

Based on the code inspection:

  • The FluentEditor class declares lang: string and langText: Record<string, string> as class properties
  • The constructor only calls super(container, options) without initializing these properties
  • This could indeed lead to undefined behavior when these properties are accessed

The suggested fix in the review comment is appropriate:

constructor(container: HTMLElement | string, options: IEditorConfig = {}) {
   this.lang = options.lang || 'en'
   this.langText = options.langText || {}
   super(container, options)
}
🔗 Analysis chain

Line range hint 31-34: Verify initialization of new i18n properties.

The new lang and langText properties are added but not initialized in the constructor. This could lead to undefined behavior.

constructor(container: HTMLElement | string, options: IEditorConfig = {}) {
+   this.lang = options.lang || 'en'
+   this.langText = options.langText || {}
    super(container, options)
}

Let me verify the initialization of the new i18n properties by examining the codebase.


Let me search for more specific information about the constructor and interface.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Check the constructor implementation and i18n property usage
ast-grep --pattern 'constructor(container: HTMLElement | string, options: IEditorConfig = {}) {
  $$$
}'

# Search for IEditorConfig interface definition
ast-grep --pattern 'interface IEditorConfig {
  $$$
}'

# Look for any usage of lang and langText properties
rg "lang|langText" packages/fluent-editor/src/fluent-editor.ts

Length of output: 278


Script:

#!/bin/bash
# Search for the complete FluentEditor class implementation
ast-grep --pattern 'export class FluentEditor extends Quill {
  $$$
}'

# Search for the complete IEditorConfig interface
rg -A 10 "interface IEditorConfig" packages/fluent-editor/src/fluent-editor.ts

Length of output: 862


Dependencies require cleanup in multiple files

The verification shows active dependencies that need to be removed:

  1. Export statements still reference toolbar-tip:

    • packages/fluent-editor/src/index.ts: export * from './toolbar/toolbar-tip'
    • packages/fluent-editor/src/toolbar/index.ts: export * from './toolbar-tip'
  2. Active usage in code:

    • packages/fluent-editor/src/toolbar/toolbar-tip.ts: Contains 'header-list' reference in code
    • packages/fluent-editor/src/fullscreen/handler.ts: Uses toolbar-tip module
    • packages/fluent-editor/src/config/i18n/: Both language files contain 'header-list' translations
  3. Documentation and demo files still present:

    • Multiple files in packages/docs/fluent-editor/ containing both header-list and toolbar-tip

These files need to be updated to remove the dependencies completely. The changes should include:

  • Removing export statements for toolbar-tip
  • Removing the toolbar-tip module usage in fullscreen handler
  • Cleaning up i18n translations
  • Removing or updating related documentation and demos
🔗 Analysis chain

Line range hint 1-196: Verify complete removal of dependencies.

While this file has been updated to remove HeaderList and ToolbarTip dependencies, please ensure all related files mentioned in the previous review are also cleaned up:

  • pnpm-lock.yaml
  • packages/fluent-editor/src/index.ts
  • packages/fluent-editor/src/toolbar/index.ts
  • packages/fluent-editor/src/fullscreen/handler.ts
  • packages/docs/package.json
  • packages/docs/fluent-editor/
  • packages/fluent-editor/src/assets/toolbar.scss
  • packages/fluent-editor/src/config/i18n/

Dependencies still present in multiple locations

The verification shows that HeaderList and ToolbarTip references are still present in several files:

  • Package files:

    • pnpm-lock.yaml
  • Source files:

    • packages/fluent-editor/src/index.ts
    • packages/fluent-editor/src/toolbar/toolbar-tip.ts
    • packages/fluent-editor/src/toolbar/index.ts
    • packages/fluent-editor/src/fullscreen/handler.ts
    • packages/fluent-editor/src/assets/toolbar.scss
    • packages/fluent-editor/src/config/i18n/zh-cn.ts
    • packages/fluent-editor/src/config/i18n/en-us.ts
  • Documentation:

    • packages/docs/package.json
    • packages/docs/fluent-editor/demos/header-list.vue
    • packages/docs/fluent-editor/demos/header-list-container.vue
    • packages/docs/fluent-editor/docs/header-list.md
    • packages/docs/fluent-editor/docs/toolbar-tip.md
    • packages/docs/fluent-editor/demos/toolbar-tip.vue

Let's examine the actual content of these files to understand the extent of the dependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify complete removal of dependencies
echo "Checking for remaining HeaderList and ToolbarTip references..."

# Check package files
echo "Checking package files..."
rg -l "header-list|toolbar-tip" "package.json" "pnpm-lock.yaml"

# Check source files
echo "Checking source files..."
rg -l "header-list|toolbar-tip" "packages/fluent-editor/src/"

# Check documentation
echo "Checking documentation..."
rg -l "header-list|toolbar-tip" "packages/docs/"

Length of output: 1108


Script:

#!/bin/bash
# Check the content of source files
echo "Content of index.ts:"
rg -A 5 "header-list|toolbar-tip" "packages/fluent-editor/src/index.ts"

echo -e "\nContent of toolbar files:"
rg -A 5 "header-list|toolbar-tip" "packages/fluent-editor/src/toolbar/"

echo -e "\nContent of handler.ts:"
rg -A 5 "header-list|toolbar-tip" "packages/fluent-editor/src/fullscreen/handler.ts"

echo -e "\nContent of i18n files:"
rg -A 5 "header-list|toolbar-tip" "packages/fluent-editor/src/config/i18n/"

Length of output: 1839

🧹 Nitpick comments (5)
packages/fluent-editor/src/toolbar/toolbar-tip.ts (3)

73-74: Improve type safety for value parameter

The value parameter in the onShow callback could benefit from more specific typing rather than using string.

-          onShow(target: HTMLElement, value: string) {
+          onShow(target: HTMLElement, value: 'rtl' | 'ltr' | string) {

77-84: Consider using enum or constants for default values

The default values for 'align' and 'header' could be defined as constants to improve maintainability.

+const DEFAULT_VALUES = {
+  align: 'left',
+  header: 'normal'
+} as const;

 if (!value) {
   if (name === 'align') {
-    value = 'left'
+    value = DEFAULT_VALUES.align
   }
   else if (name === 'header') {
-    value = 'normal'
+    value = DEFAULT_VALUES.header
   }
 }

90-99: Consider extracting fullscreen tip logic

The fullscreen tip logic could be extracted into a separate function for better readability and reusability.

+      const getFullscreenTip = (quill: FluentEditor, langText: Record<string, string>) => {
+        return {
+          onShow: () => langText[quill.isFullscreen ? 'exit-fullscreen' : 'fullscreen']
+        }
+      }

       const textMap = {
         ...btnTips,
         ...valueControlTips,
         ...selectTips,
-        fullscreen: {
-          onShow: () => {
-            return langText[this.quill.isFullscreen ? 'exit-fullscreen' : 'fullscreen']
-          },
-        },
+        fullscreen: getFullscreenTip(this.quill, langText),
       }
packages/fluent-editor/src/fluent-editor.ts (2)

Line range hint 82-121: Consider refactoring the list handler for better maintainability.

The list handler contains complex table-related logic. Consider extracting this into a separate function or utility class to improve readability and maintainability.

- 'list': function (value) {
+ 'list': function (value) {
+   this.handleListWithTables(value)
+ },

+ private handleListWithTables(value) {
    const range = this.quill.getSelection()
    const formats = this.quill.getFormat(range)
    // ... rest of the existing logic
  }

Line range hint 171-171: Remove outdated comment about HeaderList dependency.

The comment "make sure register after HeaderList" is outdated since HeaderList has been removed as an internal dependency.

- // make sure register after `HeaderList`
  'modules/better-table': BetterTable,
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36e3f95 and 91c0888.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • packages/docs/fluent-editor/.vitepress/sidebar.ts (1 hunks)
  • packages/docs/fluent-editor/demos/add-toolbar-item.vue (1 hunks)
  • packages/docs/fluent-editor/demos/header-list-container.vue (1 hunks)
  • packages/docs/fluent-editor/demos/header-list.vue (1 hunks)
  • packages/docs/fluent-editor/demos/toolbar-tip.vue (1 hunks)
  • packages/docs/fluent-editor/docs/header-list.md (1 hunks)
  • packages/docs/fluent-editor/docs/toolbar-tip.md (1 hunks)
  • packages/docs/package.json (1 hunks)
  • packages/fluent-editor/package.json (1 hunks)
  • packages/fluent-editor/src/assets/style.scss (0 hunks)
  • packages/fluent-editor/src/assets/toolbar.scss (1 hunks)
  • packages/fluent-editor/src/config/types/type.ts (1 hunks)
  • packages/fluent-editor/src/fluent-editor.ts (1 hunks)
  • packages/fluent-editor/src/fullscreen/handler.ts (2 hunks)
  • packages/fluent-editor/src/index.ts (1 hunks)
  • packages/fluent-editor/src/table/formats/header.ts (1 hunks)
  • packages/fluent-editor/src/table/modules/table-operation-menu.ts (1 hunks)
  • packages/fluent-editor/src/toolbar/toolbar-tip.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/fluent-editor/src/assets/style.scss
🚧 Files skipped from review as they are similar to previous changes (13)
  • packages/fluent-editor/package.json
  • packages/docs/fluent-editor/demos/header-list-container.vue
  • packages/fluent-editor/src/fullscreen/handler.ts
  • packages/fluent-editor/src/assets/toolbar.scss
  • packages/fluent-editor/src/index.ts
  • packages/fluent-editor/src/config/types/type.ts
  • packages/docs/fluent-editor/docs/header-list.md
  • packages/docs/package.json
  • packages/docs/fluent-editor/demos/add-toolbar-item.vue
  • packages/fluent-editor/src/table/modules/table-operation-menu.ts
  • packages/fluent-editor/src/table/formats/header.ts
  • packages/docs/fluent-editor/.vitepress/sidebar.ts
  • packages/docs/fluent-editor/demos/header-list.vue
🔇 Additional comments (4)
packages/docs/fluent-editor/demos/toolbar-tip.vue (2)

17-19: Avoid assigning libraries to window object


2-2: 🛠️ Refactor suggestion

Use internal module import

Import the QuillToolbarTip through the internal module system to align with PR objectives of managing internal dependencies.

-import QuillToolbarTip from 'quill-toolbar-tip'
+import { QuillToolbarTip } from '@opentiny/fluent-editor'

Likely invalid or redundant comment.

packages/fluent-editor/src/fluent-editor.ts (2)

26-26: LGTM: Import changes align with PR objectives.

The removal of HeaderList and ToolbarTip imports while keeping the Toolbar import aligns with the PR objective of removing internal dependencies.


Line range hint 46-54: LGTM: Module configuration maintains compatibility.

The configuration properly includes the i18n module while maintaining compatibility with existing modules like BetterTable.

packages/docs/fluent-editor/demos/toolbar-tip.vue Outdated Show resolved Hide resolved
@zzxming zzxming marked this pull request as draft December 31, 2024 13:04
@zzxming zzxming changed the title chore: remove header-list and toolbar-tip internal dependencies feat: remove header-list and toolbar-tip internal dependencies Dec 31, 2024
@zzxming zzxming force-pushed the chore-module-extract branch from 91c0888 to dfdee76 Compare December 31, 2024 13:41
@zzxming zzxming marked this pull request as ready for review December 31, 2024 13:41
@github-actions github-actions bot added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Dec 31, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
packages/fluent-editor/src/fluent-editor.ts (1)

Further investigation needed for remaining header-list references

While the HeaderList class/component appears to have been removed, there are still several references to "header-list" in the codebase that need attention:

  • packages/fluent-editor/src/toolbar/toolbar-tip.ts: Contains a toolbar item reference to 'header-list'
  • packages/fluent-editor/src/config/i18n/zh-cn.ts and en-us.ts: Contains translation strings for 'header-list'
  • packages/fluent-editor/src/fluent-editor.ts: Contains a comment referencing HeaderList

These references should be removed as they appear to be remnants of the removed header-list functionality.

🔗 Analysis chain

Line range hint 161-161: Verify removal of header-list dependency.

The module registration changes align with the PR objectives. However, let's verify that all header-list references have been properly removed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any remaining references to header-list
rg -l "header-list" --type ts --type vue

Length of output: 68


Script:

#!/bin/bash
# Check for any remaining references to header-list, focusing on TypeScript files
rg -l "header-list" --type ts

# Also search with different case variations and without hyphen
rg -l -i "headerlist|header list" --type ts

# Search for specific imports or references in TypeScript files
rg "import.*header.*list|from.*header.*list" --type ts

Length of output: 322


Script:

#!/bin/bash
# Let's check the actual content of these files to understand the context of header-list references
echo "=== toolbar-tip.ts ==="
rg -C 3 "header-list" packages/fluent-editor/src/toolbar/toolbar-tip.ts

echo -e "\n=== zh-cn.ts ==="
rg -C 3 "header-list" packages/fluent-editor/src/config/i18n/zh-cn.ts

echo -e "\n=== en-us.ts ==="
rg -C 3 "header-list" packages/fluent-editor/src/config/i18n/en-us.ts

echo -e "\n=== fluent-editor.ts ==="
rg -C 3 -i "headerlist|header list" packages/fluent-editor/src/fluent-editor.ts

Length of output: 1141


Script:

#!/bin/bash
# Let's check for any HeaderList class or type definitions
ast-grep --pattern 'class HeaderList'

# Also check for any HeaderList imports
rg "import.*HeaderList" --type ts

# And check for any direct HeaderList usage
rg "\bHeaderList\b" --type ts

Length of output: 198

♻️ Duplicate comments (1)
packages/docs/fluent-editor/demos/toolbar-tip.vue (1)

17-19: ⚠️ Potential issue

Avoid assigning libraries to window object.

Assigning libraries directly to the window object is an anti-pattern that can cause global namespace pollution and make testing more difficult.

-window.hljs = hljs
-window.katex = katex
-window.Html2Canvas = Html2Canvas
+// Use these libraries directly where needed
🧹 Nitpick comments (3)
packages/docs/fluent-editor/demos/toolbar-tip.vue (1)

44-59: Add error handling for dynamic import.

While the SSR compatibility is handled correctly, consider adding error handling for the dynamic import.

 onMounted(() => {
   import('@opentiny/fluent-editor').then(({ default: FluentEditor, generateToolbarTip }) => {
     FluentEditor.register({ 'modules/toolbar-tip': generateToolbarTip(QuillToolbarTip) }, true)
     editor = new FluentEditor(editorRef.value, {
       // ... configuration
     })
-  })
+  }).catch(error => {
+    console.error('Failed to load FluentEditor:', error)
+  })
 })
packages/fluent-editor/src/toolbar/toolbar-tip.ts (1)

7-11: Improve type safety for options parameter.

Instead of using Record<string, any>, consider creating a dedicated interface for the options.

+interface ToolbarTipOptions {
+  tipTextMap?: Record<string, string | { onShow: (target?: HTMLElement, value?: string) => string }>;
+}

-constructor(public quill: FluentEditor, options: Partial<Record<string, any>>) {
+constructor(public quill: FluentEditor, options: Partial<ToolbarTipOptions>) {
packages/fluent-editor/src/fluent-editor.ts (1)

Line range hint 33-35: Document new language-related properties.

Add JSDoc comments to explain the purpose and expected values of the new language-related properties.

 export class FluentEditor extends Quill {
   isFullscreen: boolean = false
   options: IEditorConfig & ExpandedQuillOptions
+  /** Current language code (e.g., 'en', 'zh') */
   lang: string
+  /** Map of language keys to their translated text */
   langText: Record<string, string>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91c0888 and dfdee76.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • packages/docs/fluent-editor/.vitepress/sidebar.ts (1 hunks)
  • packages/docs/fluent-editor/demos/add-toolbar-item.vue (1 hunks)
  • packages/docs/fluent-editor/demos/header-list-container.vue (1 hunks)
  • packages/docs/fluent-editor/demos/header-list.vue (1 hunks)
  • packages/docs/fluent-editor/demos/toolbar-tip.vue (1 hunks)
  • packages/docs/fluent-editor/docs/header-list.md (1 hunks)
  • packages/docs/fluent-editor/docs/toolbar-tip.md (1 hunks)
  • packages/docs/package.json (1 hunks)
  • packages/fluent-editor/package.json (1 hunks)
  • packages/fluent-editor/src/assets/style.scss (0 hunks)
  • packages/fluent-editor/src/assets/toolbar.scss (1 hunks)
  • packages/fluent-editor/src/config/types/type.ts (1 hunks)
  • packages/fluent-editor/src/fluent-editor.ts (1 hunks)
  • packages/fluent-editor/src/fullscreen/handler.ts (2 hunks)
  • packages/fluent-editor/src/index.ts (1 hunks)
  • packages/fluent-editor/src/table/formats/header.ts (1 hunks)
  • packages/fluent-editor/src/table/modules/table-operation-menu.ts (1 hunks)
  • packages/fluent-editor/src/toolbar/toolbar-tip.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/fluent-editor/src/assets/style.scss
🚧 Files skipped from review as they are similar to previous changes (14)
  • packages/fluent-editor/package.json
  • packages/docs/fluent-editor/.vitepress/sidebar.ts
  • packages/fluent-editor/src/config/types/type.ts
  • packages/docs/fluent-editor/docs/header-list.md
  • packages/docs/fluent-editor/demos/header-list-container.vue
  • packages/docs/fluent-editor/docs/toolbar-tip.md
  • packages/fluent-editor/src/table/modules/table-operation-menu.ts
  • packages/fluent-editor/src/fullscreen/handler.ts
  • packages/docs/fluent-editor/demos/add-toolbar-item.vue
  • packages/fluent-editor/src/index.ts
  • packages/fluent-editor/src/assets/toolbar.scss
  • packages/docs/package.json
  • packages/docs/fluent-editor/demos/header-list.vue
  • packages/fluent-editor/src/table/formats/header.ts
🔇 Additional comments (2)
packages/docs/fluent-editor/demos/toolbar-tip.vue (2)

21-42: LGTM: Well-structured toolbar configuration.

The toolbar configuration is comprehensive and well-organized.


2-2: ⚠️ Potential issue

Use internal module instead of direct import.

The direct import from 'quill-toolbar-tip' contradicts the PR objective of removing internal dependencies. Use the internal module instead.

-import QuillToolbarTip from 'quill-toolbar-tip'
+import { generateToolbarTip } from '@opentiny/fluent-editor'

Likely invalid or redundant comment.

@kagol kagol merged commit b718fbb into opentiny:main Jan 2, 2025
2 of 3 checks passed
@kagol
Copy link
Member

kagol commented Jan 2, 2025

@zzxming 目前发现有以下问题:

  1. 工具栏提示文档中,安装的依赖期望是 quill-toolbar-tip,实际是 quill-header-list,这里应该是手误
  2. 标题列表中,工具栏中的图标未显示
  3. 标题列表中,目前两个demo均无法实现锚点定位功能

@zzxming
Copy link
Collaborator Author

zzxming commented Jan 2, 2025

  1. 标题列表中,工具栏中的图标未显示
  2. 标题列表中,目前两个demo均无法实现锚点定位功能

是开发时的问题吧,你要更新一下依赖,之前 docs 里依赖了 Quill,和 fluent-editor 里的 Quill 不是一个版本,有重复依赖而且版本不一致

  1. 工具栏提示文档中,安装的依赖期望是 quill-toolbar-tip,实际是 quill-header-list,这里应该是手误

我提一个 pr 正好把打包错误修复一下

@coderabbitai coderabbitai bot mentioned this pull request Jan 2, 2025
13 tasks
@kagol
Copy link
Member

kagol commented Jan 2, 2025

@zzxming 经过测试发现还有以下问题:

  1. hover 到字体、字号等工具栏上会报错,提示不显示,本地可复现、@opentiny/[email protected] 测试版本也可复现

image

  1. 网站无法部署,提示 document is not defined

https://github.com/opentiny/fluent-editor/actions/runs/12576375018/job/35052438157

@zzxming
Copy link
Collaborator Author

zzxming commented Jan 2, 2025

  1. hover 到字体、字号等工具栏上会报错,提示不显示

新 pr 提交了

  1. 网站无法部署,提示 document is not defined

这个应该修复了, 这个 action 正常,我本地也能打包

@coderabbitai coderabbitai bot mentioned this pull request Jan 12, 2025
13 tasks
@zzxming zzxming deleted the chore-module-extract branch January 27, 2025 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants