Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Frontend V2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GraphPolaris
Frontend V2
Commits
2918bca7
Commit
2918bca7
authored
1 year ago
by
Vink, S.A. (Sjoerd)
Browse files
Options
Downloads
Patches
Plain Diff
feat(visManager): full screen for vis
parent
270198c7
No related branches found
No related tags found
2 merge requests
!135
geo intergation
,
!129
Feat/visManager
Pipeline
#131642
passed
1 year ago
Stage: tag-release
Stage: get-release-tag
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/web/src/app/app.tsx
+26
-6
26 additions, 6 deletions
apps/web/src/app/app.tsx
libs/shared/lib/vis/components/bar.tsx
+3
-2
3 additions, 2 deletions
libs/shared/lib/vis/components/bar.tsx
libs/shared/lib/vis/components/panel.tsx
+2
-2
2 additions, 2 deletions
libs/shared/lib/vis/components/panel.tsx
with
31 additions
and
10 deletions
apps/web/src/app/app.tsx
+
26
−
6
View file @
2918bca7
...
@@ -59,6 +59,7 @@ export function App(props: App) {
...
@@ -59,6 +59,7 @@ export function App(props: App) {
const
[
authCheck
,
setAuthCheck
]
=
useState
(
false
);
const
[
authCheck
,
setAuthCheck
]
=
useState
(
false
);
const
[
tab
,
setTab
]
=
useState
<
SideNavTab
>
(
'
Schema
'
);
const
[
tab
,
setTab
]
=
useState
<
SideNavTab
>
(
'
Schema
'
);
const
[
visFullSize
,
setVisFullSize
]
=
useState
<
boolean
>
(
true
);
return
(
return
(
<
div
className
=
"h-screen w-screen overflow-clip"
>
<
div
className
=
"h-screen w-screen overflow-clip"
>
...
@@ -114,14 +115,33 @@ export function App(props: App) {
...
@@ -114,14 +115,33 @@ export function App(props: App) {
</
div
>
</
div
>
)
:
null
}
)
:
null
}
<
div
className
=
"h-full w-full flex-grow"
>
<
div
className
=
"h-full w-full flex-grow"
>
<
Resizable
divisorSize
=
{
3
}
horizontal
=
{
false
}
>
{
visFullSize
?
(
<
div
className
=
"w-full h-full border"
>
<
div
className
=
"w-full h-full border"
>
<
VisualizationPanel
manager
=
{
manager
}
/>
<
VisualizationPanel
manager
=
{
manager
}
fullSize
=
{
()
=>
{
setVisFullSize
(
!
visFullSize
);
tab
===
undefined
&&
setTab
(
'
Schema
'
);
tab
!==
undefined
&&
setTab
(
undefined
);
}
}
/>
</
div
>
</
div
>
<
div
className
=
"w-full h-full border"
>
)
:
(
<
QueryBuilder
onRunQuery
=
{
runQuery
}
/>
<
Resizable
divisorSize
=
{
3
}
horizontal
=
{
false
}
>
</
div
>
<
div
className
=
"w-full h-full border"
>
</
Resizable
>
<
VisualizationPanel
manager
=
{
manager
}
fullSize
=
{
()
=>
{
setVisFullSize
(
!
visFullSize
);
setTab
(
undefined
);
}
}
/>
</
div
>
<
div
className
=
"w-full h-full border"
>
<
QueryBuilder
onRunQuery
=
{
runQuery
}
/>
</
div
>
</
Resizable
>
)
}
</
div
>
</
div
>
</
Resizable
>
</
Resizable
>
<
div
className
=
"h-full w-60 ml-1"
>
<
div
className
=
"h-full w-60 ml-1"
>
...
...
This diff is collapsed.
Click to expand it.
libs/shared/lib/vis/components/bar.tsx
+
3
−
2
View file @
2918bca7
...
@@ -9,9 +9,10 @@ import { VisualizationManagerType } from '../hooks';
...
@@ -9,9 +9,10 @@ import { VisualizationManagerType } from '../hooks';
type
Props
=
{
type
Props
=
{
manager
:
VisualizationManagerType
;
manager
:
VisualizationManagerType
;
fullSize
:
()
=>
void
;
};
};
export
default
function
VisualizationBar
({
manager
}:
Props
)
{
export
default
function
VisualizationBar
({
manager
,
fullSize
}:
Props
)
{
const
handleDragStart
=
(
e
:
React
.
DragEvent
<
HTMLDivElement
>
,
visId
:
string
)
=>
{
const
handleDragStart
=
(
e
:
React
.
DragEvent
<
HTMLDivElement
>
,
visId
:
string
)
=>
{
e
.
dataTransfer
.
setData
(
'
text/plain
'
,
visId
);
e
.
dataTransfer
.
setData
(
'
text/plain
'
,
visId
);
};
};
...
@@ -97,7 +98,7 @@ export default function VisualizationBar({ manager }: Props) {
...
@@ -97,7 +98,7 @@ export default function VisualizationBar({ manager }: Props) {
<
TooltipProvider
delayDuration
=
{
0
}
>
<
TooltipProvider
delayDuration
=
{
0
}
>
<
Tooltip
>
<
Tooltip
>
<
TooltipTrigger
>
<
TooltipTrigger
>
<
Button
type
=
"secondary"
variant
=
"ghost"
size
=
"xs"
iconComponent
=
{
<
Fullscreen
/>
}
onClick
=
{
()
=>
{}
}
/>
<
Button
type
=
"secondary"
variant
=
"ghost"
size
=
"xs"
iconComponent
=
{
<
Fullscreen
/>
}
onClick
=
{
fullSize
}
/>
</
TooltipTrigger
>
</
TooltipTrigger
>
<
TooltipContent
side
=
{
'
bottom
'
}
>
<
TooltipContent
side
=
{
'
bottom
'
}
>
<
p
>
Full screen
</
p
>
<
p
>
Full screen
</
p
>
...
...
This diff is collapsed.
Click to expand it.
libs/shared/lib/vis/components/panel.tsx
+
2
−
2
View file @
2918bca7
...
@@ -4,7 +4,7 @@ import VisualizationBar from './bar';
...
@@ -4,7 +4,7 @@ import VisualizationBar from './bar';
import
{
VisualizationManagerType
}
from
'
../hooks
'
;
import
{
VisualizationManagerType
}
from
'
../hooks
'
;
import
{
Recommender
,
NoData
,
Querying
}
from
'
../views
'
;
import
{
Recommender
,
NoData
,
Querying
}
from
'
../views
'
;
export
const
VisualizationPanel
=
({
manager
}:
{
manager
:
VisualizationManagerType
})
=>
{
export
const
VisualizationPanel
=
({
manager
,
fullSize
}:
{
manager
:
VisualizationManagerType
;
fullSize
:
()
=>
void
})
=>
{
const
query
=
useQuerybuilderGraph
();
const
query
=
useQuerybuilderGraph
();
const
graphQueryResult
=
useGraphQueryResult
();
const
graphQueryResult
=
useGraphQueryResult
();
...
@@ -21,7 +21,7 @@ export const VisualizationPanel = ({ manager }: { manager: VisualizationManagerT
...
@@ -21,7 +21,7 @@ export const VisualizationPanel = ({ manager }: { manager: VisualizationManagerT
return
(
return
(
<
div
className
=
"vis-panel h-full w-full"
>
<
div
className
=
"vis-panel h-full w-full"
>
<
VisualizationBar
manager
=
{
manager
}
/>
<
VisualizationBar
manager
=
{
manager
}
fullSize
=
{
fullSize
}
/>
<
div
className
=
"h-full w-full overflow-y-auto"
style
=
{
graphQueryResult
.
nodes
.
length
===
0
?
{
overflow
:
'
hidden
'
}
:
{}
}
>
<
div
className
=
"h-full w-full overflow-y-auto"
style
=
{
graphQueryResult
.
nodes
.
length
===
0
?
{
overflow
:
'
hidden
'
}
:
{}
}
>
{
renderContent
()
}
{
renderContent
()
}
</
div
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment