Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
e00b513
added preparations for mobile
timea-solid Mar 23, 2026
97728df
cnosolidation of mobile options
timea-solid Mar 24, 2026
323e81c
SolidOS app title
timea-solid Mar 24, 2026
1043c5c
removed old table structure form databrowser.html
timea-solid Mar 24, 2026
0e4918f
removed old table structure form databrowser.html
timea-solid Mar 24, 2026
3a9b087
SolidOS app title
timea-solid Mar 24, 2026
476a36c
cnosolidation of mobile options
timea-solid Mar 24, 2026
d294201
some merge issues
timea-solid Mar 24, 2026
4723132
merge main
timea-solid Mar 24, 2026
7d61e49
merge main
timea-solid Mar 24, 2026
5fd8127
Update README.md
timea-solid Mar 24, 2026
ec908b9
Update src/styles/mash.css
timea-solid Mar 24, 2026
c5ed774
Update src/styles/mash.css
timea-solid Mar 24, 2026
641de88
Update src/styles/mash.css
timea-solid Mar 24, 2026
5a6f721
Update src/index.ts
timea-solid Mar 24, 2026
f23652e
fixed header issue
timea-solid Mar 27, 2026
a2da363
fixed header issue
timea-solid Mar 27, 2026
d579d83
added left side menu to databrowser only
timea-solid Mar 31, 2026
4441a66
updated pane-registry
timea-solid Mar 31, 2026
917fe0b
merge main
timea-solid Mar 31, 2026
81ada6a
updates some css for header
timea-solid Mar 31, 2026
2f9dc1a
added web components and improved header
timea-solid Apr 10, 2026
a361f2b
updated package.json
timea-solid Apr 10, 2026
67da899
add new styles and vars
SharonStrats Apr 11, 2026
22e7dd3
needed to save
SharonStrats Apr 11, 2026
b8a2995
Fix databrowser shell mounts and environment sync
Apr 11, 2026
824349a
Merge branch 'milestone3m' of https://github.com/solidos/mashlib into…
Apr 11, 2026
c8231db
npm run build:workspace for linked packages
Apr 11, 2026
cb0f338
cleanup
Apr 11, 2026
7ca2c38
btn and border styles
SharonStrats Apr 12, 2026
679a830
Merge branch 'milestone3m' of https://github.com/SolidOS/mashlib into…
SharonStrats Apr 12, 2026
e57d57e
delete static styles
timea-solid Apr 13, 2026
b5a179c
updated to node 24
timea-solid Apr 13, 2026
30c7a74
add gray 500
SharonStrats Apr 13, 2026
36762f4
fix build
timea-solid Apr 13, 2026
7484b43
aligned some css
timea-solid Apr 13, 2026
4221068
font weight medium
SharonStrats Apr 14, 2026
33e6fee
gap xxs
SharonStrats Apr 14, 2026
295b47c
Merge branch 'milestone3m' of https://github.com/SolidOS/mashlib into…
SharonStrats Apr 14, 2026
31b6b9d
color and border md
SharonStrats Apr 14, 2026
cc5423c
font size xxs
SharonStrats Apr 14, 2026
53f9ff7
added colors, header style, fixed build, changed header
timea-solid Apr 14, 2026
7bc9b03
Merge branch 'milestone3m' of https://github.com/solidos/mashlib into…
timea-solid Apr 14, 2026
152d2bc
header colors
SharonStrats Apr 15, 2026
e09bf75
merge with main
SharonStrats Apr 15, 2026
a25e751
additional vars
SharonStrats Apr 16, 2026
970cc1c
fixed build with web components form solid-ui
timea-solid Apr 16, 2026
a19f587
Merge branch 'milestone3m' of https://github.com/solidos/mashlib into…
timea-solid Apr 16, 2026
235c48c
updated lock
timea-solid Apr 16, 2026
e6a2dec
new lav color
SharonStrats Apr 17, 2026
9adad2e
cleanup + few contact-pane additions
SharonStrats Apr 18, 2026
77517e7
.hidden add important
SharonStrats Apr 18, 2026
fd29afd
new blue color
SharonStrats Apr 19, 2026
a5312e2
imporved left side menu style
timea-solid Apr 20, 2026
b0df481
Merge branch 'main' into milestone3m
bourgeoa Apr 20, 2026
dc7d835
profile pane render fix
timea-solid Apr 22, 2026
d447052
comment out selected color mash css */
SharonStrats Apr 23, 2026
09fb3dc
improved menu and style
timea-solid Apr 23, 2026
c9e0037
Merge branch 'milestone3m' of https://github.com/solidos/mashlib into…
timea-solid Apr 23, 2026
a279ca7
Update README.md
timea-solid Apr 23, 2026
f6b8310
Update README.md
timea-solid Apr 23, 2026
57174be
Update README.md
timea-solid Apr 23, 2026
57f37f8
Merge branch 'main' into milestone3m
timea-solid Apr 23, 2026
b361124
Update src/styles/mash-utilities.css
timea-solid Apr 23, 2026
cfc73c0
Update src/styles/mash.css
timea-solid Apr 23, 2026
0f7833b
Update webpack.config.mjs
timea-solid Apr 23, 2026
ed13b88
Update src/styles/themes/light.css
timea-solid Apr 23, 2026
07bd57a
Update src/styles/mash.css
timea-solid Apr 23, 2026
861cf6c
Update README.md
timea-solid Apr 23, 2026
e4a3e5c
update solid-ui
timea-solid Apr 23, 2026
ad3c074
updated browser.html
timea-solid Apr 23, 2026
6773081
fix browse.html
timea-solid Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,27 @@ A colorful dependency tree can be seen [here](https://github.com/solidos/solidos
- [Solid-ui & Solid-logic related:](#solid-ui--solid-logic-related)
- [The databrowser hack: upgrading your browser](#the-databrowser-hack-upgrading-your-browser)

### [Generative AI usage](#generative-ai-usage)

## Developing mashlib

As part of the SolidOS stack, mashlib can be developed locally by setting up the SolidOS code. Read more about that on the [SolidOS Readme](https://github.com/solidos/solidos#-getting-started-with-the-solidos-code).

### Webpack Resolution Modes

Mashlib webpack now supports two explicit resolution modes:

- `package` mode: default. Resolves `solid-ui` and `solid-panes` from `node_modules`, which is the correct behavior for npm installs and published builds.
- `workspace` mode: opt-in. Resolves selected SolidOS packages from sibling workspace source trees for local linked development.

Use these scripts for local workspace builds:

- `npm run build:workspace`
- `npm run watch:workspace`
- `npm run start:workspace`

`npm run build`, `npm run watch`, and `npm run start` stay on default package resolution.

## Goals

The goals of mashlib overlap with the [SolidOS Goals](https://solidos.solidcommunity.net/Team/docs/SolidOSNorthStar.html).
Expand Down Expand Up @@ -151,3 +168,13 @@ The mashlib part of SolidOS Databrowser Frontend is *read-write;* that is, the u

A major limitation of this data browser hack is that current web browsers are made to distrust any code loaded from one domain that uses data from another domain. This makes it hard, strangely complicated, and sometimes impossible to do some things.

## Generative AI usage
The SolidOS team is using GitHub Copilot integrated in Visual Studio Code.
We have added comments in the code to make it explicit which parts are 100% written by AI.

### Prompt usage history:
* Auto model: Looking at these 2 files (`databrowser.html` and `index.ts`), I want to redesign mashlib and underlying panes. I have one design for web and another for mobile. How would I go about making sure I can also have a mobile version?

* Claude-Opus 4.6: I don't think this is correct. Mashlib is bundling together all the panes. I do not need to add `mashlib.layout` or theme to the globals. I can just call the render of each pane with an interface of values or ...?

* Raptor mini: I want to redesign the main page which contains GlobalDashboard and OutlineView. I keep the header and footer and I want to have a left side menu that changes content based on whether logged in or not and also changes based on whether it is mobile or not. If it is mobile, it should fold up in the header menu; if it is web, it should be rendered on the left side. I want a menu placeholder that changes according to mobile or not. I want to implement its functionality in solid-panes.
4 changes: 3 additions & 1 deletion babel.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export default {
browsers: ['> 1%', 'last 3 versions', 'not dead']
}
}],
'@babel/preset-typescript',
['@babel/preset-typescript', {
allowDeclareFields: true
}],
],
plugins: [
'@babel/plugin-transform-runtime'
Expand Down
737 changes: 391 additions & 346 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"scripts": {
"clean": "rm -rf dist ./src/versionInfo.ts",
"build": "npm run clean && npm run build-version && npm run typecheck && npm run build-dist && npm run postbuild-js",
"build:workspace": "npm run clean && npm run build-version && npm run typecheck && npm run build-dist:workspace && npm run postbuild-js",
"build:ghpages": "npm run clean && npm run build-version && npm run typecheck && PUBLIC_PATH=/mashlib/dist/ npm run build-dist && npm run postbuild-js",
"build-version": "./timestamp.sh > src/versionInfo.ts && eslint 'src/versionInfo.ts' --fix",
"build-dist": "webpack --progress --mode=production",
"build-dist:workspace": "webpack --progress --mode=production --env resolutionMode=workspace",
"postbuild-js": "rm -f dist/versionInfo.d.ts dist/versionInfo.d.ts.map",
"lint": "eslint",
"lint-fix": "eslint --fix",
Expand All @@ -24,7 +26,9 @@
"preversion": "npm run lint && npm run typecheck && npm test",
"postpublish": "git push origin main --follow-tags",
"watch": "npm run build-version && webpack --watch",
"start": "npm run build-version && webpack serve --config webpack.config.mjs"
"watch:workspace": "npm run build-version && webpack --watch --env resolutionMode=workspace",
"start": "npm run build-version && webpack serve --config webpack.config.mjs",
"start:workspace": "npm run build-version && webpack serve --config webpack.config.mjs --env resolutionMode=workspace"
},
"repository": {
"type": "git",
Expand All @@ -50,15 +54,17 @@
},
"homepage": "https://github.com/solidos/mashlib",
"dependencies": {
"pane-registry": "^3.1.0",
"rdflib": "^2.3.6",
"solid-logic": "^4.0.6",
"solid-panes": "^4.2.6",
"solid-ui": "^3.0.6"
"solid-ui": "^3.1.0"
},
"overrides": {
"rdflib": "$rdflib",
"solid-logic": "$solid-logic",
"solid-ui": "$solid-ui"
"solid-ui": "$solid-ui",
"pane-registry": "$pane-registry"
},
"devDependencies": {
"@babel/cli": "^7.28.6",
Expand Down
87 changes: 67 additions & 20 deletions src/databrowser.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,79 @@
<html>
<head>
<meta charset="utf-8"/>
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
<title>SolidOS</title>
<script>
document.addEventListener('DOMContentLoaded', function() {
panes.runDataBrowser()
})
</script>
</head>
<body id="PageBody">
<!-- solid-panes' OutlineManager injects into this element -->
<header id="PageHeader" role="banner"></header>
<main id="mainContent" tabindex="-1">
<div class="TabulatorOutline" id="DummyUUID">
<table id="outline">
<thead>
<tr>
<th id="outlineHeader" scope="col"></th>
<!-- Add more <th> as needed for columns -->
</tr>
</thead>
<tbody>
<!-- Table rows injected by JS -->
</tbody>
<body id="PageBody" data-app-shell="databrowser">

<!-- Skip-navigation link (accessibility) -->
<a href="#MainContent" class="skip-link">Skip to main content</a>

<!-- Header — populated by solid-panes createHeader(), plus responsive menu toggle -->
<solid-ui-header id="mainSolidUiHeader" theme="" layout="" brand-link="/">
<span slot="title"></span>
</solid-ui-header>
<!--
<header id="PageHeader" role="banner">
<div class="page-header-inner">
<button id="MenuToggleBtn" class="menu-toggle" aria-controls="NavMenu" aria-expanded="false" hidden>
<span class="sr-only">Menu</span>
</button>
</div>
</header
-->

<!-- Main content area — single visible region at a time -->
<main id="MainContent" role="main" tabindex="-1" aria-live="polite">
<div class="app-shell">
<aside id="NavMenu" class="app-nav" aria-label="Application menu" hidden>
<div id="NavMenuContent" class="menu-content"></div>
</aside>

<div class="app-view">
<!--
Outline view: the primary RDF-subject browser.
JS appends property-table <div>s (not <tr>s) here.
-->
<table
id="OutlineView"
class="outline-view"
aria-label="Resource browser"
>
<!--
Pane icon tray (nav) and pane content are injected here by
OutlineManager.GotoSubject / propertyTable / outlineExpand.
Each subject block is a <article class="subject-block">.
-->
</table>
Comment on lines +45 to 55
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

src/databrowser.html no longer includes a <table id="outline">, and instead uses <table id="OutlineView">. The rest of the repo (e.g., static/browse.html, tests) consistently uses id="outline" as the outliner mount point, so this is very likely to break Solid panes/outliner initialization unless the downstream code was updated to match. Consider keeping id="outline" (or providing it as an alias) unless you can confirm all consumers now target OutlineView.

Copilot uses AI. Check for mistakes.
<div id="GlobalDashboard" aria-label="Global Dashboard"></div>
</div>
</main>
<footer id="PageFooter" role="contentinfo"></footer>

<!--
Global Dashboard: preferences, profile, contacts, etc.
Hidden by default; toggled by showDashboard / closeDashboard.
-->
<section
id="GlobalDashboard"
class="global-dashboard"
aria-label="Dashboard"
hidden
>
<!-- globalAppTabs appends tab widget here -->
</section>
</div> <!-- .app-view -->
</div> <!-- .app-shell -->

<div id="MenuOverlay" class="menu-overlay" hidden aria-hidden="true"></div>
</main>

<!-- Footer — populated by solid-ui initFooter() -->
<footer id="PageFooter" role="contentinfo">
<!-- solid-ui injects: "Powered by Solid" link -->
</footer>
</body>
</html>
11 changes: 11 additions & 0 deletions src/globals.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// AI generated as a solution to cannot find SolidLogic
// Must be imported BEFORE solid-ui / solid-panes.
// Their prebuilt bundles treat `solid-logic` (and `rdflib`) as UMD externals
// with `root: "SolidLogic"` / `root: "$rdf"`, so the globals must exist on
// `window` at module-evaluation time, not after all imports have run.
import * as $rdf from 'rdflib'
import * as SolidLogic from 'solid-logic'

const w: any = window
w.$rdf = $rdf
w.SolidLogic = SolidLogic
99 changes: 51 additions & 48 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,57 +1,55 @@
// IMPORTANT: must be the first import so window.SolidLogic / window.$rdf are
// defined before solid-ui / solid-panes prebuilt bundles are evaluated
// (they declare `solid-logic` and `rdflib` as UMD externals with
// root: "SolidLogic" / "$rdf").
import './globals'

import * as $rdf from 'rdflib'
import * as SolidLogic from 'solid-logic'
import type { RenderEnvironment } from 'pane-registry'
import'solid-ui/components/header'
import * as panes from 'solid-panes'
import { authn, solidLogicSingleton, authSession, store } from 'solid-logic'
import { layout } from './layout'
import { theme } from './theme'
import versionInfo from './versionInfo'
import './styles/mash.css'

const global: any = window
global.panes = panes
global.mashlib = { versionInfo }

// Theme Management
const initializeTheme = () => {
const savedTheme = localStorage.getItem('mashlib-theme')
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
const theme = savedTheme || (prefersDark ? 'dark' : 'light')

if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark')
} else {
document.documentElement.removeAttribute('data-theme')
}
}
layout.init()
theme.init()

const setTheme = (theme: 'light' | 'dark') => {
if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark')
} else {
document.documentElement.removeAttribute('data-theme')
}
localStorage.setItem('mashlib-theme', theme)
}
// Build a snapshot of the current render environment
const buildRenderEnvironment = (): RenderEnvironment => ({
layout: layout.get(),
layoutPreference: layout.getPreference(),
inputMode: layout.getInputMode(),
theme: theme.get(),
viewport: layout.getViewport()
})

const getTheme = (): 'light' | 'dark' => {
return document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
}
// Inject or update the environment on the pane context
const syncEnvironmentToContext = async (_trigger?: Event | string) => {
const outliner = panes.getOutliner(document) as any

// Initialize theme on load
initializeTheme()
if (!outliner) {
return
}

global.$rdf = $rdf
global.panes = panes
global.SolidLogic = {
authn,
authSession,
store,
solidLogicSingleton
}
global.mashlib = {
versionInfo,
theme: {
set: setTheme,
get: getTheme,
init: initializeTheme
if (!outliner.context) {
outliner.context = {}
}

panes.updateEnvironment(outliner, buildRenderEnvironment())
await panes.refreshUI(outliner)
}

// Keep environment in sync on layout/theme changes
window.addEventListener('mashlib:layoutchange', syncEnvironmentToContext)
window.addEventListener('mashlib:themechange', syncEnvironmentToContext)

global.panes.runDataBrowser = function (uri?:string|$rdf.NamedNode|null) {
// Set up cross-site proxy
const fetcher: any = $rdf.Fetcher
Expand All @@ -63,15 +61,20 @@ global.panes.runDataBrowser = function (uri?:string|$rdf.NamedNode|null) {
webMonetizationTag.setAttribute('name', 'monetization')
webMonetizationTag.setAttribute('content', `$${window.location.host}`)
document.head.appendChild(webMonetizationTag)
} catch (e) {
console.error('Failed to add web monetization tag to page header')
}
} catch {}
Comment thread
timea-solid marked this conversation as resolved.

window.addEventListener('load', syncEnvironmentToContext)

// Authenticate the user
authn.checkUser().then(function (_profile: any) {
const mainPage = panes.initMainPage(solidLogicSingleton.store, uri)
return mainPage
})
SolidLogic.authn.checkUser()
.then(() => panes.initMainPage(SolidLogic.solidLogicSingleton.store, uri))
.then(() => {
// Inject render environment into pane context after outliner exists
syncEnvironmentToContext('initMainPage')

})
.catch(() => undefined)
Comment thread
timea-solid marked this conversation as resolved.

}

window.onpopstate = function (_event: any) {
Expand All @@ -85,5 +88,5 @@ window.onpopstate = function (_event: any) {
}

export {
versionInfo
versionInfo,
}
Loading
Loading