From 5be148b368b4d6aca75a4951c430d985f79bcc8f Mon Sep 17 00:00:00 2001 From: David Kutugata Date: Wed, 4 Sep 2019 11:06:52 -0700 Subject: [PATCH 1/3] check the position of the scroll in the interactive window, if it is at the bottom, the screen stays at the bottom, and if not, the screen stays in place. Throttling of the scroll was increased to help with consistency on rapidly appearing plots. --- news/2 Fixes/6580.md | 2 ++ src/datascience-ui/history-react/MainPanel.tsx | 10 ++++++++-- src/datascience-ui/history-react/contentPanel.tsx | 14 ++++++-------- 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 news/2 Fixes/6580.md diff --git a/news/2 Fixes/6580.md b/news/2 Fixes/6580.md new file mode 100644 index 000000000000..2ffb5e76fbb3 --- /dev/null +++ b/news/2 Fixes/6580.md @@ -0,0 +1,2 @@ +Changed the way scrolling is treated. Now we only check for the position of the scroll, the size of the cell won't matter. +Still the interactive window will snap to the bottom if you already are at the bottom, and will stay in place if you are not. Like a chat window. \ No newline at end of file diff --git a/src/datascience-ui/history-react/MainPanel.tsx b/src/datascience-ui/history-react/MainPanel.tsx index 5fdbbd56ec63..a822fcf5a4f8 100644 --- a/src/datascience-ui/history-react/MainPanel.tsx +++ b/src/datascience-ui/history-react/MainPanel.tsx @@ -51,6 +51,7 @@ export class MainPanel extends React.Component private onigasmPromise: Deferred | undefined; private tmlangugePromise: Deferred | undefined; private monacoIdToCellId: Map = new Map(); + private isAtBottom = true; // tslint:disable-next-line:max-func-body-length constructor(props: IMainPanelProps, _state: IMainPanelState) { @@ -151,7 +152,7 @@ export class MainPanel extends React.Component
{this.renderVariablePanel(baseTheme)}
-
+
{this.renderContentPanel(baseTheme)}