-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ui/nvui cleanup #16560
ui/nvui cleanup #16560
Conversation
Strike down the tower of babel
great stuff |
… for nvui to parse dests
Gonna stop myself for now so that future bug fixing can be a bit more manageable |
@@ -10,7 +10,6 @@ export const render = (ctrl: AnalyseCtrl): VNode => | |||
h('div.cg-wrap.cgv' + ctrl.cgVersion.js, { | |||
hook: { | |||
insert: vnode => ctrl.setChessground(makeChessground(vnode.elm as HTMLElement, makeConfig(ctrl))), | |||
destroy: _ => ctrl.chessground.destroy(), |
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.
how did you determine that this could be removed?
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.
Nvui relies on chessground to keep track of board state. That line destroys the initialized chessground state whenever the main analysis board is removed from the DOM tree (which is the order of operations on every analysis/study page load)
Looking good! Please see my question above before I merge. |
Just noticed there is a bug where chessgroung state is not changed across chapter changes. It might take me a while to get to fix it. So marking as draft for now |
Functional changes:
The rest are non-functional changes: refactoring, code golf. Anything else is unintentional bugs.
Closes #16648
Closes #13787
Addresses some of #11185.