Skip to content

Commit 485f968

Browse files
committed
feat: use side-by-side layout for hello
And an improved aspect ratio for the window.
1 parent e3537b5 commit 485f968

File tree

8 files changed

+52
-40
lines changed

8 files changed

+52
-40
lines changed

plugins/plugin-client-default/config.d/style.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"bodyCss": "codeflare",
3-
"width": 1000,
4-
"height": 1000,
3+
"width": 1200,
4+
"height": 800,
55
"frame": false,
66
"titleBarStyle": "hiddenInset",
77
"defaultTheme": "PatternFly4 Light"

plugins/plugin-client-default/notebooks/hello.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,40 @@ layout:
99
maximized: true
1010
---
1111

12-
<img alt="CodeFlare Icon" src="@kui-shell/client/icons/svg/codeflare.svg" width="225" height="225" align="left" />
12+
<img alt="CodeFlare Icon" src="@kui-shell/client/icons/svg/codeflare.svg" width="100" height="100" align="left" />
1313

1414
[CodeFlare](https://codeflare.dev) is a framework to simplify the
1515
integration, scaling and acceleration of complex multi-step analytics
1616
and machine learning pipelines on the cloud.
1717

1818
> ### Next Steps
1919
>
20-
> - To start running jobs against the Cloud, from your terminal, try `codeflare` .
20+
> To start running jobs against the Cloud, from your terminal, try
21+
> `codeflare`. You may also try it out in the embedded terminal below.
22+
2123

2224
---
2325

26+
27+
=== "Use the CodeFlare CLI"
28+
```shell
29+
---
30+
execute: now
31+
outputOnly: true
32+
maximize: true
33+
---
34+
codeflare terminal codeflare
35+
```
36+
37+
=== "Your Profiles"
38+
```shell
39+
---
40+
execute: now
41+
outputOnly: true
42+
---
43+
codeflare get profile
44+
```
45+
2446
=== "Gallery"
2547
=== "CodeFlare CLI"
2648
```shell
@@ -42,25 +64,6 @@ and machine learning pipelines on the cloud.
4264
codeflare dashboard-gallery
4365
```
4466

45-
=== "Your Profiles"
46-
```shell
47-
---
48-
execute: now
49-
outputOnly: true
50-
---
51-
codeflare get profile
52-
```
53-
54-
=== "Use the CodeFlare CLI"
55-
```shell
56-
---
57-
execute: now
58-
outputOnly: true
59-
maximize: true
60-
---
61-
codeflare terminal codeflare
62-
```
63-
6467
=== "Terminal"
6568
```shell
6669
---
@@ -70,3 +73,4 @@ and machine learning pipelines on the cloud.
7073
---
7174
codeflare terminal $SHELL -l
7275
```
76+

plugins/plugin-codeflare/src/controller/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export default function registerCodeflareCommands(registrar: Registrar) {
6262
registrar.listen("/codeflare/hello", (args) => import("./hello").then((_) => _.default(args)), {
6363
needsUI: true,
6464
outputOnly: true,
65-
width: 1000,
66-
height: 1000,
65+
width: 1200,
66+
height: 800,
6767
})
6868

6969
/**

plugins/plugin-codeflare/src/controller/profile/get.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import React from "react"
1818
import prettyMillis from "pretty-ms"
1919
import { Profiles } from "madwizard"
20-
import { Flex, FlexItem, Tile } from "@patternfly/react-core"
20+
import { Gallery, GalleryItem, Tile } from "@patternfly/react-core"
2121

2222
import PlusIcon from "@patternfly/react-icons/dist/esm/icons/user-plus-icon"
2323
import ProfileIcon from "@patternfly/react-icons/dist/esm/icons/user-icon"
@@ -28,21 +28,21 @@ export default async function getProfiles() {
2828

2929
return {
3030
react: (
31-
<Flex className="flex-fill sans-serif top-pad left-pad right-pad bottom-pad">
32-
<FlexItem>
31+
<Gallery className="flex-fill sans-serif top-pad left-pad right-pad bottom-pad" hasGutter>
32+
<GalleryItem>
3333
<Tile className="codeflare--tile codeflare--tile-new" title="New Profile" icon={<PlusIcon />} isStacked>
3434
Customize a profile
3535
</Tile>
36-
</FlexItem>
36+
</GalleryItem>
3737

3838
{profiles.map((_) => (
39-
<FlexItem key={_.profile.name}>
39+
<GalleryItem key={_.profile.name}>
4040
<Tile className="codeflare--tile" title={_.profile.name} icon={<ProfileIcon />} isStacked>
4141
{`Last used ${prettyMillis(Date.now() - _.profile.lastUsedTime, { compact: true })} ago`}
4242
</Tile>
43-
</FlexItem>
43+
</GalleryItem>
4444
))}
45-
</Flex>
45+
</Gallery>
4646
),
4747
}
4848
}

plugins/plugin-codeflare/src/tray/menus/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default async function buildContextMenu(
3737
{
3838
label: `Getting Started`,
3939
icon: gettingStartedIcon,
40-
click: () => createWindow([], { width: 1000, height: 1000 }),
40+
click: () => createWindow([], { width: 1200, height: 800 }),
4141
},
4242
{ label: `Report a Bug`, icon: bugIcon, click: () => import("open").then((_) => _.default(bugs.url)) },
4343
{ label: `Quit ${productName}`, icon: powerOffIcon, role: "quit" },

plugins/plugin-codeflare/web/scss/components/Cast/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
color: var(--color-text-01);
3333
background-color: var(--color-repl-background);
3434
border-color: var(--color-base01);
35-
font-size: 1vh !important;
35+
font-size: 0.8vw !important;
3636

3737
margin-bottom: 0;
3838
}

plugins/plugin-codeflare/web/scss/components/Dashboard/_index.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ body.kui--patternfly4[kui-theme="PatternFly4 Dark"][kui-theme-style] {
9999
}
100100

101101
@include Scrollback {
102-
.pf-c-tabs__link::after {
102+
/* .pf-c-tabs__link::after {
103103
border-color: var(--color-base06);
104-
}
104+
} */
105105

106106
&:not(.kui--inverted-color-context) {
107107
/* TODO MISSING SASS MIXIN in KUI CORE */

plugins/plugin-codeflare/web/scss/components/Hello/_index.scss

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17+
@import "@kui-shell/plugin-client-common/web/scss/components/Hint/mixins";
1718
@import "@kui-shell/plugin-client-common/web/scss/components/Terminal/mixins";
1819
@import "@kui-shell/plugin-client-common/web/scss/components/TopLevelTab/mixins";
1920
@import "Grid";
2021

2122
@include TopLevelTab {
2223
&.codeflare--welcome-guidebook {
2324
@include Split(2) {
24-
grid-template-rows: 300px 1fr;
25-
grid-template-columns: 1fr;
26-
grid-template-areas: "T1" "T2";
25+
grid-template-rows: 1fr;
26+
grid-template-columns: 1fr 2fr;
27+
grid-template-areas: "T1 T2";
2728
}
2829

2930
@include Split(3) {
@@ -110,7 +111,14 @@ $cell: 1.5em;
110111
}
111112
}
112113

113-
.codeflare {
114+
.codeflare--welcome-guidebook {
115+
@include Hint {
116+
display: block;
117+
.pf-c-hint__actions {
118+
float: right;
119+
}
120+
}
121+
114122
.pf-c-tile__header {
115123
overflow: hidden;
116124
white-space: nowrap;

0 commit comments

Comments
 (0)