Skip to content

Commit 468b47d

Browse files
authored
fix: removed irregular spacing (#1252)
1 parent ed293bc commit 468b47d

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

src/ydata_profiling/report/presentation/core/dropdown.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class Dropdown(ItemRenderer):
99
def __init__(
10-
self, name: str, id: str, items: list, item: Container, anchor_id: str, **kwargs
10+
self, name: str, id: str, items: list, item: Container, anchor_id: str, classes: list, is_row: bool, **kwargs
1111
):
1212
super().__init__(
1313
"dropdown",
@@ -17,6 +17,8 @@ def __init__(
1717
"items": items,
1818
"item": item,
1919
"anchor_id": anchor_id,
20+
"classes": " ".join(classes),
21+
"is_row": is_row,
2022
},
2123
**kwargs
2224
)
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
<select name="{{ name }}" id="{{ id }}">
2-
<option value="">Select Columns</option>
3-
{% for item in items %}
4-
<option value="{{ item }}">{{ item }}</option>
5-
{% endfor %}
6-
</select>
1+
{%if is_row%}
2+
<div class="row spacing">
3+
{%endif%}
4+
<select name="{{ name }}" id="{{ id }}" class = "{{ classes }}">
5+
<option value="">Select Columns</option>
6+
{% for item in items %}
7+
<option value="{{ item }}">{{ item }}</option>
8+
{% endfor %}
9+
</select>
10+
{%if is_row%}
11+
</div>
12+
{%endif%}
713

814
{{ item.render() }}

src/ydata_profiling/report/structure/report.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ def get_report_structure(config: Settings, summary: dict) -> Root:
376376
name="Variables",
377377
anchor_id="variables-dropdown",
378378
id="variables-dropdown",
379+
is_row=True,
380+
classes=["btn", "btn-secondary", "dropdown-toggle"],
379381
items=list(summary["variables"]),
380382
item=Container(
381383
render_variables_section(config, summary),

0 commit comments

Comments
 (0)