Skip to content

Commit 8f4a62a

Browse files
committed
fix: revert default max_columns to 20 and update options
1 parent 9743122 commit 8f4a62a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

bigframes/display/table_widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function render({ model, el }) {
116116
maxColumnsLabel.textContent = 'Max columns:';
117117

118118
// 0 represents "All"
119-
const maxColumnOptions = [3, 5, 7, 10, 20, 0];
119+
const maxColumnOptions = [5, 10, 15, 20, 0];
120120
for (const cols of maxColumnOptions) {
121121
const option = document.createElement('option');
122122
option.value = cols;

tests/js/table_widget.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ describe('TableWidget', () => {
414414
// Mock basic state
415415
model.get.mockImplementation((property) => {
416416
if (property === 'max_columns') {
417-
return 7;
417+
return 20;
418418
}
419419
return null;
420420
});
@@ -462,7 +462,7 @@ describe('TableWidget', () => {
462462
it('should update model when value changes', () => {
463463
model.get.mockImplementation((property) => {
464464
if (property === 'max_columns') {
465-
return 7;
465+
return 20;
466466
}
467467
return null;
468468
});
@@ -471,12 +471,12 @@ describe('TableWidget', () => {
471471

472472
const select = el.querySelector('.max-columns select');
473473

474-
// Change to 20
475-
select.value = '20';
474+
// Change to 10
475+
select.value = '10';
476476
const event = new Event('change');
477477
select.dispatchEvent(event);
478478

479-
expect(model.set).toHaveBeenCalledWith('max_columns', 20);
479+
expect(model.set).toHaveBeenCalledWith('max_columns', 10);
480480
expect(model.save_changes).toHaveBeenCalled();
481481
});
482482
});

third_party/bigframes_vendored/pandas/core/config_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ class DisplayOptions:
6262
"""
6363

6464
# Options borrowed from pandas.
65-
max_columns: int = 7
65+
max_columns: int = 20
6666
"""
67-
Maximum number of columns to display. Default 7.
67+
Maximum number of columns to display. Default 20.
6868
6969
If `max_columns` is exceeded, switch to truncate view.
7070
"""

0 commit comments

Comments
 (0)