-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Add support for customizing nofollow of links in editor #7444
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
Conversation
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.
Thank you for your first contribution!
I left some comments below, please take some time to check.
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.
/ping @halo-dev/sig-halo-console
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.
Pull Request Overview
Adds a configurable “nofollow” option for links in the editor UI.
- Introduce a checkbox to toggle
rel="nofollow"
on links. - Update the Link extension to set default
rel
attributes and render HTML accordingly. - Add a Chinese locale entry for the new “nofollow” label.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ui/packages/editor/src/locales/zh-CN.yaml | Added nofollow translation key |
ui/packages/editor/src/extensions/link/index.ts | Set default rel to "noopener noreferrer" and added renderHTML |
ui/packages/editor/src/extensions/link/LinkBubbleButton.vue | Added rel computed prop, checkbox UI, and integrated rel in setLink |
@halo-dev/api-client
@halo-dev/components
@halo-dev/console-shared
@halo-dev/richtext-editor
@halo-dev/ui-plugin-bundler-kit
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7444 +/- ##
============================================
+ Coverage 59.44% 59.54% +0.10%
+ Complexity 4142 3811 -331
============================================
Files 701 677 -24
Lines 24014 23248 -766
Branches 1543 1500 -43
============================================
- Hits 14274 13844 -430
+ Misses 9078 8765 -313
+ Partials 662 639 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ping @LIlGG Please help Review |
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.
感谢提交此 RP,我发现一些细节问题,希望能够进行修正。
Co-authored-by: Takagi <mail@e.lixingyong.com>
Co-authored-by: Takagi <mail@e.lixingyong.com>
|
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.
/approve
/ping @halo-dev/sig-halo-console
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.
/lgtm
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang, LIlGG, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#### What type of PR is this? /kind improvement /area editor /milestone 2.21.x #### What this PR does / why we need it: Improve English translations for the editor. The changes in #7444 did not provide English translations. #### Does this PR introduce a user-facing change? ```release-note None ```
What type of PR is this?
/kind improvement
/area ui
/area editor
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #6950