Skip to content

Commit cf19783

Browse files
authored
Merge pull request #719 from SolidOS/newLayout
New layout according to new design
2 parents dabe035 + 5672f5a commit cf19783

8 files changed

Lines changed: 190 additions & 975 deletions

File tree

README.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -91,34 +91,4 @@ We have added comments in the code to make it explicit which parts are 100% writ
9191

9292
* Raptor mini: Update the code to use the new solid-ui-header component. Keep in mind the log in and sign up are wired in specific ways.
9393

94-
* Auto: change the menu to fill up the menu items like in the code: async function getMenuItems (outliner: any) {
95-
const items = await outliner.getDashboardItems()
96-
return items.map((element) => {
97-
return {
98-
label: element.label,
99-
onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)
100-
}
101-
})
102-
}
103-
104-
* Auto: each #sym:MenuItem has an icon which i want displayed on the left side of each menu item when rendered
105-
106-
* Auto: don't add each menu item in a button looking border. Simply list them.
107-
Upon hover apply background color e6dcff and selected or active to be background color: cbb9ff
108-
109-
* Raptor mini: the menu dissapears when on mobile. That is great.
110-
I want the menu to have a tiny button on the bottom margin left with an arrow to the left or right for expanding the menu or for making it small. This is only for web. When we make it small it folds and only displays the icons of teh menu items, when it is expanded it should also add the labels to the menu items.
111-
112-
* Raptor mini: i want to imporve the left side menu on mobile. When the menu is visible it should be higher, the top part should be on top of the header, folding out and in with the rest of the menu. It should have an x close button and it should say menu. The locor of that top line of the header should be the color of the header 332746
113-
114-
* Raptor mini: the menu, on desktop, has a button to fold in or out. I want the same behavior to occur also when i simply click the folded in menu: it should expend. Not just when i click the dedicated button
115-
116-
* Raprot mini: instead of this code (index.ts of footer), I want to make use of a new footer web component with the readme: # solid-ui-footer component
117-
118-
* Raptor mini: The footer created should actually be part of the left side menu only. Should be displayed inside it and should collaps and expand as the menu.
119-
120-
* Raptor mini: the footer should completely dissapear when menu folded up.
121-
122-
* Raptor mini: Please always keep the footer at the bottom of the menu
123-
12494
* GPT-5.4 Model: Add a compatibility shim in the form pane for mixed `ui:Group` plus field typing.

package-lock.json

Lines changed: 141 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
"meeting-pane": "3.0.3-1",
6969
"mime-types": "^3.0.2",
7070
"pane-registry": "3.1.2-2",
71-
"profile-pane": "3.2.3-2",
71+
"profile-pane": "3.2.3-3",
7272
"rdflib": "2.4.0",
7373
"solid-logic": "4.0.8-1",
7474
"solid-namespace": "^0.5.4",
75-
"solid-ui": "3.1.3-12",
75+
"solid-ui": "3.1.3-13",
7676
"source-pane": "3.1.1-4"
7777
},
7878
"overrides": {

src/mainPage/footer.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/mainPage/header.ts

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { authn } from 'solid-logic'
22
import { html, render } from 'lit-html'
33
import type { AccountMenuItem } from 'solid-ui/components/account'
4-
5-
import { setActiveMenuPane } from './menu'
64
import type { OutlineManager } from '../outline/manager'
75

86
import '~icons/lucide/user'
7+
import '~icons/lucide/users'
8+
import '~icons/lucide/folder-open'
9+
import '~icons/lucide/layout-dashboard'
10+
import '~icons/lucide/settings-2'
911
import '../components/header'
1012

1113
export async function createHeader (outliner: OutlineManager) {
@@ -25,10 +27,49 @@ export async function createHeader (outliner: OutlineManager) {
2527

2628
if (currentUser) {
2729
outliner.showDashboard(currentUser, { pane: 'profile' })
28-
setActiveMenuPane('profile')
2930
}
3031
}
31-
}
32+
},
33+
{
34+
label: html`<icon-lucide-users slot="left-icon"></icon-lucide-users> Friends`,
35+
onSelected () {
36+
const currentUser = authn.currentUser()
37+
38+
if (currentUser) {
39+
outliner.showDashboard(currentUser, { pane: 'social' })
40+
}
41+
}
42+
},
43+
{
44+
label: html`<icon-lucide-folder-open slot="left-icon"></icon-lucide-folder-open> Storage`,
45+
onSelected () {
46+
const currentUser = authn.currentUser()
47+
48+
if (currentUser) {
49+
outliner.showDashboard(currentUser, { pane: 'folder' })
50+
}
51+
}
52+
},
53+
{
54+
label: html`<icon-lucide-layout-dashboard slot="left-icon"></icon-lucide-layout-dashboard> Dashboard`,
55+
onSelected () {
56+
const currentUser = authn.currentUser()
57+
58+
if (currentUser) {
59+
outliner.showDashboard(currentUser, { pane: 'home' })
60+
}
61+
}
62+
},
63+
{
64+
label: html`<icon-lucide-settings-2 slot="left-icon"></icon-lucide-settings-2> Preferences`,
65+
onSelected () {
66+
const currentUser = authn.currentUser()
67+
68+
if (currentUser) {
69+
outliner.showDashboard(currentUser, { pane: 'basicPreferences' })
70+
}
71+
}
72+
},
3273
]
3374

3475
render(

src/mainPage/index.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
/* Main Page
22
**
3-
** This code is called in mashlib and renders the header and footer of the Databrowser.
3+
** This code is called in mashlib and renders the header and left side menu of the Databrowser.
44
*/
55

66
import { LiveStore, NamedNode } from 'rdflib'
77
import type { RenderEnvironment } from 'pane-registry'
88
import { getOutliner, OutlineManager } from '../index'
99
import { createHeader } from './header'
10-
import { createFooter } from './footer'
11-
import { createLeftSideMenu, refreshMenu } from './menu'
1210

1311
// Symbol used to stash the last render-relevant env snapshot on the outliner
1412
// so refreshUI can skip a full GotoSubject re-render when nothing changed.
@@ -19,8 +17,6 @@ function renderEnvSignature (env?: RenderEnvironment): string {
1917
return [env.layout, env.theme, env.inputMode].join('|')
2018
}
2119

22-
export { refreshMenu as updateMenuLayout } from './menu'
23-
2420
function ensureMainContent () {
2521
let main = document.getElementById('MainContent') as HTMLElement | null
2622
if (!main) {
@@ -47,9 +43,7 @@ export async function initMainPage (
4743
outliner.GotoSubject(subject, true, undefined, true, undefined)
4844

4945
const header = await createHeader(outliner)
50-
const menu = createLeftSideMenu(subject, outliner)
51-
const footer = menu.then(() => createFooter(store))
52-
return Promise.all([header, menu, footer])
46+
return Promise.all([header])
5347
}
5448

5549
export async function refreshUI (outliner: OutlineManager) {
@@ -69,6 +63,4 @@ export async function refreshUI (outliner: OutlineManager) {
6963
outliner.GotoSubject(store.sym(subjectUri), true, pane, true, undefined)
7064
;(outliner as any)[LAST_RENDER_ENV_KEY] = currentSignature
7165
}
72-
73-
refreshMenu(outliner.context.environment?.layout === 'mobile' ? 'mobile' : 'desktop')
7466
}

0 commit comments

Comments
 (0)