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

Introduce page-header for dashboard-title and settings #238

Merged
merged 33 commits into from
Jan 16, 2024

Conversation

huong-li-nguyen
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen commented Dec 22, 2023

Description

Context: There are currently some issues with the dashboard-title position:

  • Current positions takes a lot of horizontal space if there are no controls/navigations
  • Hierarchy is not clear as title is on the same level as nav-bar and page-title
    Screenshot 2024-01-02 at 22 05 16

Introduction of page-header:

  • Solves for issues explained above
  • Creates space for yet-to-come horizontal nav-bar
  • Enables simple positioning of logo (squared and rectangular format)

Above solution required several CSS changes such that it looks good with the page-header as well, see code for more details

Layout Screenshots

Take a look at the Miro board - there are several screenshots that show you how it looks now here

Container Structure

https://miro.com/app/board/o9J_ldRDmCQ=/?moveToWidget=3458764572914015668&cot=14
Screenshot 2024-01-03 at 13 00 18

Screenshot

In the Miro board there are more screenshots - adding a selected one here:

Screenshot 2024-01-02 at 22 06 02

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 authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • 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.

@huong-li-nguyen huong-li-nguyen changed the title Changing dashboard-title position to upper-header Change dashboard-title position to upper-header Dec 22, 2023
@huong-li-nguyen huong-li-nguyen self-assigned this Dec 22, 2023
@huong-li-nguyen huong-li-nguyen changed the title Change dashboard-title position to upper-header Introduce page-header for dashboard-title, logo and settings Dec 22, 2023
@huong-li-nguyen huong-li-nguyen force-pushed the dev/dashboard_title_position branch from 3926b9b to aaebcee Compare January 2, 2024 16:01
@huong-li-nguyen huong-li-nguyen marked this pull request as ready for review January 2, 2024 21:07
@maxschulz-COL
Copy link
Contributor

Starting having a look. I tried to understand these changes in the context of #205, but it was a little tricky to do as the graphic does not seem to match anymore. Do you think it makes sense to provide an update of that?

@huong-li-nguyen
Copy link
Contributor Author

huong-li-nguyen commented Jan 3, 2024

Starting having a look. I tried to understand these changes in the context of #205, but it was a little tricky to do as the graphic does not seem to match anymore. Do you think it makes sense to provide an update of that?

Sure, I've updated the PR description 👍 In general, it's best to check the attached Miro links, I've added screenshots of the layout everywhere so you can imagine how it will look like. This just adds another layer of outer containers and moves the dashboard title, settings and logo in the page-header container. The rest remains the same and will live in the page-main container. The settings container will move into the page-header or right-header depending whether the page-header exists or not.

Copy link
Contributor

@maxschulz-COL maxschulz-COL left a comment

Choose a reason for hiding this comment

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

Lgtm! 🚀 The graphic really helped, I think its good to have it in a PR for public view 🙏

vizro-core/src/vizro/models/_dashboard.py Outdated Show resolved Hide resolved
@huong-li-nguyen huong-li-nguyen changed the title Introduce page-header for dashboard-title, logo and settings Introduce page-header for dashboard-title and settings Jan 4, 2024
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.

I just had one small comment, but otherwise looks good. I like the new design with the dashboard title separated (makes much more sense and the hierarchy is clear). 🚀

Copy link
Contributor

@antonymilne antonymilne left a comment

Choose a reason for hiding this comment

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

This is great I think, definitely feels like a good solution to me 👍

As per a comment left on your other PR, I do wonder whether we should be changing some of these divs to more semantic elements, but it's really not important and definitely not worth doing now.

vizro-core/src/vizro/models/_dashboard.py Show resolved Hide resolved
vizro-core/src/vizro/models/_dashboard.py Outdated Show resolved Hide resolved
@huong-li-nguyen huong-li-nguyen merged commit b0d2790 into main Jan 16, 2024
33 checks passed
@huong-li-nguyen huong-li-nguyen deleted the dev/dashboard_title_position branch January 16, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants