-
Notifications
You must be signed in to change notification settings - Fork 6
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: Add dynamic links to Text plugins and HTMLFields
with CKEditor 5
#6
Conversation
@sourcery-ai summary |
@sourcery-ai review |
Reviewer's Guide by SourceryThis PR implements dynamic link support in CKEditor 5 by refactoring the link handling system. The changes introduce a new CMS-specific link plugin that manages custom link attributes and provides autocomplete functionality for link selection. The implementation focuses on improving the user experience when adding and editing links while maintaining compatibility with the CMS backend. Class diagram for CmsLink and LinkFieldclassDiagram
class CmsLink {
+init()
+_defineConverters()
+_handleExtraAttributeValues()
+_enableLinkAutocomplete()
+_handleExtraFormFieldSubmit()
+_handleDataLoadingIntoExtraFormField()
+_refreshExtraAttributeValues()
+static get pluginName()
}
class LinkField {
+constructor(element, options)
+createInput()
+populateField()
+registerEvents()
+handleInput(event)
+showResults(response, page)
+_addResult(result, currentSection)
+handleSelection(event)
+handleChange()
+search(page)
+updateSearch()
+fetchData(searchText, page)
}
CmsLink --> LinkField : uses
note for CmsLink "Handles custom CMS links in CKEditor 5"
note for LinkField "Manages link field input and autocomplete functionality"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @fsbraun - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding error handling for fetch calls in the link preview and autocomplete functionality to gracefully handle API failures
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have skipped reviewing this pull request. It looks like we've already reviewed the commit ad2568f in this pull request.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
…ext-ckeditor5 into feat/dynamic-html
Summary by Sourcery
Add dynamic link support to CKEditor 5 by implementing a CmsLink plugin that handles custom CMS links with a 'cmsHref' attribute, supports autocomplete, and integrates with the CKEditor UI. Update the build configuration to reflect changes in static file paths.
New Features:
Enhancements:
Build: