-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: implement new advanced search by filter-sphere #1
Conversation
是大年初一的PR😍🤩! |
(原来还是 draft)
AND / OR 感觉可以放在 <fieldset> 那种的位置?
button 可以取点其他配色,突出主次
可能要换成 segmented button 来做 普通 / query builder / query 的三态切换
(Anyway 先写吧,都是组件库的问题,太单调了)
yzqzss ***@***.***> 于2025年1月29日周三 11:24写道:
… 是大年初一的PR😍🤩!
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEZ3LCWXNS63PG2HUDCG3ET2NBCXRAVCNFSM6AAAAABWB3FNHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRQGYZDMOJQGI>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
按钮的样式我再抽空改一下,segmented button 部分现在是在高级搜索下新加了一个专家模式/开发者模式替代,然后路由跳转还有点问题,其他大概是好了,可以先测一下功能对不对 |
试了下,效果很好耶。 |
6e143b3
to
0db383f
Compare
0db383f
to
c510acc
Compare
@@ -66,7 +66,7 @@ export default function Home() { | |||
<div className="my-8 w-full"> | |||
<Marquee items={marqueeItems} /> | |||
</div> | |||
<p className="text-center text-sm text-text mb-4"> | |||
<div className="text-center text-sm text-text mb-4"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -7,14 +7,16 @@ | |||
}, | |||
"license": "MIT", | |||
"scripts": { | |||
"dev": "next dev --turbopack", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -40,7 +49,7 @@ const Input = React.forwardRef< | |||
className | |||
)} | |||
ref={inputRef} | |||
defaultValue={value} | |||
value={value} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
更改 filter 的类型可能会清空输入框,因此更改为受控模式
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成受控模式之后,输入法就无法正常在输入框里输入了。
ref: https://foxact.skk.moe/use-composition-input
看文档的意思,useCompositionInput
不能被受控。
我 revert 了: e7e625f
import { FilterGroup } from "@fn-sphere/filter"; | ||
import { deserializeFilterGroup, serializeFilterGroup } from "./transform"; | ||
|
||
const STORAGE_KEY = "filter-rule-cache"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
由于没有实现 query 到 filter group 的 transform 方法(可能难以覆盖所有 case),这里在 local storage 暂存了一个 cache,用于在刷新页面时恢复状态,和写在 query 相比各有优缺点。
LGTM 不懂 TS,但是手动玩弄几下高级搜索没啥毛病。牢猫😷了,Review 不能。我先合了吧。 灰常感谢! |
doc: http://www.waterwater.moe/fn-sphere/guides/introduction/