-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
68222f9
to
2b64cbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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/context/DashboardProvider/view-panel-slice.ts
Outdated
Show resolved
Hide resolved
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>
b84824e
to
cdf2705
Compare
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
cdf2705
to
1dee916
Compare
@@ -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) |
There was a problem hiding this comment.
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 ? 馃槃
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
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:
Dashboard with a panel showed:
Checklist
[<catalog_entry>] <commit message>
naming convention using one of thefollowing
catalog_entry
values:FEATURE
,ENHANCEMENT
,BUGFIX
,BREAKINGCHANGE
,DOC
,IGNORE
.UI Changes
See Storybook
and e2e docs for more details. Common issues
include: