Skip to content

Commit 5ce5d63

Browse files
authored
fix: do not scroll page selector in anywidget repr_mode (#2082)
1 parent a52b913 commit 5ce5d63

File tree

3 files changed

+21
-32
lines changed

3 files changed

+21
-32
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ repos:
4343
exclude: "^third_party"
4444
args: ["--check-untyped-defs", "--explicit-package-bases", "--ignore-missing-imports"]
4545
- repo: https://github.com/biomejs/pre-commit
46-
rev: v2.0.2
46+
rev: v2.2.4
4747
hooks:
4848
- id: biome-check
4949
files: '\.(js|css)$'

bigframes/display/table_widget.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
*/
1616

1717
.bigframes-widget {
18-
display: inline-block;
18+
display: flex;
19+
flex-direction: column;
1920
}
2021

2122
.bigframes-widget .table-container {

notebooks/dataframes/anywidget_mode.ipynb

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
{
3434
"cell_type": "code",
35-
"execution_count": 2,
35+
"execution_count": 1,
3636
"id": "ca22f059",
3737
"metadata": {},
3838
"outputs": [],
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "code",
53-
"execution_count": 3,
53+
"execution_count": 2,
5454
"id": "1bc5aaf3",
5555
"metadata": {},
5656
"outputs": [],
@@ -69,22 +69,10 @@
6969
},
7070
{
7171
"cell_type": "code",
72-
"execution_count": 4,
72+
"execution_count": 3,
7373
"id": "f289d250",
7474
"metadata": {},
7575
"outputs": [
76-
{
77-
"data": {
78-
"text/html": [
79-
"Query job a643d120-4af9-44fc-ba3c-ed461cf1092b is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:a643d120-4af9-44fc-ba3c-ed461cf1092b&page=queryresults\">Open Job</a>"
80-
],
81-
"text/plain": [
82-
"<IPython.core.display.HTML object>"
83-
]
84-
},
85-
"metadata": {},
86-
"output_type": "display_data"
87-
},
8876
{
8977
"name": "stdout",
9078
"output_type": "stream",
@@ -108,7 +96,7 @@
10896
},
10997
{
11098
"cell_type": "code",
111-
"execution_count": 5,
99+
"execution_count": 4,
112100
"id": "42bb02ab",
113101
"metadata": {},
114102
"outputs": [
@@ -135,19 +123,19 @@
135123
},
136124
{
137125
"cell_type": "code",
138-
"execution_count": 6,
126+
"execution_count": 5,
139127
"id": "ce250157",
140128
"metadata": {},
141129
"outputs": [
142130
{
143131
"data": {
144132
"application/vnd.jupyter.widget-view+json": {
145-
"model_id": "d2d4ef22ea9f414b89ea5bd85f0e6635",
133+
"model_id": "a85f5799996d4de1a7912182c43fdf54",
146134
"version_major": 2,
147135
"version_minor": 1
148136
},
149137
"text/plain": [
150-
"TableWidget(page_size=10, row_count=5552452, table_html='<table border=\"1\" class=\"table table-striped table-ho"
138+
"TableWidget(page_size=10, row_count=5552452, table_html='<table border=\"1\" class=\"dataframe table table-stripe"
151139
]
152140
},
153141
"metadata": {},
@@ -160,7 +148,7 @@
160148
"Computation deferred. Computation will process 171.4 MB"
161149
]
162150
},
163-
"execution_count": 6,
151+
"execution_count": 5,
164152
"metadata": {},
165153
"output_type": "execute_result"
166154
}
@@ -179,7 +167,7 @@
179167
},
180168
{
181169
"cell_type": "code",
182-
"execution_count": 7,
170+
"execution_count": 6,
183171
"id": "6920d49b",
184172
"metadata": {},
185173
"outputs": [
@@ -193,15 +181,15 @@
193181
{
194182
"data": {
195183
"application/vnd.jupyter.widget-view+json": {
196-
"model_id": "121e3d2f28004036a922e3a11a08d4b7",
184+
"model_id": "261075a0d1d2487f804926884fe55eb2",
197185
"version_major": 2,
198186
"version_minor": 1
199187
},
200188
"text/plain": [
201-
"TableWidget(page_size=10, row_count=5552452, table_html='<table border=\"1\" class=\"table table-striped table-ho"
189+
"TableWidget(page_size=10, row_count=5552452, table_html='<table border=\"1\" class=\"dataframe table table-stripe"
202190
]
203191
},
204-
"execution_count": 7,
192+
"execution_count": 6,
205193
"metadata": {},
206194
"output_type": "execute_result"
207195
}
@@ -228,7 +216,7 @@
228216
},
229217
{
230218
"cell_type": "code",
231-
"execution_count": 8,
219+
"execution_count": 7,
232220
"id": "12b68f15",
233221
"metadata": {},
234222
"outputs": [
@@ -265,15 +253,15 @@
265253
},
266254
{
267255
"cell_type": "code",
268-
"execution_count": 9,
256+
"execution_count": 8,
269257
"id": "a9d5d13a",
270258
"metadata": {},
271259
"outputs": [
272260
{
273261
"name": "stderr",
274262
"output_type": "stream",
275263
"text": [
276-
"/usr/local/google/home/swast/src/github.com/googleapis/python-bigquery-dataframes/bigframes/core/array_value.py:230: AmbiguousWindowWarning: Window ordering may be ambiguous, this can cause unstable results.\n",
264+
"/usr/local/google/home/swast/src/github.com/googleapis/python-bigquery-dataframes/bigframes/core/array_value.py:231: AmbiguousWindowWarning: Window ordering may be ambiguous, this can cause unstable results.\n",
277265
" warnings.warn(msg, bfe.AmbiguousWindowWarning)\n"
278266
]
279267
},
@@ -287,15 +275,15 @@
287275
{
288276
"data": {
289277
"application/vnd.jupyter.widget-view+json": {
290-
"model_id": "5ed335bbbc064e5391ea06a9a218642e",
278+
"model_id": "b37aec5d1c534e9f810e18c4fa7b8491",
291279
"version_major": 2,
292280
"version_minor": 1
293281
},
294282
"text/plain": [
295-
"TableWidget(page_size=10, row_count=5, table_html='<table border=\"1\" class=\"table table-striped table-hover\" i"
283+
"TableWidget(page_size=10, row_count=5, table_html='<table border=\"1\" class=\"dataframe table table-striped tabl"
296284
]
297285
},
298-
"execution_count": 9,
286+
"execution_count": 8,
299287
"metadata": {},
300288
"output_type": "execute_result"
301289
}

0 commit comments

Comments
 (0)