Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove left_side container by default if no content present #68

Merged
merged 7 commits into from
Sep 27, 2023

Conversation

huong-li-nguyen
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen commented Sep 26, 2023

Description

  • Remove left_side container by default if no content present (no dashboard_title, controls, single page)

Screenshot

Example Code:

import os
import vizro.plotly.express as px
from vizro import Vizro
import vizro.models as vm

df = px.data.iris()

page = vm.Page(
    title="My first dashboard",
    components=[
        vm.Graph(id="scatter_chart", figure=px.scatter(df, x="sepal_length", y="petal_width", color="species")),
        vm.Graph(id="hist_chart", figure=px.histogram(df, x="sepal_width", color="species")),
    ],
)

dashboard = vm.Dashboard(pages=[page])

if __name__ == "__main__":
    Vizro._user_assets_folder = os.path.abspath("../assets")
    Vizro().build(dashboard).run()

Screenshot 2023-09-26 at 15 09 44

Checklist

  • I have not referenced individuals, products or companies in any commits, directly or indirectly
  • I have not added data or restricted code in any commits, directly or indirectly
  • I have updated the docstring of any public function/class/model changed
  • I have added the PR number to the change description in the changelog fragment, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) (if applicable)
  • I have added tests to cover my changes (if applicable)

Types of changes

  • Docs/refactoring (non-breaking change which improves codebase)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

@huong-li-nguyen huong-li-nguyen changed the title Remove `left side´ container by default if no content present Remove left_side container by default if no content present Sep 26, 2023
@huong-li-nguyen huong-li-nguyen self-assigned this Sep 26, 2023
@huong-li-nguyen huong-li-nguyen added Issue: Feature Request 🤓 Issue/PR contains a feature request or is based on a feature request Status: Ready for Review ☑️ Issue/PR is ready for review - all tests have passed labels Sep 26, 2023
@huong-li-nguyen huong-li-nguyen marked this pull request as ready for review September 26, 2023 15:49
nadijagraca
nadijagraca previously approved these changes Sep 26, 2023
Copy link
Contributor

@nadijagraca nadijagraca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks so much more polished. 🚀

petar-qb
petar-qb previously approved these changes Sep 27, 2023
@huong-li-nguyen huong-li-nguyen enabled auto-merge (squash) September 27, 2023 08:10
@huong-li-nguyen huong-li-nguyen merged commit 03b73b9 into main Sep 27, 2023
26 of 39 checks passed
@huong-li-nguyen huong-li-nguyen deleted the feat/remove_left_side branch September 27, 2023 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Feature Request 🤓 Issue/PR contains a feature request or is based on a feature request Status: Ready for Review ☑️ Issue/PR is ready for review - all tests have passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants