Skip to content
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

refactor: use lit element to refactor search component #18

Merged
merged 6 commits into from Oct 25, 2023

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Oct 24, 2023

使用 Lit 重构搜索组件,可以获得更小的体积,并且提高可移植性,用于任何 JS 框架。

/kind improvement

Fixes #17

TODO:

  • 优化 UI 细节。

可测试 JAR 包:plugin-search-widget-1.0.0-SNAPSHOT.jar.zip

Review 建议直接查看:https://github.com/halo-dev/plugin-search-widget/tree/main/packages/search-widget/src

重构搜索组件,减少构建产物体积。

Signed-off-by: Ryan Wang <i@ryanc.cc>
@f2c-ci-robot f2c-ci-robot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. labels Oct 24, 2023
Signed-off-by: Ryan Wang <i@ryanc.cc>
Signed-off-by: Ryan Wang <i@ryanc.cc>
Signed-off-by: Ryan Wang <i@ryanc.cc>
Signed-off-by: Ryan Wang <i@ryanc.cc>
Signed-off-by: Ryan Wang <i@ryanc.cc>
@ruibaby ruibaby changed the title WIP: refactor: use lit element to refactor search component refactor: use lit element to refactor search component Oct 25, 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 Oct 25, 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.

It works very well.

The final transfer size of JS is 12.2KB.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Oct 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

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 Oct 25, 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

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2023
@ruibaby ruibaby merged commit 9a07617 into halo-dev:main Oct 25, 2023
1 check passed
@ruibaby ruibaby deleted the refactor/use-lit branch October 25, 2023 09:44
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.

使用 Lit Element 重构搜索组件
3 participants