Skip to content

Conversation

intoyang
Copy link
Member

@intoyang intoyang commented Mar 14, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

修复在新建文章时,首次切换编辑器后没有设置内容 rawType 资源为对应编辑器类型的问题。

Which issue(s) this PR fixes:

Fixes #3512

Special notes for your reviewer:

测试方式:

  1. 安装任意一个编辑器插件,比如:https://github.com/halo-sigs/plugin-stackedit
  2. 新建文章,选择安装的编辑器。
  3. 发布文章。
  4. 卸载或者停止编辑器。
  5. 重新编辑刚刚创建的文章,如果提示 未找到符合 markdown 格式的编辑器,请检查是否已安装编辑器插件 则代表正常。

Does this PR introduce a user-facing change?

修复在新建文章时,首次切换编辑器后没有设置内容 rawType 资源为对应编辑器类型的问题。

@f2c-ci-robot f2c-ci-robot bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 14, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and ruibaby March 14, 2023 11:42
@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Mar 14, 2023
@CLAassistant
Copy link

CLAassistant commented Mar 14, 2023

CLA assistant check
All committers have signed the CLA.

@LIlGG
Copy link
Member

LIlGG commented Mar 14, 2023

@intoyang 需要签署一下 CLA

@ruibaby
Copy link
Member

ruibaby commented Mar 14, 2023

这里也需要修改一下:

const handleChangeEditorProvider = (provider: EditorProvider) => {
currentEditorProvider.value = provider;
storedEditorProviderName.value = provider.name;
formState.value.page.metadata.annotations = {
"content.halo.run/preferred-editor": provider.name,
};
};

@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 Mar 14, 2023
@ruibaby ruibaby added this to the 2.4.x milestone Mar 14, 2023
@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #3516 (de57513) into main (f43888b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #3516   +/-   ##
=========================================
  Coverage     61.60%   61.60%           
  Complexity     2509     2509           
=========================================
  Files           398      398           
  Lines         12695    12695           
  Branches       1019     1019           
=========================================
  Hits           7821     7821           
  Misses         4388     4388           
  Partials        486      486           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

/approve

image

image

@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 Mar 15, 2023
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.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Mar 15, 2023
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Mar 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot merged commit b7702ef into halo-dev:main Mar 15, 2023
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request Mar 15, 2023
)

> **Warning**
>
> 此 PR 的改动来自:<halo-dev/halo#3516>
> 因为目前 Console 仓库已经合并到 Halo 主仓库,但主仓库的 release-2.3 分支不包含 Console,所以如果需要发布 2.3.x 的 patch 版本,依旧需要在此仓库修改。

#### What type of PR is this?

/kind bug
/milestone 2.3.2

#### What this PR does / why we need it:

修复在新建文章时,首次切换编辑器后没有设置内容 rawType 资源为对应编辑器类型的问题。

#### Which issue(s) this PR fixes:

Fixes #3512 

#### Special notes for your reviewer:

测试方式:

1. 安装任意一个编辑器插件,比如:https://github.com/halo-sigs/plugin-stackedit
1. 新建文章,选择安装的编辑器。
1. 发布文章。
1. 卸载或者停止编辑器。
1. 重新编辑刚刚创建的文章,如果提示 `未找到符合 markdown 格式的编辑器,请检查是否已安装编辑器插件` 则代表正常。

#### Does this PR introduce a user-facing change?

```release-note
修复在新建文章时,首次切换编辑器后没有设置内容 rawType 资源为对应编辑器类型的问题。
```
@wan92hen
Copy link
Collaborator

cherry pick release-2.3?

@ruibaby
Copy link
Member

ruibaby commented Mar 15, 2023

cherry pick release-2.3?

halo-dev/console#904

@JohnNiang JohnNiang modified the milestones: 2.4.x, 2.4.0 Mar 15, 2023
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/bug Categorizes issue or PR as related to a bug. 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.

首次切换文章的编辑器后保存文章,rawType 设置不正确。
6 participants