Skip to content

Commit

Permalink
moved files and changed ontology URI from https://solidos.github.io/s…
Browse files Browse the repository at this point in the history
  • Loading branch information
timbl committed Nov 3, 2024
1 parent ea48b39 commit 5fb8bf6
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 200 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# Wrap ttext files in js as text load is broken
# Wrap text files in js as text load is broken

src/editProfilePane/wrapped-profileFormText.ts : src/editProfilePane/profileFormText.ttl src/editProfilePane/socialMedia.ttl
echo "export const profileFormText = \`" > $@
cat src/editProfilePane/profileFormText.ttl >> $@
cat src/editProfilePane/socialMedia.ttl >> $@
src/editProfilePane/wrapped-profileFormText.ts : src/ontology/profileForm.ttl src/ontology/socialMedia.ttl
echo "export const profileForm= \`" > $@
cat src/ontology/profileForm.ttl >> $@
cat src/ontology/socialMedia.ttl >> $@
echo '` ;' >> $@
2 changes: 1 addition & 1 deletion src/SocialPresenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const DEFAULT_ICON_URI = icons.iconBase + 'noun_10636_grey.svg' // grey disc


export function loadProfileForm (store: LiveStore) {
const preferencesForm = store.sym('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this')
const preferencesForm = store.sym('https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this')
const preferencesFormDoc = preferencesForm.doc()
if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
// If not loaded already
Expand Down
64 changes: 38 additions & 26 deletions src/editProfilePane/wrapped-profileFormText.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const profileFormText = `
export const profileForm= `
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
Expand All @@ -13,10 +13,17 @@ export const profileFormText = `
@prefix wd: <http://www.wikidata.org/entity/>.
@prefix wdt: <http://www.wikidata.org/prop/direct/>.
@prefix : <#>.
@prefix : <https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#>.
@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.
# was: https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this
# moved to: https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this
# About forms: https://solidos.github.io/solid-ui/Documentation/forms-intro.html
# About personal public data :
# About personal public data: https://www.w3.org/DesignIssues/PersonalPublic.html
#
:this
Expand Down Expand Up @@ -387,28 +394,6 @@ WHERE
# Hope there are not any important ones which have three-letter codes.
# Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language "$(languages)". }
# ENDS
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix solid: <http://www.w3.org/ns/solid/terms#>.
@prefix ui: <http://www.w3.org/ns/ui#>.
@prefix schema: <http://schema.org/>.
@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
@prefix org: <http://www.w3.org/ns/org#>.
@prefix esco: <http://data.europa.eu/esco/model#>.
@prefix wd: <http://www.wikidata.org/entity/>.
@prefix wdt: <http://www.wikidata.org/prop/direct/>.
@prefix : <#>.
########### Social Media - other accounts
#
# Twitter, Linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,
Expand Down Expand Up @@ -560,7 +545,34 @@ WHERE
##### Ontology of Accounts
# ENDS
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix solid: <http://www.w3.org/ns/solid/terms#>.
@prefix ui: <http://www.w3.org/ns/ui#>.
@prefix schema: <http://schema.org/>.
@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
@prefix org: <http://www.w3.org/ns/org#>.
@prefix esco: <http://data.europa.eu/esco/model#>.
@prefix wd: <http://www.wikidata.org/entity/>.
@prefix wdt: <http://www.wikidata.org/prop/direct/>.
@prefix : <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.
@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.
# was: https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this
# moved to: https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this
# and https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl
##### Ontology of Online Accounts
foaf:Account a rdfs:Class;
rdfs:label "Online Account Provider";
Expand Down
2 changes: 1 addition & 1 deletion src/integration-tests/cv.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pane from "../index";
pbcimport pane from "../index";
import { parse } from "rdflib";
import { store } from "solid-logic";
import { findByTestId } from "@testing-library/dom";
Expand Down
2 changes: 1 addition & 1 deletion src/integration-tests/examples/tim-social-2.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@prefix : <#> .
@prefix Ber: <https://www.w3.org/People/Berners-Lee/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix prof: <https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#> .
@prefix prof: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

:id1729675527480 a prof:BlueSkyAccount;
Expand Down
26 changes: 13 additions & 13 deletions src/integration-tests/examples/tim-social.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
@prefix skill: <http://data.europa.eu/esco/skill/>.
@prefix tim: </>.
@prefix ww: <https://www.cern.ch/>.
@prefix prof: <https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#>.
@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.
@prefix n6: <https://>.
@prefix c1: <https://solidos.solidcommunity.net/profile/card#>.

Expand All @@ -72,33 +72,33 @@



:id1729675527480 a prof:BlueSkyAccount; foaf:id "timbl.bsky.social".
:id1729675527480 a soc:BlueSkyAccount; foaf:id "timbl.bsky.social".

:id1729912807298 a prof:FacebookAccount; foaf:id "tim.bernerslee.9".
:id1729912807298 a soc:FacebookAccount; foaf:id "tim.bernerslee.9".

:id1729912986863 a prof:InstagramAccount; foaf:id "timblee".
:id1729912986863 a soc:InstagramAccount; foaf:id "timblee".

:id1730055928507 a prof:MastodonAccount; foaf:id "@[email protected]".
:id1730055928507 a soc:MastodonAccount; foaf:id "@[email protected]".

:id1730056067040 a prof:RedditAccount.
:id1730056067040 a soc:RedditAccount.

:id1730056125033 a prof:RedditAccount; foaf:id "timbl".
:id1730056125033 a soc:RedditAccount; foaf:id "timbl".

:id1730056175230 a prof:TwitterAccount; foaf:id "@timberners_lee".
:id1730056175230 a soc:TwitterAccount; foaf:id "@timberners_lee".

:id1730056248989
a prof:OtherAccount;
a soc:OtherAccount;
rdfs:label "My homepage at W3C";
foaf:homepage Ber:;
foaf:icon <https://www.w3.org/assets/logos/w3c/w3c-bars.svg>.
:id1730058497607 a prof:SnapchatAccount.
:id1730058497607 a soc:SnapchatAccount.

:id1730059685809 a prof:TiktokAccount.
:id1730059685809 a soc:TiktokAccount.

:id1730387315524 a prof:GithubAccount; foaf:id "timbl".
:id1730387315524 a soc:GithubAccount; foaf:id "timbl".

:id1730387353050
a prof:MatrixAccount; foaf:id " @timbl-54d26c98db8155e6700f7312:gitter.im".
a soc:MatrixAccount; foaf:id " @timbl-54d26c98db8155e6700f7312:gitter.im".
:me .


Expand Down
4 changes: 3 additions & 1 deletion src/integration-tests/social.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { findByTestId } from "@testing-library/dom";
import { context, doc, subject } from "./setup";


import exampleProfile from './examples/testingsolidos.ttl'
// import exampleProfile from './examples/testingsolidos.ttl'


// This was at testingsolidos.solidcommunity.net

const exampleProfile = ``;

// console.log('exampleProfile', exampleProfile)
`
describe("profile-pane", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@prefix os: <http://www.w3.org/2000/10/swap/os#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
Expand All @@ -12,10 +13,17 @@
@prefix wd: <http://www.wikidata.org/entity/>.
@prefix wdt: <http://www.wikidata.org/prop/direct/>.

@prefix : <#>.
@prefix : <https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#>.
@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.

# was: https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this
# moved to: https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this




# About forms: https://solidos.github.io/solid-ui/Documentation/forms-intro.html
# About personal public data :
# About personal public data: https://www.w3.org/DesignIssues/PersonalPublic.html
#

:this
Expand Down Expand Up @@ -386,6 +394,156 @@ WHERE
# Hope there are not any important ones which have three-letter codes.
# Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language "$(languages)". }

########### Social Media - other accounts
#
# Twitter, Linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,
# Snapchat, TikTok, etc

:SocialsPrompt a ui:Heading; ui:contents "Social Media etc?" .
:SocialsPrompt a ui:Comment; ui:contents "Link to accounts in social media sites, etc" .

:SocialsForm a ui:Multiple;
ui:label "online account";
ui:property foaf:account;
ui:ordered true; # Allow user to order occounts most important first.
ui:part :AccountsForm.

:AccountsForm a ui:Group; ui:weight 1; ui:parts ( :AccountField :AccountIdField ).

:AccountField a ui:Classifier; ui:label "What sort of account?"@en;
ui:multiple false ;
ui:category foaf:Account .

:AccountIdField a ui:Options .

:AccountIdField a ui:Options; ui:dependingOn rdf:type; ui:case
[ ui:for soc:BlueSkyAccount; ui:use :BlueSkyIdField ],
[ ui:for soc:FacebookAccount; ui:use :FacebookIdField ],
[ ui:for soc:GithubAccount; ui:use :GithubIdField ],
[ ui:for soc:InstagramAccount; ui:use :InstagramIdField ],
[ ui:for soc:LinkedInAccount; ui:use :LinkedInIdField ],
[ ui:for soc:MastodonAccount; ui:use :MastodonIdField ],
[ ui:for soc:MatrixAccount; ui:use :MatrixIdField ],
[ ui:for soc:RedditAccount; ui:use :RedditIdField ],
[ ui:for soc:SnapchatAccount; ui:use :SnapchatIdField ],
[ ui:for soc:TiktokAccount; ui:use :TiktokIdField ],
[ ui:for soc:TwitterAccount; ui:use :TwitterIdField ],
[ ui:for soc:OtherAccount; ui:use :OtherIdForm ] .

:BlueSkyIdField
a ui:SingleLineTextField ;
ui:label "Bluesky Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*"; # @@
ui:size 40 .

:FacebookIdField
a ui:SingleLineTextField ;
ui:label "Facebook Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "[a-z0-9A-Z_-]*"; # @@
ui:size 40 .

:GithubIdField
a ui:SingleLineTextField ;
ui:label "Github Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "[a-z0-9A-Z_-]*"; # @@
ui:size 40 .

:InstagramIdField
a ui:SingleLineTextField ;
ui:label "Instagram Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "[a-z0-9A-Z_-]*"; # @@
ui:size 40 .

:LinkedInIdField
a ui:SingleLineTextField ;
ui:label "Linked In Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*"; # @@
ui:size 40 .

:MastodonIdField
a ui:SingleLineTextField ;
ui:label "Mastodon (Activity Pub) Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*"; # @@
ui:size 40 .

:MatrixIdField
a ui:SingleLineTextField ;
ui:label "Matrix Username";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*"; # @@
ui:size 40 .

:RedditIdField
a ui:SingleLineTextField ;
ui:label "Reddit Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "[a-z0-9A-Z_-]*"; # @@
ui:size 40 .

:SnapchatIdField
a ui:SingleLineTextField ;
ui:label "Snapchat Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "@[a-z0-9A-Z_-]*"; # @@
ui:size 40 .

:TiktokIdField
a ui:SingleLineTextField ;
ui:label "Tiktok Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "@[a-z0-9A-Z_-]*"; # @@
ui:size 40 .

:TwitterIdField
a ui:SingleLineTextField ;
ui:label "Twitter Id";
ui:maxLength "200" ;
ui:property foaf:id ;
ui:pattern "@[a-z0-9A-Z_-]*"; # @@
ui:size 40 .

# an unknown SN account needs more info

:OtherIdForm a ui:Group; ui:weight 0; ui:parts ( :OtherIdField :OtherIconField :OtherLabelield ).

:OtherIdField
a ui:NamedNodeURIField ;
ui:label "URL of account to link to";
ui:maxLength "200" ;
ui:property foaf:homepage ;
ui:size 60 .

:OtherLabelield
a ui:SingleLineTextField ;
ui:label "Label";
ui:maxLength "200" ;
ui:property rdfs:label ;
ui:size 40 .

:OtherIconField
a ui:NamedNodeURIField ;
ui:label "URL of icon to display";
ui:maxLength "200" ;
ui:property foaf:icon ;
ui:size 60 .





Expand Down
Loading

0 comments on commit 5fb8bf6

Please sign in to comment.