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

feat: implement functionality of column cards #40

Merged
merged 10 commits into from Sep 18, 2023

Conversation

LIlGG
Copy link
Contributor

@LIlGG LIlGG commented Sep 7, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

为编辑器增加分栏卡片的功能

image

How to test it?

测试新增分栏卡片的功能是否可用。
查看 console 端打印的 HTML 结构是否正常。

Which issue(s) this PR fixes:

Fixes #30
Fixes halo-dev/halo#2798
Ref halo-dev/halo#4380

Does this PR introduce a user-facing change?

为编辑器增加分栏卡片

@f2c-ci-robot f2c-ci-robot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 7, 2023
@vercel
Copy link

vercel bot commented Sep 7, 2023

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

Name Status Preview Comments Updated (UTC)
richtext-editor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2023 10:17am

@f2c-ci-robot f2c-ci-robot bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 7, 2023
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 Sep 10, 2023
@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2023
@wan92hen
Copy link
Member

当某个分栏里是 iframe 块时,鼠标悬停会同时弹出 Iframe 的菜单和分栏的菜单;鼠标悬停其他分类则不会出现分栏菜单,只有点击聚焦该分栏时才会出现分栏菜单。
Gif 录屏的鼠标位置好像没太对上,但应该也可以看出来。
msedge_rWpCvLlMDh

@LIlGG
Copy link
Contributor Author

LIlGG commented Sep 12, 2023

当某个分栏里是 iframe 块时,鼠标悬停会同时弹出 Iframe 的菜单和分栏的菜单;鼠标悬停其他分类则不会出现分栏菜单,只有点击聚焦该分栏时才会出现分栏菜单。 Gif 录屏的鼠标位置好像没太对上,但应该也可以看出来。

普通组件通常只有点击之后选中才处于活动状态。而组件变为 iframe 后,只要悬停就会获取焦点并处于活动状态。而弹出分栏的菜单是因为监听到了当前分栏处于活动状态从而出现。

由于 iframe 实际上不容易触发点击事件,容易与嵌入的资源产生误触,因此我认为这个操作是可以接受的。不过或许还有其他更好的方式,可以一起讨论一下。

@LIlGG
Copy link
Contributor Author

LIlGG commented Sep 18, 2023

当某个分栏里是 iframe 块时,鼠标悬停会同时弹出 Iframe 的菜单和分栏的菜单;鼠标悬停其他分类则不会出现分栏菜单,只有点击聚焦该分栏时才会出现分栏菜单。 Gif 录屏的鼠标位置好像没太对上,但应该也可以看出来。

修改了一下 bubble 菜单的逻辑,现在移入 iframe 应该还会显示菜单,但不会与分栏的菜单重叠。

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 Sep 18, 2023
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 18, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit d906c89 into halo-sigs:main Sep 18, 2023
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. 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.

希望增加分栏功能 请在文章编辑器中支持栅栏布局方式
3 participants