neulab / explainaboard_web

MIT License
8 stars 2 forks source link

CLI code drawer not pushing system submission drawer correctly #501

Closed PaulCCCCCCH closed 1 year ago

PaulCCCCCCH commented 1 year ago

See details here: https://github.com/neulab/explainaboard_web/pull/477#issuecomment-1307617333

lyuyangh commented 1 year ago

I spent some more time trying to figure out what's going on. I think the issue is that when the page is rendered for the first time:

  1. Parent drawer visible = false
  2. Nested drawer visible = true

In this state, the multi-level drawer doesn't work properly. To prevent us from getting into this error state, we need the parent drawer to be visible before the nested drawer is visible. One solution I could think of is that we can use useEffect to trigger cliCodeVisible state change whenever parentDrawerVisible changes. I did some preliminary testing and it seems to work.

PaulCCCCCCH commented 1 year ago

Closing this issue because this has been fixed.