Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ea668bb
Safety push
softwarenerd Jul 30, 2025
9583dbe
Updates for layout
softwarenerd Jul 30, 2025
faa7871
Updates for 8695 and column selector modal popup
softwarenerd Aug 1, 2025
0c7c506
Cursor navigation updates for pinned colums and rows
softwarenerd Aug 5, 2025
c965661
Safety push of major layout manager work
softwarenerd Aug 8, 2025
222da18
Significant updates to LayoutManager
softwarenerd Aug 17, 2025
91bdedf
Refactoring layout manager
softwarenerd Aug 18, 2025
07002d6
Refactoring layout manager
softwarenerd Aug 18, 2025
eb78076
Updates to table data cache update descriptor
softwarenerd Aug 18, 2025
c8aaab6
Safety push in case the world explodes
softwarenerd Aug 19, 2025
880f3d7
Safety push in case the world explodes
softwarenerd Aug 20, 2025
b96981f
LayoutManager rework
softwarenerd Aug 21, 2025
a0c649d
More layout manager updates
softwarenerd Aug 21, 2025
e8d6cb4
Updates for scrolling
softwarenerd Aug 21, 2025
d1626de
Updates for TableDataCache
softwarenerd Aug 26, 2025
b2c4159
Some selection and layout updates
softwarenerd Aug 29, 2025
7d71d15
Re-enable unit tests and fixes for two bugs that were uncovered by them
softwarenerd Aug 29, 2025
d5ffaff
Adding unit tests for LayoutManager's mapPositionToIndex and mapIndex…
softwarenerd Aug 29, 2025
c949e62
Optimized mapPositionsToIndexes
softwarenerd Aug 31, 2025
969c4a6
Improve performance of cellSelectionState
softwarenerd Aug 31, 2025
c1dba62
Extend cell selection up, down, left, right
softwarenerd Aug 31, 2025
a6a3dc0
Extend cell selection up, down, left, right
softwarenerd Aug 31, 2025
f923094
Removing column selection range and row selection range code
softwarenerd Sep 1, 2025
8a3984e
Fix remaining extend column and row selection
softwarenerd Sep 1, 2025
495e60d
Fix extend selection problem
softwarenerd Sep 2, 2025
0877cf6
Work.
softwarenerd Sep 2, 2025
fef255f
Remove test code
softwarenerd Sep 2, 2025
7271c86
Remove testing code
softwarenerd Sep 2, 2025
7e219ad
Skip test for a bit
softwarenerd Sep 3, 2025
d9605f5
Fix failing test
softwarenerd Sep 3, 2025
fdb0aaf
Remove unused file
softwarenerd Sep 3, 2025
95d2dc8
Fix missing else
softwarenerd Sep 3, 2025
8f5ffee
Fix comment
softwarenerd Sep 3, 2025
257b991
Fix silly mistakes
softwarenerd Sep 3, 2025
685b09a
Fix silly mistakes
softwarenerd Sep 3, 2025
bb63c7c
Remove dead code
softwarenerd Sep 3, 2025
cb22911
Clear selection on pinning and unpinning
softwarenerd Sep 3, 2025
6422134
Fix missing function call
softwarenerd Sep 4, 2025
7fdb6df
Add comment
softwarenerd Sep 4, 2025
d19f74a
Remove YAYA's I forgot about
softwarenerd Sep 4, 2025
060896f
Remove comment
softwarenerd Sep 4, 2025
2a07a21
Add comment
softwarenerd Sep 4, 2025
3b7a7f8
Remove comment
softwarenerd Sep 4, 2025
64bc23b
Adjust comments
softwarenerd Sep 4, 2025
c2f4a4b
Updates for copy to clipboard
softwarenerd Sep 4, 2025
1712fe5
Ensure that column and row selections are copied to the clipboard in …
softwarenerd Sep 4, 2025
eeff154
Ensure that column and row selections are copied to the clipboard in …
softwarenerd Sep 4, 2025
7f28202
Adjust comments
softwarenerd Sep 4, 2025
3389e9c
Revert to Cmd+Shift+Space to select all on macOS
softwarenerd Sep 4, 2025
4a63e84
Use OVERSCAN_FACTOR
softwarenerd Sep 4, 2025
b0ffc33
Use OVERSCAN_FACTOR
softwarenerd Sep 4, 2025
5cb3094
Fix incorrect overscan calculation
softwarenerd Sep 4, 2025
f25bda8
Remove dead delcaration
softwarenerd Sep 4, 2025
1d8071c
Switch to (ctrlKey && shiftKey) + space for select all in Data Grid
softwarenerd Sep 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/vs/base/browser/ui/codicons/codicon/codicon.ttf
Binary file not shown.
2 changes: 2 additions & 0 deletions src/vs/base/common/codiconsLibrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,4 +708,6 @@ export const codiconsLibrary = {
positronOpenInEditor: register('positron-open-in-editor', 0xf290),
positronOpenFolder: register('positron-open-folder', 0xf291),
positronFormatDocument: register('positron-format-document', 0xf292),
positronPin: register('positron-pin', 0xf293),
positronUnpin: register('positron-unpin', 0xf294),
} as const;
22 changes: 1 addition & 21 deletions src/vs/platform/positronActionBar/browser/positronActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import './positronActionBarVariables.css';
import './positronActionBar.css';

// React.
import React, { KeyboardEvent, PropsWithChildren, useEffect, useLayoutEffect, useRef } from 'react';
import React, { KeyboardEvent, PropsWithChildren, useEffect, useRef } from 'react';

// Other dependencies.
import * as DOM from '../../../base/browser/dom.js';
import { usePositronActionBarContext } from './positronActionBarContext.js';
import { DisposableStore, toDisposable } from '../../../base/common/lifecycle.js';
import { optionalValue, positronClassNames } from '../../../base/common/positronUtilities.js';

/**
Expand Down Expand Up @@ -111,25 +110,6 @@ export const PositronActionBar = (props: PropsWithChildren<PositronActionBarProp
}
};

// Automatic layout useEffect.
useLayoutEffect(() => {
// Create the disposable store for cleanup.
const disposableStore = new DisposableStore();

// Allocate and initialize the resize observer.
const resizeObserver = new ResizeObserver(entries => {
});

// Start observing the size of the action bar.
resizeObserver.observe(ref.current);

// Add the resize observer to the disposable store.
disposableStore.add(toDisposable(() => resizeObserver.disconnect()));

// Return the cleanup function that will dispose of the disposables.
return () => disposableStore.dispose();
}, [context]);

useEffect(() => {
if (!props.nestedActionBar && prevIndex >= 0 && (focusedIndex !== prevIndex)) {
const items = Array.from(context.focusableComponents);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export class ColumnSelectorDataGridInstance extends DataGridInstance {
defaultRowHeight: ROW_HEIGHT,
columnResize: false,
rowResize: false,
columnPinning: false,
rowPinning: false,
horizontalScrollbar: false,
verticalScrollbar: true,
scrollbarThickness: 8,
Expand All @@ -114,8 +116,11 @@ export class ColumnSelectorDataGridInstance extends DataGridInstance {
this._columnSchemaCache = new ColumnSchemaCache(this._dataExplorerClientInstance)
);

// Set the initial layout entries in the row layout manager.
this._rowLayoutManager.setLayoutEntries(backendState.table_shape.num_columns);
// Set the column layout entries. There is always one column.
this._columnLayoutManager.setEntries(1);

// Set the row layout entries.
this._rowLayoutManager.setEntries(backendState.table_shape.num_columns);

/**
* Updates the data grid instance.
Expand All @@ -131,7 +136,7 @@ export class ColumnSelectorDataGridInstance extends DataGridInstance {
this._backendState = backendState;

// Set the layout entries in the row layout manager.
this._rowLayoutManager.setLayoutEntries(backendState.table_shape.num_columns);
this._rowLayoutManager.setEntries(backendState.table_shape.num_columns);

// Scroll to the top.
await this.setScrollOffsets(0, 0);
Expand All @@ -150,17 +155,15 @@ export class ColumnSelectorDataGridInstance extends DataGridInstance {
));

// Add the onDidUpdateBackendState event handler.
this._register(
this._dataExplorerClientInstance.onDidUpdateBackendState(async backendState =>
// Update the data grid instance.
updateDataGridInstance(backendState)
)
);
this._register(this._dataExplorerClientInstance.onDidUpdateBackendState(async backendState =>
// Update the data grid instance.
updateDataGridInstance(backendState)
));

// Add the onDidUpdateCache event handler.
this._register(this._columnSchemaCache.onDidUpdateCache(() =>
// Fire the onDidUpdate event.
this._onDidUpdateEmitter.fire()
this.fireOnDidUpdateEvent()
));
}

Expand Down Expand Up @@ -195,7 +198,8 @@ export class ColumnSelectorDataGridInstance extends DataGridInstance {
override get firstColumn() {
return {
columnIndex: 0,
left: 0
left: 0,
width: 0,
};
}

Expand All @@ -219,11 +223,12 @@ export class ColumnSelectorDataGridInstance extends DataGridInstance {
}

/**
* Gets the width of a column.
* Gets the custom width of a column.
* @param columnIndex The column index.
* @returns The custom width of the column; otherwise, undefined.
*/
override getColumnWidth(columnIndex: number): number {
return this.layoutWidth - 8;
override getCustomColumnWidth(columnIndex: number): number | undefined {
return columnIndex === 0 ? this.layoutWidth - 8 : undefined;
}

selectItem(rowIndex: number): void {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------------------------
* Copyright (C) 2024 Posit Software, PBC. All rights reserved.
* Copyright (C) 2024-2025 Posit Software, PBC. All rights reserved.
* Licensed under the Elastic License 2.0. See LICENSE.txt for license information.
*--------------------------------------------------------------------------------------------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const ColumnSelectorModalPopup = (props: ColumnSelectorModalPopupProps) =

// Return the cleanup function that will dispose of the disposables.
return () => disposableStore.dispose();
}, [props, props.columnSelectorDataGridInstance]);
}, [props]);

const onKeyDown = (evt: React.KeyboardEvent) => {
if (evt.code === 'Enter' || evt.code === 'Space') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export const DataExplorer = () => {
return () => disposableStore.dispose();
}, [columnsCollapsed, services.accessibilityService, context.instance]);

// Automatic layout useEffect.
// Automatic layout useLayoutEffect.
useLayoutEffect(() => {
// Set the initial width.
const initialWidth = dataExplorerRef.current.offsetWidth;
Expand Down
Loading
Loading