Skip to content

Commit 3e0989a

Browse files
authored
Realign %seed widgets to fix truncated descriptions (#531)
* Realign %seed widgets to fix truncated descriptions * update changelog
1 parent 5db204e commit 3e0989a

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd
1212
- Fixed unit test workflows failing on type check assertion ([Link to PR](https://github.com/aws/graph-notebook/pull/514))
1313
- Fixed bad queries in openCypher Language Tutorial samples ([PR #1](https://github.com/aws/graph-notebook/pull/525)) ([PR #2](https://github.com/aws/graph-notebook/pull/526))
1414
- Fixed kernel crashing with ZMQ errors on magic execution ([Link to PR](https://github.com/aws/graph-notebook/pull/517))
15+
- Fixed truncated descriptions for some `%seed` fields ([Link to PR](https://github.com/aws/graph-notebook/pull/531))
1516
- Unpinned `boto3` and `botocore` to support NeptuneData SDK ([Link to PR](https://github.com/aws/graph-notebook/pull/528))
1617

1718
## Release 3.8.2 (June 5, 2023)

src/graph_notebook/magics/graph_magic.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
SEED_LANGUAGE_OPTIONS = ['', 'gremlin', 'opencypher', 'sparql']
108108
SEED_SOURCE_OPTIONS = ['', 'samples', 'custom']
109109
SEED_NO_DATASETS_FOUND_MSG = "(No datasets available)"
110+
SEED_WIDGET_STYLE = {'description_width': '95px'}
110111

111112
LOADER_FORMAT_CHOICES = ['']
112113
LOADER_FORMAT_CHOICES.extend(VALID_FORMATS)
@@ -2044,56 +2045,64 @@ def seed(self, line, local_ns: dict = None):
20442045
source_dropdown = widgets.Dropdown(
20452046
options=SEED_SOURCE_OPTIONS,
20462047
description='Source type:',
2047-
disabled=False
2048+
disabled=False,
2049+
style=SEED_WIDGET_STYLE
20482050
)
20492051

20502052
model_dropdown = widgets.Dropdown(
20512053
options=SEED_MODEL_OPTIONS,
20522054
description='Data model:',
20532055
disabled=False,
2054-
layout=widgets.Layout(display='none')
2056+
layout=widgets.Layout(display='none'),
2057+
style=SEED_WIDGET_STYLE
20552058
)
20562059

20572060
custom_language_dropdown = widgets.Dropdown(
20582061
options=SEED_LANGUAGE_OPTIONS,
20592062
description='Language:',
20602063
disabled=False,
2061-
layout=widgets.Layout(display='none')
2064+
layout=widgets.Layout(display='none'),
2065+
style=SEED_WIDGET_STYLE
20622066
)
20632067

20642068
samples_pg_language_dropdown = widgets.Dropdown(
20652069
options=SEED_LANGUAGE_OPTIONS[:3],
20662070
description='Language:',
20672071
disabled=False,
2068-
layout=widgets.Layout(display='none')
2072+
layout=widgets.Layout(display='none'),
2073+
style=SEED_WIDGET_STYLE
20692074
)
20702075

20712076
data_set_drop_down = widgets.Dropdown(
20722077
description='Data set:',
20732078
disabled=False,
2074-
layout=widgets.Layout(display='none')
2079+
layout=widgets.Layout(display='none'),
2080+
style=SEED_WIDGET_STYLE
20752081
)
20762082

20772083
fullfile_option_dropdown = widgets.Dropdown(
20782084
description='Full File Query:',
20792085
options=[True, False],
20802086
value=args.full_file_query,
20812087
disabled=False,
2082-
layout=widgets.Layout(display='none')
2088+
layout=widgets.Layout(display='none'),
2089+
style=SEED_WIDGET_STYLE
20832090
)
20842091

20852092
location_option_dropdown = widgets.Dropdown(
20862093
description='Location:',
20872094
options=['Local', 'S3'],
20882095
value='Local',
20892096
disabled=False,
2090-
layout=widgets.Layout(display='none')
2097+
layout=widgets.Layout(display='none'),
2098+
style=SEED_WIDGET_STYLE
20912099
)
20922100

20932101
seed_file_location_text = widgets.Text(
20942102
description='Source:',
20952103
placeholder='path/to/seedfiles/directory',
2096-
disabled=False
2104+
disabled=False,
2105+
style=SEED_WIDGET_STYLE
20972106
)
20982107

20992108
seed_file_location = FileChooser()

0 commit comments

Comments
 (0)