Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cfc4240
created dataContentPane css
SharonStrats Mar 12, 2026
45dc0a5
change style to styles like other repos
SharonStrats Mar 12, 2026
65505cb
completed dataContentPane style move
SharonStrats Mar 12, 2026
93923fb
humanReadablePane sytles
SharonStrats Mar 12, 2026
c7f07e5
moved padPane styles
SharonStrats Mar 13, 2026
d2e9717
moved internalPane styles
SharonStrats Mar 13, 2026
ee1898f
resolved issue with schedulepane not displaying
SharonStrats Mar 13, 2026
2648647
linting errors
SharonStrats Mar 13, 2026
09d84c9
dev loader
SharonStrats Mar 13, 2026
80a2082
moved SchedulePane styles
SharonStrats Mar 13, 2026
db66386
moved imagePane styles
SharonStrats Mar 13, 2026
b95a32f
moved formPane styles
SharonStrats Mar 13, 2026
25a3134
imagePane lint errors
SharonStrats Mar 13, 2026
a43959e
dev loader
SharonStrats Mar 15, 2026
686c778
schedpane styles vars
SharonStrats Mar 16, 2026
81a6788
data content pane style vars
SharonStrats Mar 16, 2026
b989b6e
humanreadable style vars
SharonStrats Mar 16, 2026
6c3a752
internalPane use icon var
SharonStrats Mar 16, 2026
4b92880
light and dark assignment - data content pane
SharonStrats Mar 19, 2026
3c6dd49
Potential fix for pull request finding
SharonStrats Mar 19, 2026
3ee7d27
Potential fix for pull request finding
SharonStrats Mar 19, 2026
b5dbbc2
merge main
SharonStrats Mar 19, 2026
9f49cc6
fixed npm 11 error
SharonStrats Mar 19, 2026
3659ea1
lint fix
SharonStrats Mar 19, 2026
0a556db
manager test no more inline styles
SharonStrats Mar 19, 2026
3ed4ce0
merge with profileEditA11y
SharonStrats Mar 25, 2026
ef5e6f7
remove class internalPane
SharonStrats Mar 25, 2026
5df1d0d
fix tr not connected to table humanPane
SharonStrats Mar 25, 2026
40bc677
fixed imagePane tr
SharonStrats Mar 25, 2026
a11c3fb
revert back dev loader
SharonStrats Mar 25, 2026
0ce7491
Update src/styles/schedulePane.css
SharonStrats Mar 25, 2026
fbe104c
Update README.md
SharonStrats Mar 25, 2026
dd1606a
merge with main
SharonStrats Apr 24, 2026
085afb5
revert to main fix if needed later
SharonStrats Apr 24, 2026
8490c5c
package lock
SharonStrats Apr 24, 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
276 changes: 142 additions & 134 deletions package-lock.json

Large diffs are not rendered by default.

51 changes: 32 additions & 19 deletions src/dataContentPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import * as UI from 'solid-ui'
import * as $rdf from 'rdflib'
import './styles/dataContentPane.css'

const ns = UI.ns

Expand Down Expand Up @@ -42,6 +43,21 @@
return store.whether(subject, UI.ns.rdf('type'), UI.ns.link('RDFDocument'))
},
*/
/* This code was generated by Generative AI (GPT-5.3-Codex in GitHub Copilot) based on the following prompt:
Only the class assignments of dataContentPaneNestedLight and dataContentPaneNestedDark
are the only things added by AI.

This is the comment I got from copilot, but suggested fix remove the dark
class as well The nested table shading logic checks
UI.utils.ancestor(newTable, 'TABLE') immediately after
creating newTable, but at that moment newTable typically has no
parent in the DOM yet. This makes parentTable null and will
always apply dataContentPaneNestedLight, preventing the
intended alternating light/dark nested backgrounds.
Consider assigning the class after appending newTable into
its parent table, or pass the parent table (or current nesting
depth) into objectTree() so the decision can be made reliably.
can you help me fix this without removing the dark altering */
Comment on lines +46 to +60
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

This large in-source comment includes a full Copilot prompt and troubleshooting narrative. It’s brittle (easily becomes inaccurate as code evolves) and makes the file harder to maintain; consider replacing it with a short rationale for the nesting-level approach and referencing the README policy section instead.

Suggested change
/* This code was generated by Generative AI (GPT-5.3-Codex in GitHub Copilot) based on the following prompt:
Only the class assignments of dataContentPaneNestedLight and dataContentPaneNestedDark
are the only things added by AI.
This is the comment I got from copilot, but suggested fix remove the dark
class as well The nested table shading logic checks
UI.utils.ancestor(newTable, 'TABLE') immediately after
creating newTable, but at that moment newTable typically has no
parent in the DOM yet. This makes parentTable null and will
always apply dataContentPaneNestedLight, preventing the
intended alternating light/dark nested backgrounds.
Consider assigning the class after appending newTable into
its parent table, or pass the parent table (or current nesting
depth) into objectTree() so the decision can be made reliably.
can you help me fix this without removing the dark altering */
/* Nested table backgrounds alternate between light and dark classes
(dataContentPaneNestedLight / dataContentPaneNestedDark) based on
nesting level to improve readability of deeply nested RDF structures.
Only the class assignments for this alternating style were introduced
via AI assistance; see the README “AI-assisted changes” section for
project policy and additional context. */

Copilot uses AI. Check for mistakes.
statementsAsTables: function statementsAsTables (sts, context, initialRoots) {
const myDocument = context.dom
// const outliner = context.getOutliner(myDocument)
Expand All @@ -52,13 +68,13 @@
const subjects = res.subjects
const loopBreakers = res.loopBreakers
for (const x in loopBreakers) {
console.log('\tdataContentPane: loopbreaker:' + x)

Check warning on line 71 in src/dataContentPane.js

View workflow job for this annotation

GitHub Actions / build (24)

Unexpected console statement

Check warning on line 71 in src/dataContentPane.js

View workflow job for this annotation

GitHub Actions / build (22)

Unexpected console statement
}
const doneBnodes = {} // For preventing looping
const referencedBnodes = {} // Bnodes which need to be named alas

// The property tree for a single subject or anonymous node
function propertyTree (subject) {
function propertyTree (subject, nestingLevel = 0) {
// print('Proprty tree for '+subject)
const rep = myDocument.createElement('table')
let lastPred = null
Expand All @@ -74,6 +90,7 @@
for (let i = 0; i < sts.length; i++) {
const st = sts[i]
const tr = myDocument.createElement('tr')
tr.classList.add('dataContentPaneTopAlignedRow')
if (st.predicate.uri !== lastPred) {
if (lastPred && same > 1) {
predicateTD.setAttribute('rowspan', '' + same)
Expand All @@ -99,7 +116,7 @@
}
same++
const objectTD = myDocument.createElement('td')
objectTD.appendChild(objectTree(st.object))
objectTD.appendChild(objectTree(st.object, nestingLevel + 1))
tr.appendChild(objectTD)
rep.appendChild(tr)
}
Expand All @@ -108,7 +125,7 @@
}

// Convert a set of statements into a nested tree of tables
function objectTree (obj) {
function objectTree (obj, nestingLevel = 0) {
let res, anchor
switch (obj.termType) {
case 'NamedNode':
Expand All @@ -125,15 +142,15 @@
case 'Literal':
if (!obj.datatype || !obj.datatype.uri) {
res = myDocument.createElement('div')
res.setAttribute('style', 'white-space: pre-wrap;')
res.classList.add('contentPaneLiteral')
res.textContent = obj.value
return res
} else if (
obj.datatype.uri ===
'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'
) {
res = myDocument.createElement('div')
res.setAttribute('class', 'embeddedXHTML')
res.classList.add('embeddedXHTML')
res.innerHTML = obj.value // Try that @@@ beware embedded dangerous code
return res
}
Expand All @@ -150,16 +167,12 @@
return anchor
}
doneBnodes[obj.toNT()] = true // Flag to prevent infinite recursion in propertyTree
const newTable = propertyTree(obj)
const newTable = propertyTree(obj, nestingLevel)
doneBnodes[obj.toNT()] = newTable // Track where we mentioned it first
if (
UI.utils.ancestor(newTable, 'TABLE') &&
UI.utils.ancestor(newTable, 'TABLE').style.backgroundColor ===
'white'
) {
newTable.style.backgroundColor = '#eee'
if (nestingLevel % 2 === 1) {
newTable.classList.add('dataContentPaneNestedLight')
} else {
newTable.style.backgroundColor = 'white'
newTable.classList.add('dataContentPaneNestedDark')
}
Comment on lines +170 to 176
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The new nesting alternation looks inverted relative to the class names/CSS: dataContentPaneNestedLight is white while dataContentPaneNestedDark is #eee, but the code applies Light on odd nesting levels and Dark on even. If the goal is “first nested table is shaded darker than its parent”, swap which class is applied (or adjust the starting nesting level) so nesting level 1 renders with the darker background.

Copilot uses AI. Check for mistakes.
return newTable
}
Expand All @@ -169,7 +182,7 @@
for (let i = 0; i < obj.elements.length; i++) {
const tr = myDocument.createElement('tr')
res.appendChild(tr)
tr.appendChild(objectTree(obj.elements[i]))
tr.appendChild(objectTree(obj.elements[i], nestingLevel + 1))
}
return res
case 'Graph':
Expand Down Expand Up @@ -200,7 +213,7 @@
}
for (let i = 0; i < roots.length; i++) {
const tr = myDocument.createElement('tr')
tr.setAttribute('style', `background-color: ${i % 2 === 0 ? '#f0f0f0' : 'white'};`)
tr.classList.add(i % 2 === 0 ? 'dataContentPaneRowEven' : 'dataContentPaneRowOdd')
rep.appendChild(tr)
const subjectTD = myDocument.createElement('td')
tr.appendChild(subjectTD)
Expand All @@ -210,9 +223,9 @@
if (root.termType === 'BlankNode') {
subjectTD.appendChild(myDocument.createTextNode(UI.utils.label(root))) // Don't recurse!
} else {
subjectTD.appendChild(objectTree(root)) // won't have tree
subjectTD.appendChild(objectTree(root, 0)) // won't have tree
}
TDTree.appendChild(propertyTree(root))
TDTree.appendChild(propertyTree(root, 0))
}
for (const bNT in referencedBnodes) {
// Add number to refer to
Expand Down Expand Up @@ -248,9 +261,9 @@
return div
}
for (let i = 0; i < roots.length; i++) {
const tr = myDocument.createElement('TR')
const tr = myDocument.createElement('tr')
tr.classList.add('dataContentPaneTopAlignedRow')
const root = roots[i]
tr.style.verticalAlign = 'top'
const td = outliner.outlineObjectTD(root, undefined, tr)
tr.appendChild(td)
div.appendChild(tr)
Expand Down
12 changes: 4 additions & 8 deletions src/imagePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
** This outline pane contains the document contents for an Image document
*/
import * as UI from 'solid-ui'
import './styles/imagePane.css'

export const imagePane = {
icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png',
Expand Down Expand Up @@ -50,7 +51,7 @@ export const imagePane = {
const store = context.session.store
const div = myDocument.createElement('div')
div.setAttribute('class', 'imageView')
const img = myDocument.createElement('IMG')
const img = myDocument.createElement('img')

// get image with authenticated fetch
store.fetcher._fetch(subject.uri)
Expand All @@ -61,13 +62,8 @@ export const imagePane = {
const objectURL = URL.createObjectURL(myBlob)
img.setAttribute('src', objectURL) // w640 h480 //
})

img.setAttribute('style', 'max-width: 100%; max-height: 100%;')
// div.style['max-width'] = '640'
// div.style['max-height'] = '480'
const tr = myDocument.createElement('TR') // why need tr?
tr.appendChild(img)
div.appendChild(tr)
img.classList.add('imagePaneViewImage')
div.appendChild(img)
return div
}
}
Expand Down
15 changes: 6 additions & 9 deletions src/internal/internalPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import { icons, ns, widgets } from 'solid-ui'
import { BlankNode, IndexedFormula, literal, NamedNode, st, sym, Variable, Store } from 'rdflib'
import { PaneDefinition } from 'pane-registry'
import '../styles/internalPane.css'

const pane: PaneDefinition = {
icon: icons.originalIconBase + 'tango/22-emblem-system.png',
Expand Down Expand Up @@ -36,11 +37,7 @@ const pane: PaneDefinition = {
}

const div = dom.createElement('div')
div.setAttribute('class', 'internalPane')
div.setAttribute(
'style',
'background-color: #ddddff; padding: 0.5em; border-radius: 1em;'
)
div.classList.add('internalPane', 'internalPaneContent')

function deleteRecursive (kb: IndexedFormula, folder: NamedNode) {
const fetcher = (kb as any).fetcher
Expand Down Expand Up @@ -86,8 +83,7 @@ const pane: PaneDefinition = {
const isDocument = subject.uri && !subject.uri.includes('#')
if (isDocument) {
const controls = div.appendChild(dom.createElement('table'))
controls.style.width = '100%'
controls.style.margin = '1em'
controls.classList.add('internalPaneControls')
const controlRow = controls.appendChild(dom.createElement('tr'))

const deleteCell = controlRow.appendChild(dom.createElement('td'))
Expand Down Expand Up @@ -128,8 +124,9 @@ const pane: PaneDefinition = {
})
}
)
deleteButton.style = 'height: 2em;'
deleteButton.class = '' // Remove hover hide

deleteButton.removeAttribute('class') // Remove hover hide
deleteButton.classList.add('internalPaneDeleteButton')
deleteCell.appendChild(deleteButton)
}

Expand Down
43 changes: 17 additions & 26 deletions src/schedule/schedulePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import * as UI from 'solid-ui'
import { authn } from 'solid-logic'
import * as $rdf from 'rdflib'
import formText from './formsForSchedule.ttl'
import '../styles/schedulePane.css'
import '../styles/utilities.css'

const ns = UI.ns

Expand Down Expand Up @@ -347,10 +349,6 @@ export const schedulePane = {

$rdf.parse(formText, kb, formsURI, 'text/turtle') // Load forms directly

const inputStyle =
'background-color: #eef; padding: 0.5em; border: .5em solid white; font-size: 100%' // font-size: 120%
const buttonIconStyle = 'width: 1.8em; height: 1.8em;'

// Utility functions

const complainIfBad = function (ok, message) {
Expand All @@ -369,9 +367,10 @@ export const schedulePane = {
const refreshCellColor = function (cell, value) {
const bg = kb.any(value, UI.ns.ui('backgroundColor'))
if (bg) {
cell.classList.add('schedulePaneCell')
cell.setAttribute(
'style',
'padding: 0.3em; text-align: center; background-color: ' + bg + ';'
'background-color: ' + bg + ';'
)
}
}
Expand Down Expand Up @@ -402,7 +401,7 @@ export const schedulePane = {
{ noun: 'scheduler' },
initializeNewInstanceInWorkspace
)
b.firstChild.setAttribute('style', inputStyle)
b.firstChild.classList.add('schedulePaneButton')
return b
} // newInstanceButton

Expand Down Expand Up @@ -539,7 +538,7 @@ export const schedulePane = {
div.appendChild(dom.createElement('br')) // @@

const button = div.appendChild(dom.createElement('button'))
button.setAttribute('style', inputStyle)
button.classList.add('schedulePaneButton')
button.textContent = 'Start new poll at this URI'
button.addEventListener('click', function (_e) {
let newBase = baseField.value
Expand Down Expand Up @@ -649,7 +648,7 @@ export const schedulePane = {
}
}
const b1 = clearElement(naviLeft).appendChild(dom.createElement('button'))
b1.setAttribute('style', inputStyle)
b1.classList.add('schedulePaneButton')
b1.textContent = '<- go back'
b1.addEventListener(
'click',
Expand All @@ -665,7 +664,7 @@ export const schedulePane = {
const b2 = clearElement(naviRight).appendChild(
dom.createElement('button')
)
b2.setAttribute('style', inputStyle)
b2.classList.add('schedulePaneButton')
b2.textContent = 'continue ->'
b2.addEventListener(
'click',
Expand Down Expand Up @@ -730,7 +729,7 @@ export const schedulePane = {
$rdf.st(subject, ns.sched('results'), resultsDoc, detailsDoc)
) // @@ also link in results

doneButton.setAttribute('style', inputStyle)
doneButton.classList.add('schedulePaneButton')
doneButton.textContent = 'Go to poll'
doneButton.addEventListener(
'click',
Expand Down Expand Up @@ -759,10 +758,10 @@ export const schedulePane = {
)

const emailButton = dom.createElement('button')
emailButton.setAttribute('style', inputStyle)
emailButton.classList.add('schedulePaneButton')
const emailIcon = emailButton.appendChild(dom.createElement('img'))
emailIcon.setAttribute('src', UI.icons.iconBase + 'noun_480183.svg') // noun_480183.svg
emailIcon.setAttribute('style', buttonIconStyle)
emailIcon.classList.add('schedulePaneButtonIcon')
// emailButton.textContent = 'email invitations'
emailButton.addEventListener(
'click',
Expand Down Expand Up @@ -1054,11 +1053,11 @@ export const schedulePane = {
matrix.setAttribute('class', 'matrix')

const refreshButton = dom.createElement('button')
refreshButton.setAttribute('style', inputStyle)
refreshButton.classList.add('schedulePaneButton')
// refreshButton.textContent = 'refresh' // noun_479395.svg
const refreshIcon = dom.createElement('img')
refreshIcon.setAttribute('src', UI.icons.iconBase + 'noun_479395.svg')
refreshIcon.setAttribute('style', buttonIconStyle)
refreshIcon.classList.add('schedulePaneButtonIcon')
refreshButton.appendChild(refreshIcon)
refreshButton.addEventListener(
'click',
Expand Down Expand Up @@ -1191,11 +1190,11 @@ export const schedulePane = {
const instanceCreator = kb.any(subject, ns.foaf('maker')) // owner?
if (!instanceCreator || instanceCreator.sameTerm(me)) {
const editButton = dom.createElement('button')
editButton.setAttribute('style', inputStyle)
editButton.classList.add('schedulePaneButton')
// editButton.textContent = '(Modify the poll)' // noun_344563.svg
const editIcon = dom.createElement('img')
editIcon.setAttribute('src', UI.icons.iconBase + 'noun_344563.svg')
editIcon.setAttribute('style', buttonIconStyle)
editIcon.classList.add('schedulePaneButtonIcon')
editButton.appendChild(editIcon)
editButton.addEventListener(
'click',
Expand All @@ -1217,10 +1216,7 @@ export const schedulePane = {

const div = dom.createElement('div')
const structure = div.appendChild(dom.createElement('table')) // @@ make responsive style
structure.setAttribute(
'style',
'background-color: white; min-width: 40em; min-height: 13em;'
)
structure.classList.add('schedulePaneTable')

const naviLoginoutTR = structure.appendChild(dom.createElement('tr'))
naviLoginoutTR.appendChild(dom.createElement('td'))
Expand All @@ -1241,12 +1237,7 @@ export const schedulePane = {
naviMain.setAttribute('colspan', '3')

const naviMenu = structure.appendChild(dom.createElement('tr'))
naviMenu.setAttribute('class', 'naviMenu')
naviMenu.setAttribute(
'style',
' text-align: middle; vertical-align: middle; padding-top: 4em; '
)
// naviMenu.setAttribute('style', 'margin-top: 3em;')
naviMenu.classList.add('naviMenu', 'schedulePaneNaviMenu')
const naviLeft = naviMenu.appendChild(dom.createElement('td'))
const naviCenter = naviMenu.appendChild(dom.createElement('td'))
const naviRight = naviMenu.appendChild(dom.createElement('td'))
Expand Down
23 changes: 23 additions & 0 deletions src/styles/dataContentPane.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.contentPaneLiteral {
white-space: pre-wrap;
}

.dataContentPaneRowEven {
background-color: #f0f0f0;
}

.dataContentPaneRowOdd {
background-color: var(--color-background, white);
}

.dataContentPaneTopAlignedRow {
vertical-align: top;
}

.dataContentPaneNestedLight {
background-color: var(--color-background, white);
}

.dataContentPaneNestedDark {
background-color: #eee;
}
Loading
Loading