-
Notifications
You must be signed in to change notification settings - Fork 31
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: Record passed status for challenges #80
Conversation
9c4c172
to
e2328ad
Compare
24162fa
to
4684a29
Compare
fa6f43e
to
9ed7e52
Compare
@laike9m 搜了一下 jotai 似乎没有直接通过 CDN 引入然后直接使用的示例或相关文档,所以我就没有暂时没有尝试了;最后简单实现了一下效果如下所示: 完成的 icon 放在了右侧,这样就可以暂时不用动 Sidebar 里面文字的布局了,比较省时省力 |
Sorry, I thought this PR is WIP so I didn't review it. Is it ready for review? |
Yes, it is. |
The original density of the challenge list feels right to me, I'd rather we don't change it. Could you change it back? I haven't finished reading the implementation, should be done tomorrow. |
Density? Which part of css style do you refer? Padding, margin or width? |
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.
A design question:
Right now we basically have two copies of state, one in PassedState._state
, one in localStorage
. There's a bunch of code just for syncing the two states.
I'm wondering, is it possible to remove PassedState._state
, and just use localStorage
as the single source of truth? e.g. when a test passed, update localStorage
directly. I feel if implemented this way, the code can be hugely simplified.
Performance should be the same, since we need to update localStorage
anyway. Even if not, it shouldn't matter here.
See if it makes sense to you. Happy to discuss more.
81d6f8e
to
f48e964
Compare
@laike9m Done |
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.
I think at this point, bringing in tools like Vite might beneficial (with the assumption that it doesn't increase the complexity of managing things. btw TS is still a no-go). I can take a look at it. The bigger concern is whether Zeabur supports a project with both Python and Node.js environment. I'm not so sure @MichaelYuhe |
Closed #78