-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Changes to allow editing multiple comments #18887
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
base: master
Are you sure you want to change the base?
Conversation
| _.withChildren: children => | ||
| if toMainline then children.promoteToMainlineAt(position.path) | ||
| else children.promoteUpAt(position.path)._1F | ||
| else children.promoteUpAt(position.path).map(_._1) |
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.
undoing unrelated previous commits?
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.
Thanks @ornicar.unrelated previous commits were restored.
| (newChapter.description != chapter.description) | ||
| if shouldReload then sendTo(study.id)(_.updateChapter(chapter.id, who)) | ||
| else reloadChapters(study) | ||
| } |
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.
undoing unrelated previous commits?
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.
Thanks @ornicar.unrelated previous commits were restored.
|
CI shows that study tests are broken |
|
task is complete |
| opening = prop<string | null>(null); | ||
| newComment = false; | ||
|
|
||
| setnewComment = (newComment: boolean) => { |
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.
namingConventions
| 'click', | ||
| () => { | ||
| study.commentForm.start(study.vm.chapterId, ctrl.path, ctrl.node); | ||
| // ctrl.node.comments?.forEach((comment) => ctrl.study!.commentForm.start(ctrl.study!.vm.chapterId, ctrl.path, ctrl.node, comment.id)); |
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.
dead code?
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.
It's a valid question.
going to experiment with concatenation approach to see if it can make code more stable for long term viability.
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.
#18467
I used steps to reproduce and created a chapter. PGN & comments testing passed.
But with -
import {test 1 } {test 2} 1.d4 {test 3} { test 4} the comment section rendered confusing. I have to fix this rendering.
I think I will be able refine code to be less complex.
| val m6 = s"""$m4\n{"t":"clearVariations","d":"kMOZO15F"}""" | ||
| val pgn6 = | ||
| "1. e4 e6 2. d4 d5 3. Nc3 dxe4 { 3. Nc3 is the main weapon of White, but it doesn't match for the powerful Rubinstein. White is screwed here } 4. Nxe4 Nd7" | ||
| "1. e4 e6 2. d4 d5 3. Nc3 dxe4 { 3. Nc3 is the main weapon of White, but it doesn't match for the powerful Rubinstein. White is scrwed } { 3. Nc3 is the main weapon of White, but it doesn't match for the powerful Rubinstein. White is screwed here } 4. Nxe4 Nd7" |
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.
so these tests show that without the comment ID, each modification to a comment adds a new comment.
it looks like a good place for tests that show how comment IDs work

Changes to fix #18467.
Implemented necessary, albeit slightly intricate, focus management logic to get the focus to land on the correct text area within commentForm.ts. This correctly directs the focus to the recently edited text area, preventing it from jumping to the last text area.