Skip to content

Commit

Permalink
Remove left_side container by default if no content present (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
huong-li-nguyen authored Sep 27, 2023
1 parent 770df7e commit 03b73b9
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Removed
- A bullet item for the Removed category.
-->
<!--
### Added
- A bullet item for the Added category.
-->

### Changed

- Remove `left_side` container by default if there are no elements present ([#68](https://github.com/mckinsey/vizro/pull/68))

<!--
### Deprecated
- A bullet item for the Deprecated category.
-->
<!--
### Fixed
- A bullet item for the Fixed category.
-->
<!--
### Security
- A bullet item for the Security category.
-->
16 changes: 9 additions & 7 deletions vizro-core/docs/pages/development/authors.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
## Current team members

[Joseph Perkins](https://github.com/Joseph-Perkins),
[Dan Dumitriu](https://github.com/dandumitriu1),
[Chiara Pullem](https://github.com/chiara-sophie),
[Antony Milne](https://github.com/antonymilne),
[Huong Li Nguyen](https://github.com/huong-li-nguyen),
[Maximilian Schulz](https://github.com/maxschulz-COL),
[Anna Xiong](https://github.com/AnnaXiongQB),
[Lingyi Zhang](https://github.com/lingyielia),
[Alexey Snigir](https://github.com/l0uden),
[Nadija Graca](https://github.com/nadijagraca),
[Chiara Pullem](https://github.com/chiara-sophie),
[Anna Xiong](https://github.com/AnnaXiongQB),
[Petar Pejovic](https://github.com/petar-qb)
[Alexey Snigir](https://github.com/l0uden),
[Maximilian Schulz](https://github.com/maxschulz-COL),
[Huong Li Nguyen](https://github.com/huong-li-nguyen),
[Dan Dumitriu](https://github.com/dandumitriu1),
[Joseph Perkins](https://github.com/Joseph-Perkins),

## Previous team members and code contributors

[Jo Stichbury](https://github.com/stichbury)
[Juan Luis Cano Rodríguez](https://github.com/astrojuanlu)
[Denis Lebedev](https://github.com/DenisLebedevMcK),
[Qiuyi Chen](https://github.com/Qiuyi-Chen),
[Elena Fridman](https://github.com/EllenWie),
Expand Down
5 changes: 1 addition & 4 deletions vizro-core/src/vizro/models/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,7 @@ def _arrange_containers(page_title, theme_switch, nav_panel, control_panel, comp
children=header_elements,
className="header",
)
left_side = html.Div(
children=left_side_elements,
className="left_side",
)
left_side = html.Div(children=left_side_elements, className="left_side") if any(left_side_elements) else None
right_side_elements = [header, component_container]
right_side = html.Div(
children=right_side_elements,
Expand Down
3 changes: 3 additions & 0 deletions vizro-core/tests/unit/vizro/models/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@ def test_action_auto_generation_valid(self, standard_px_chart):
assert len(page.actions) == 1
assert isinstance(page.actions[0], ActionsChain)
assert page.actions[0].id == f"{ON_PAGE_LOAD_ACTION_PREFIX}_Page 1"


# TODO: Add unit tests for private methods in page build

0 comments on commit 03b73b9

Please sign in to comment.