Closed fcollonval closed 3 years ago
That line should be removed to see the bottom scrollbar and use the ability of codemirror to render only the viewport:
https://github.com/jupyterlab/pull-requests/blob/d2e66e6c30f0458f5c173ebd9e9c59e392ea5499/style/index.css#L154
When removing that style, the viewport event is correctly emitted. This trigger the callback
https://github.com/jupyterlab/pull-requests/blob/d2e66e6c30f0458f5c173ebd9e9c59e392ea5499/src/components/diff/plaintext.ts#L191
And the flaw comes from not checking if the discussion widget is already existing or not. The code should clean discussion for lines outside of the viewport and add discussion only for new displayed lines.
Discussion are not duplicated in plain text diff.
Description
That line should be removed to see the bottom scrollbar and use the ability of codemirror to render only the viewport:
https://github.com/jupyterlab/pull-requests/blob/d2e66e6c30f0458f5c173ebd9e9c59e392ea5499/style/index.css#L154
When removing that style, the viewport event is correctly emitted. This trigger the callback
https://github.com/jupyterlab/pull-requests/blob/d2e66e6c30f0458f5c173ebd9e9c59e392ea5499/src/components/diff/plaintext.ts#L191
And the flaw comes from not checking if the discussion widget is already existing or not. The code should clean discussion for lines outside of the viewport and add discussion only for new displayed lines.
Expected behavior
Discussion are not duplicated in plain text diff.
Context