Skip to content

Conversation

Nimbus3009
Copy link
Contributor

@Nimbus3009 Nimbus3009 commented May 19, 2025

What type of PR is this?

/kind improvement
/area ui
/area editor

What this PR does / why we need it:

屏幕截图 2025-05-19 101940

Which issue(s) this PR fixes:

Fixes #6950

编辑器支持为链接设置 **搜索引擎忽略链接关系** 选项

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 19, 2025
@CLAassistant
Copy link

CLAassistant commented May 19, 2025

CLA assistant check
All committers have signed the CLA.

@f2c-ci-robot f2c-ci-robot bot requested review from guqing and LIlGG May 19, 2025 02:25
@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 19, 2025
Copy link
Member

@JohnNiang JohnNiang left a 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.

@JohnNiang JohnNiang changed the title Fixes issue #6950 Add support for customize nofollow of links in editor May 19, 2025
@JohnNiang JohnNiang changed the title Add support for customize nofollow of links in editor Add support for customizing nofollow of links in editor May 19, 2025
@JohnNiang JohnNiang added this to the 2.21.x milestone May 19, 2025
Copy link
Member

@JohnNiang JohnNiang left a 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

@ruibaby ruibaby requested a review from Copilot May 19, 2025 04:49
Copy link

@Copilot Copilot AI left a 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

Copy link

pkg-pr-new bot commented May 20, 2025

Open in StackBlitz

@halo-dev/api-client

npm i https://pkg.pr.new/@halo-dev/api-client@7444

@halo-dev/components

npm i https://pkg.pr.new/@halo-dev/components@7444

@halo-dev/console-shared

npm i https://pkg.pr.new/@halo-dev/console-shared@7444

@halo-dev/richtext-editor

npm i https://pkg.pr.new/@halo-dev/richtext-editor@7444

@halo-dev/ui-plugin-bundler-kit

npm i https://pkg.pr.new/@halo-dev/ui-plugin-bundler-kit@7444

commit: a594a76

Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.54%. Comparing base (04c27db) to head (a594a76).
Report is 36 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ruibaby
Copy link
Member

ruibaby commented May 21, 2025

ping @LIlGG Please help Review

Copy link
Member

@LIlGG LIlGG left a comment

Choose a reason for hiding this comment

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

感谢提交此 RP,我发现一些细节问题,希望能够进行修正。

Nimbus3009 and others added 2 commits May 23, 2025 14:51
Co-authored-by: Takagi <mail@e.lixingyong.com>
Co-authored-by: Takagi <mail@e.lixingyong.com>
Copy link

@ruibaby ruibaby requested a review from LIlGG May 26, 2025 03:42
Copy link
Member

@JohnNiang JohnNiang left a 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

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2025
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2025
Copy link
Member

@LIlGG LIlGG left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

f2c-ci-robot bot commented May 26, 2025

[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:
  • OWNERS [JohnNiang,LIlGG,ruibaby]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot merged commit a0dc959 into halo-dev:main May 26, 2025
11 checks passed
f2c-ci-robot bot pushed a commit that referenced this pull request May 26, 2025
#### 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
```
@JohnNiang JohnNiang modified the milestones: 2.21.x, 2.21.0 Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

编辑器链接增加是否nofollow的设定
5 participants