Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
88fcf76
feat: set up Angular infrastructure for TableWidget
shuoweil May 4, 2026
2393021
feat: implement DOM sanitization in Angular bridge
shuoweil May 4, 2026
49b7977
feat: address code review comments and add license headers
shuoweil May 4, 2026
2b6a9fb
test: test pre-commit hook after noxfile fix
shuoweil May 5, 2026
b959885
Merge branch 'main' into shuowei-angular
shuoweil May 8, 2026
1e0990f
Alphabetize CSS declarations in app.ts
shuoweil May 8, 2026
d3bf48c
feat: add callback parameter to _read_gbq_colab
shuoweil May 14, 2026
4258639
Merge branch 'main' into shuowei-filter-execution-history
shuoweil May 15, 2026
7574f22
feat: support execution history filtering by events and job_ids
shuoweil May 15, 2026
eccd236
Merge branch 'main' into shuowei-filter-execution-history
shuoweil May 15, 2026
d2eea39
feat: support automatic per-cell execution history filtering
shuoweil May 15, 2026
21d5dd8
format code
shuoweil May 15, 2026
97c7260
fix: avoid mutating extra_query_labels in place
shuoweil May 16, 2026
f080dda
format code
shuoweil May 16, 2026
4bd2735
fix: update pre-commit config to use ruff
shuoweil May 16, 2026
9dd03ed
Merge branch 'main' into shuowei-filter-execution-history
shuoweil May 18, 2026
dcae615
fix mypy
shuoweil May 18, 2026
eb548b6
Merge branch 'main' into shuowei-filter-execution-history
shuoweil May 18, 2026
7db1330
feat: universal per-cell execution history filtering
shuoweil May 18, 2026
da6682c
format code
shuoweil May 18, 2026
0ef9216
revert .pre-commit-config.yaml to old black/flake8 config
shuoweil May 18, 2026
2e3de3d
Merge branch 'main' into shuowei-angular
shuoweil May 19, 2026
3cc2770
chore: clean up angular boilerplate and add copyright headers
shuoweil May 19, 2026
65dce43
Merge branch 'main' into shuowei-angular
shuoweil May 19, 2026
c31f5a5
feat: rewrite TableWidget core in Angular
shuoweil May 19, 2026
3b4f7d7
fix(display): cast JSON and nested struct columns to string for anywi…
shuoweil May 19, 2026
cef1518
format code
shuoweil May 19, 2026
efe189d
Merge branch 'main' into shuowei-angular-rewrite-core
shuoweil May 19, 2026
5282e6d
opt(display): batch df.assign calls for json display serialization
shuoweil May 19, 2026
b3c5577
format code
shuoweil May 19, 2026
8a60c13
Merge branch 'main' into shuowei-angular
shuoweil May 20, 2026
66fe150
Merge branch 'main' into shuowei-filter-execution-history
shuoweil May 20, 2026
b9c9336
feat: propagate cell execution count to widget queries and rename his…
shuoweil May 20, 2026
5f9d824
refactor: deduplicate ipython execution count
shuoweil May 20, 2026
d9a5593
feat: change default of execution history all_cells to True
shuoweil May 20, 2026
0c8f8c7
fix IPython mocking in unit tests
shuoweil May 20, 2026
81bf807
Merge main
shuoweil May 21, 2026
409a2fb
Merge branch 'main' into shuowei-filter-execution-history
shuoweil May 22, 2026
609f1a7
Merge branch 'main' into shuowei-angular
shuoweil May 22, 2026
d984db9
Merge branch 'shuowei-angular' into shuowei-angular-rewrite-core
shuoweil May 22, 2026
3c2c0d7
fix(display): update test_html.py unit test for display refactoring
shuoweil May 22, 2026
86e9842
refactor(display): rename display function to _process_display_df
shuoweil May 22, 2026
f158662
Merge branch 'main' into shuowei-filter-execution-history
shuoweil May 26, 2026
eb3934b
address pr review comments on execution history
shuoweil May 26, 2026
ee477b8
format code
shuoweil May 26, 2026
f183e36
Merge branch 'main' into shuowei-angular-rewrite-core
shuoweil May 28, 2026
b6ae358
Merge remote-tracking branch 'origin/shuowei-filter-execution-history…
shuoweil May 28, 2026
94f2761
Merge branch 'main' into shuowei-angular-rewrite-core
shuoweil Jun 5, 2026
4d9a145
Fix Angular bootstrap by providing zoneless change detection
shuoweil Jun 5, 2026
da8dffb
Merge branch 'main' into shuowei-angular-rewrite-core
shuoweil Jun 9, 2026
6a82838
fix: use createApplication to bootstrap widget on element
shuoweil Jun 10, 2026
973bdac
docs: rerun notebook
shuoweil Jun 10, 2026
e93a7a7
test: add unit test for angular widget bootstrap
shuoweil Jun 10, 2026
b3e2220
Merge branch 'main' into shuowei-angular-rewrite-core
shuoweil Jun 10, 2026
a18e7be
test: clean up redundant comments in test
shuoweil Jun 10, 2026
7e663e8
Update packages/bigframes/bigframes/display/table_widget_angular/src/…
shuoweil Jun 10, 2026
3ac7567
Update packages/bigframes/bigframes/display/table_widget_angular/src/…
shuoweil Jun 10, 2026
bb539ca
Update packages/bigframes/bigframes/display/table_widget_angular/src/…
shuoweil Jun 10, 2026
fcea30a
Update packages/bigframes/bigframes/display/table_widget_angular/src/…
shuoweil Jun 10, 2026
9adb442
fix: address table widget angular code review comments
shuoweil Jun 11, 2026
80fc691
Merge branch 'main' into shuowei-angular-rewrite-core
shuoweil Jun 11, 2026
a55af3e
format
shuoweil Jun 11, 2026
07c77fe
style: format table widget angular and tests to 80-char limit
shuoweil Jun 11, 2026
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
4 changes: 2 additions & 2 deletions packages/bigframes/bigframes/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def __repr__(self) -> str:
column_count=len(self.columns),
)

def _get_display_df(self) -> DataFrame:
def _process_display_df(self) -> tuple[DataFrame, list[str]]:
"""Process ObjectRef and JSON/nested JSON columns for display."""
df = self
# Arrow/Pandas to_pandas_batches does not support raw JSON/nested JSON
Expand All @@ -837,7 +837,7 @@ def _get_display_df(self) -> DataFrame:
sql_template="TO_JSON_STRING({0})",
)
df = df.assign(**{col: df[col]._apply_unary_op(op) for col in json_cols})
return df
return df, []

def _repr_mimebundle_(self, include=None, exclude=None):
"""
Expand Down
4 changes: 2 additions & 2 deletions packages/bigframes/bigframes/display/anywidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ def _on_initial_load_complete(self, change: dict[str, Any]):

@functools.cached_property
def _esm(self):
"""Load JavaScript code from external file."""
return resources.read_text(bigframes.display, "table_widget.js")
"""Load JavaScript code from the compiled Angular hybrid bundle."""
return resources.read_text(bigframes.display, "table_widget_angular.js")

@functools.cached_property
def _css(self):
Expand Down
26 changes: 21 additions & 5 deletions packages/bigframes/bigframes/display/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import bigframes.formatting_helpers as formatter
from bigframes._config import display_options, options
from bigframes.display import plaintext
from bigframes.series import Series

if typing.TYPE_CHECKING:
import bigframes.dataframe
Expand Down Expand Up @@ -192,9 +191,11 @@ def create_html_representation(
total_columns: int,
) -> str:
"""Create an HTML representation of the DataFrame or Series."""
import bigframes.series

opts = options.display
with display_options.pandas_repr(opts):
if isinstance(obj, Series):
if isinstance(obj, bigframes.series.Series):
pd_series = pandas_df.iloc[:, 0]
try:
html_string = pd_series._repr_html_()
Expand All @@ -216,7 +217,9 @@ def create_html_representation(
def _get_obj_metadata(
obj: Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
) -> tuple[bool, bool]:
is_series = isinstance(obj, Series)
import bigframes.series

is_series = isinstance(obj, bigframes.series.Series)
if is_series:
has_index = len(obj._block.index_columns) > 0
else:
Expand All @@ -233,9 +236,15 @@ def get_anywidget_bundle(
Helper method to create and return the anywidget mimebundle.
This function encapsulates the logic for anywidget display.
"""
import bigframes.series
from bigframes import display

df = obj._get_display_df()
if isinstance(obj, bigframes.series.Series):
df = obj.to_frame()
else:
df = obj

df, _ = df._process_display_df()

widget = display.TableWidget(df)
widget_repr_result = widget._repr_mimebundle_(include=include, exclude=exclude)
Expand Down Expand Up @@ -283,8 +292,15 @@ def repr_mimebundle_deferred(
def repr_mimebundle_head(
obj: Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
) -> dict[str, str]:
import bigframes.series

opts = options.display
df = obj._get_display_df()
if isinstance(obj, bigframes.series.Series):
df = obj.to_frame()
else:
df = obj

df, _ = df._process_display_df()
pandas_df, row_count, query_job = df._block.retrieve_repr_request_results(
opts.max_rows
)
Expand Down
Loading
Loading