Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

feat: add resize feature supports for image and iframe #2

Merged
merged 11 commits into from
Jan 31, 2023

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Jan 5, 2023

  1. 添加 BlockCard 组件规范每一个块的样式。
  2. 为图片和嵌入网页添加尺寸调整的功能。

注意,暂时移除了拖拽调整宽高的功能,目前没有好的实现方案。

/kind feature

Fixes halo-dev/halo#2986
Fixes halo-dev/halo#2985
Fixes halo-dev/halo#2686
Fixes halo-dev/halo#2685

todo list:

  • 支持输入宽度和高度

测试方式:

  1. 可使用 https://richtext-editor-git-fork-ruibaby-feat-block-halo-dev.vercel.app/ 进行测试。
  2. 添加若干图片或者嵌入网页的块。
  3. 测试设置长宽等功能是否正常。
None

@f2c-ci-robot f2c-ci-robot bot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jan 5, 2023
@ruibaby ruibaby closed this Jan 5, 2023
@ruibaby ruibaby reopened this Jan 5, 2023
@vercel
Copy link

vercel bot commented Jan 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
richtext-editor ✅ Ready (Inspect) Visit Preview 1 resolved Jan 31, 2023 at 6:50AM (UTC)

@ruibaby ruibaby changed the title WIP: feat: add resize feature supports for image and iframe feat: add resize feature supports for image and iframe Jan 6, 2023
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 6, 2023
@ruibaby
Copy link
Member Author

ruibaby commented Jan 6, 2023

/cc @halo-sigs/halo

@wan92hen
Copy link
Member

wan92hen commented Jan 9, 2023

fc80b468f454223450047e59dbc23bd

两个浮动菜单会有重叠的情况,最好可以合并成一个 🐱

@ruibaby
Copy link
Member Author

ruibaby commented Jan 9, 2023

两个浮动菜单会有重叠的情况,最好可以合并成一个 🐱

可以在后续优化,这个可能得修改稍微底层点的东西。

@JohnNiang
Copy link
Contributor

JohnNiang commented Jan 9, 2023

image

这里有部分图标(居中和居右)没有显示出来。

和缩放有关系

@JohnNiang
Copy link
Contributor

从最新的预览链接,似乎没有找到添加图片和 iframe 的入口。

image

@ruibaby
Copy link
Member Author

ruibaby commented Jan 31, 2023

从最新的预览链接,似乎没有找到添加图片和 iframe 的入口。

image

image

图片的入口目前是在 Console 加的,因为要和附件库绑定。

@wan92hen
Copy link
Member

/lgtm

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

@guqing guqing 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
Contributor

@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

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jan 31, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JohnNiang

The full list of commands accepted by this bot can be found 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

@JohnNiang JohnNiang merged commit 9cfb8f4 into halo-sigs:main Jan 31, 2023
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request Jan 31, 2023
…media (#834)

#### What type of PR is this?

/kind feature

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

升级默认编辑器版本,改动请查阅:

1. halo-sigs/richtext-editor#4
2. halo-sigs/richtext-editor#3
3. halo-sigs/richtext-editor#2

#### Special notes for your reviewer:

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

```release-note
升级 Console 端默认编辑器版本,以支持图片位置和大小设置、插入音视频等功能。
```
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
…media (halo-dev/console#834)

#### What type of PR is this?

/kind feature

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

升级默认编辑器版本,改动请查阅:

1. halo-sigs/richtext-editor#4
2. halo-sigs/richtext-editor#3
3. halo-sigs/richtext-editor#2

#### Special notes for your reviewer:

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

```release-note
升级 Console 端默认编辑器版本,以支持图片位置和大小设置、插入音视频等功能。
```
@ruibaby ruibaby deleted the feat/block branch March 29, 2023 02:34
f2c-ci-robot bot pushed a commit that referenced this pull request Apr 28, 2023
PR from #8 
Revert the changes made in #2.
Avoid conflicts with manual size setting caused by immediate triggering after binding by checking the number of ResizeObserver events triggered.
Remove the transition of the Image component (or at least remove the width and height) to avoid the blocking feeling caused by resizing.

**This PR has changed the example-package.json,But the pack lock file was not submitted.(I have an inconsistent version of PNPM)**

Fixes #8 

```release-note
支持拖拽调整图片大小。
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
4 participants