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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Panels can be viewed in full screen #1991

Merged
merged 5 commits into from
May 16, 2024

Conversation

Gladorme
Copy link
Member

@Gladorme Gladorme commented May 14, 2024

Description

Add a panel action to show a panel "full-screen", it will still show nav + dashboard header (variables, ...)
Removing footer on dashboard view (better for full screen panel visualization) 馃檲

Screenshots

Dashboard with no panel showed:
image

Dashboard with a panel showed:
image

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • Visual tests are stable and unlikely to be flaky.
    See Storybook
    and e2e docs for more details. Common issues
    include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

@Gladorme Gladorme force-pushed the gladorme/panel-full-screen branch from 68222f9 to 2b64cbe Compare May 14, 2024 14:21
@Gladorme Gladorme marked this pull request as ready for review May 15, 2024 15:34
Copy link
Contributor

@AntoineThebaud AntoineThebaud left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@celian-garcia celian-garcia left a comment

Choose a reason for hiding this comment

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

That's really amazing! I love this new feature and the way you implemented it.

I totally don't understand the zustand part and I guess it's been a nightmare to implement but you seem to not introduce new notion. Just subscribing yourself in the current implementation.

Congrats!

ui/dashboards/src/components/Dashboard/Dashboard.tsx Outdated Show resolved Hide resolved
ui/dashboards/src/views/ViewDashboard/ViewDashboard.tsx Outdated Show resolved Hide resolved
ui/dashboards/src/components/Panel/Panel.tsx Outdated Show resolved Hide resolved
@celian-garcia
Copy link
Member

Little last comment, you could make the icon reversed when we're in full size and want to reduce back to normal.

Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
@Gladorme Gladorme force-pushed the gladorme/panel-full-screen branch from b84824e to cdf2705 Compare May 16, 2024 09:53
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
@Gladorme Gladorme force-pushed the gladorme/panel-full-screen branch from cdf2705 to 1dee916 Compare May 16, 2024 10:00
@@ -26,16 +27,20 @@ export type DashboardProps = BoxProps & {
emptyDashboardProps?: EmptyDashboardProps;
panelOptions?: PanelOptions;
};
const HEADER_HEIGHT = 165; // Approximate height of the header in dashboard view (including the navbar and variables toolbar)
Copy link
Member

Choose a reason for hiding this comment

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

Is this working if user zoom in the browser ? 馃槃

Copy link
Member Author

@Gladorme Gladorme May 16, 2024

Choose a reason for hiding this comment

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

Well it's an approximate height for desktop screen, this value is here only while the ref is not loaded. I think I can set it to 0 馃

import { StringParam, useQueryParam } from 'use-query-params';
import { DashboardProvider, DashboardProviderProps } from './DashboardProvider';

export function DashboardProviderWithQueryParams({ children, initialState }: DashboardProviderProps) {
Copy link
Member

Choose a reason for hiding this comment

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

<3

@Gladorme Gladorme added this pull request to the merge queue May 16, 2024
Merged via the queue into main with commit fbaba7a May 16, 2024
19 checks passed
@Gladorme Gladorme deleted the gladorme/panel-full-screen branch May 16, 2024 10:28
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.

None yet

3 participants