profile-pane 3.1.1-e2c26c29 → 3.1.2-04d19fbd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"CVPresenter.d.ts","sourceRoot":"","sources":["../src/CVPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAa,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9E,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,EAAE,CAAC;CACpB;AAID,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAW1D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAE,MAAM,CAM9D;AAED,wBAAgB,WAAW,CAAE,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,OAAO,GAAE,MAAM,CAIxE;AAsED,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,cAAc,CAyBhB"}
1
+ {"version":3,"file":"CVPresenter.d.ts","sourceRoot":"","sources":["../src/CVPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAa,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9E,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,EAAE,CAAC;CACpB;AAID,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAW1D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAE,MAAM,CAM9D;AAED,wBAAgB,WAAW,CAAE,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,OAAO,GAAE,MAAM,CAIxE;AAsED,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,cAAc,CA0BhB"}
@@ -108,10 +108,12 @@ function presentCV(subject, store) {
108
108
  }
109
109
  const skills = store.each(subject, _solidUi.ns.schema('skills')).map(sk => skillAsText(store, sk)).filter(skill => skill !== '');
110
110
  const languageNodes = store.each(subject, _solidUi.ns.schema('knowsLanguage'));
111
- const languages = languageNodes.flatMap(node => expandRdfList(store, node)).map(lan => languageAsText(store, lan)).filter(language => language !== '');
111
+ const languages = languageNodes.flatMap(node => expandRdfList(store, node)).map(lan => languageAsText(store, lan));
112
+ // Deduplicate languages
113
+ const uniqueLanguages = Array.from(new Set(languages));
112
114
  return {
113
115
  rolesByType,
114
116
  skills,
115
- languages
117
+ languages: uniqueLanguages
116
118
  };
117
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SocialPresenter.d.ts","sourceRoot":"","sources":["../src/SocialPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAQ,MAAM,QAAQ,CAAA;AAQnD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAuBD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,kBAAkB,CAiEpB"}
1
+ {"version":3,"file":"SocialPresenter.d.ts","sourceRoot":"","sources":["../src/SocialPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAQ,MAAM,QAAQ,CAAA;AAQnD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAiCD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,kBAAkB,CA+EpB"}
@@ -13,22 +13,31 @@ const socialMediaFormName = 'socialMedia.ttl'; // The name of the file to upload
13
13
  const DEFAULT_ICON_URI = _solidUi.icons.iconBase + 'noun_10636_grey.svg'; // grey disc
14
14
 
15
15
  function expandRdfList(store, node) {
16
- const collectionElements = node.elements;
17
- if (Array.isArray(collectionElements)) {
18
- return collectionElements.flatMap(element => expandRdfList(store, element));
19
- }
20
- const first = store.any(node, _solidUi.ns.rdf('first'));
21
- if (!first) return [node];
22
- const items = [];
23
- let current = node;
24
- while (current) {
25
- const value = store.any(current, _solidUi.ns.rdf('first'));
26
- if (value) items.push(...expandRdfList(store, value));
27
- const rest = store.any(current, _solidUi.ns.rdf('rest'));
28
- if (!rest || rest.termType === 'NamedNode' && rest.value === _solidUi.ns.rdf('nil').value) break;
29
- current = rest;
16
+ const visited = new Set();
17
+ function inner(node) {
18
+ const termType = node.termType || typeof node;
19
+ const value = node.value || String(node);
20
+ const key = `${termType}:${value}`;
21
+ if (visited.has(key)) return [];
22
+ visited.add(key);
23
+ const collectionElements = node.elements;
24
+ if (Array.isArray(collectionElements)) {
25
+ return collectionElements.flatMap(element => inner(element));
26
+ }
27
+ const first = store.any(node, _solidUi.ns.rdf('first'));
28
+ if (!first) return [node];
29
+ const items = [];
30
+ let current = node;
31
+ while (current) {
32
+ const value = store.any(current, _solidUi.ns.rdf('first'));
33
+ if (value) items.push(...inner(value));
34
+ const rest = store.any(current, _solidUi.ns.rdf('rest'));
35
+ if (!rest || rest.termType === 'NamedNode' && rest.value === _solidUi.ns.rdf('nil').value) break;
36
+ current = rest;
37
+ }
38
+ return items;
30
39
  }
31
- return items;
40
+ return inner(node);
32
41
  }
33
42
  function presentSocial(subject, store) {
34
43
  function nameForAccount(subject) {
@@ -59,12 +68,17 @@ function presentSocial(subject, store) {
59
68
  return DEFAULT_ICON_URI;
60
69
  }
61
70
  function homepageForAccount(subject) {
62
- const id = store.anyJS(subject, _solidUi.ns.foaf('accountName'), null, subject.doc()) || '';
71
+ const acHomepage = store.any(subject, _solidUi.ns.foaf('homepage')); // on the account itself?
72
+ if (acHomepage) return acHomepage.value;
73
+ const id = store.anyJS(subject, _solidUi.ns.foaf('accountName'), null, subject.doc()) || 'No_account_Name';
63
74
  const classes = store.each(subject, _solidUi.ns.rdf('type'));
64
75
  for (const k of classes) {
65
- const userProfilePrefix = store.any(k, _solidUi.ns.foaf('userProfilePrefix'));
66
- if (userProfilePrefix) {
67
- return userProfilePrefix.value + id.trim();
76
+ // Fix: ensure k is a NamedNode for store.any
77
+ if (k.termType === 'NamedNode') {
78
+ const userProfilePrefix = store.any(k, _solidUi.ns.foaf('userProfilePrefix'));
79
+ if (userProfilePrefix) {
80
+ return userProfilePrefix.value + id.trim();
81
+ }
68
82
  }
69
83
  }
70
84
  return store.anyJS(subject, _solidUi.ns.foaf('homepage'), null, subject.doc()) || '';
@@ -78,16 +92,25 @@ function presentSocial(subject, store) {
78
92
  }
79
93
 
80
94
  // we need to load the social media accounts ontology to be able to query all data needed
81
- (0, _rdfFormsHelper.loadDocument)(socialMediaFormName, socialMediaForm, store);
95
+ (0, _rdfFormsHelper.loadDocument)(store, socialMediaForm, socialMediaFormName);
82
96
  const accountNodes = store.each(subject, _solidUi.ns.foaf('account'));
83
- const accountThings = accountNodes.flatMap(node => expandRdfList(store, node));
84
- if (!accountThings.length) return {
97
+ let accountThings = accountNodes.flatMap(node => expandRdfList(store, node));
98
+ // Deduplicate by foaf:accountName value
99
+ const accountNameSet = new Set();
100
+ const accounts = [];
101
+ for (const ac of accountThings) {
102
+ if (ac.termType === 'NamedNode') {
103
+ const accountNameNode = store.any(ac, _solidUi.ns.foaf('accountName'));
104
+ const accountName = accountNameNode ? accountNameNode.value : '';
105
+ if (!accountNameSet.has(accountName)) {
106
+ accountNameSet.add(accountName);
107
+ accounts.push(accountAsObject(ac));
108
+ }
109
+ }
110
+ }
111
+ if (!accounts.length) return {
85
112
  accounts: []
86
113
  };
87
- //console.log('Social: accountThings', accountThings)
88
- const accounts = accountThings.map(ac => accountAsObject(ac));
89
- //console.log('Social: account objects', accounts)
90
-
91
114
  return {
92
115
  accounts
93
116
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EditCVCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCVCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eA+BxH"}
1
+ {"version":3,"file":"EditCVCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCVCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAgCxH"}
@@ -13,8 +13,9 @@ const resumeFormName = 'resumeForm.ttl'; // The name of the form file
13
13
 
14
14
  function EditCVSection(context, me, editableProfile, store) {
15
15
  const section = context.dom.createElement('section');
16
+ section.setAttribute('data-testid', 'edit-cv-section');
16
17
  section.setAttribute('aria-labelledby', 'edit-profile-cv-heading');
17
- section.classList.add('profileSection', 'section-bg');
18
+ section.classList.add('profileSection', 'section-bg', 'profile-form');
18
19
  const header = context.dom.createElement('header');
19
20
  header.classList.add('text-center', 'mb-md');
20
21
  const heading = context.dom.createElement('h2');
@@ -1 +1 @@
1
- {"version":3,"file":"EditCommunitiesCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCommunitiesCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eAqC9I"}
1
+ {"version":3,"file":"EditCommunitiesCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCommunitiesCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eA6C9I"}
@@ -19,20 +19,29 @@ function EditProfileCommunitiesSection(context, me, editableProfile, profile) {
19
19
  header.appendChild(heading);
20
20
  section.appendChild(header);
21
21
  const comment1 = context.dom.createElement('p');
22
+ comment1.id = 'edit-profile-communities-description';
22
23
  comment1.classList.add('p-md');
23
24
  comment1.textContent = 'These are organizations and projects whose stuff you share';
24
25
  section.appendChild(comment1);
26
+ let comment2 = null;
25
27
  if (editableProfile) {
26
- const comment2 = context.dom.createElement('p');
28
+ comment2 = context.dom.createElement('p');
29
+ comment2.id = 'edit-profile-communities-help';
27
30
  comment2.classList.add('p-md');
28
31
  comment2.textContent = 'Drag organizations onto the target below to add organizations.';
29
32
  section.appendChild(comment2);
30
33
  }
31
- section.appendChild(_solidUi.widgets.attachmentList(context.dom, me, section, {
34
+ const attachmentList = _solidUi.widgets.attachmentList(context.dom, me, section, {
32
35
  doc: profile,
33
36
  modify: !!editableProfile,
34
37
  predicate: _solidUi.ns.solid('community'),
35
38
  noun: 'community'
36
- }));
39
+ });
40
+ const descriptions = [comment1.id];
41
+ if (comment2?.id) {
42
+ descriptions.push(comment2.id);
43
+ }
44
+ attachmentList.setAttribute('aria-describedby', descriptions.join(' '));
45
+ section.appendChild(attachmentList);
37
46
  return section;
38
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditFriendsCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditFriendsCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eAsCnI"}
1
+ {"version":3,"file":"EditFriendsCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditFriendsCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eA8CnI"}
@@ -19,20 +19,29 @@ function EditFriendsSection(context, me, editableProfile, profile) {
19
19
  header.appendChild(heading);
20
20
  section.appendChild(header);
21
21
  const comment1 = context.dom.createElement('p');
22
+ comment1.id = 'edit-profile-friends-description';
22
23
  comment1.classList.add('p-md');
23
24
  comment1.textContent = 'This is your public social network. Only put people here to whom you are happy to be publicly connected. (You can always keep private track of friends and family in your contacts.)';
24
25
  section.appendChild(comment1);
26
+ let comment2 = null;
25
27
  if (editableProfile) {
26
- const comment2 = context.dom.createElement('p');
28
+ comment2 = context.dom.createElement('p');
29
+ comment2.id = 'edit-profile-friends-help';
27
30
  comment2.classList.add('p-md');
28
31
  comment2.textContent = 'Drag people onto the target below to add people.';
29
32
  section.appendChild(comment2);
30
33
  }
31
- section.appendChild(_solidUi.widgets.attachmentList(context.dom, me, section, {
34
+ const attachmentList = _solidUi.widgets.attachmentList(context.dom, me, section, {
32
35
  doc: profile,
33
36
  modify: !!editableProfile,
34
37
  predicate: _solidUi.ns.foaf('knows'),
35
38
  noun: 'friend'
36
- }));
39
+ });
40
+ const descriptions = [comment1.id];
41
+ if (comment2?.id) {
42
+ descriptions.push(comment2.id);
43
+ }
44
+ attachmentList.setAttribute('aria-describedby', descriptions.join(' '));
45
+ section.appendChild(attachmentList);
37
46
  return section;
38
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditOtherPreferences.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditOtherPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAmBtI"}
1
+ {"version":3,"file":"EditOtherPreferences.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditOtherPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAoBtI"}
@@ -13,8 +13,9 @@ const otherPreferencesFormName = 'otherPreferencesForm.ttl'; // The name of the
13
13
 
14
14
  function EditOtherPreferencesSection(context, me, editableProfile, store) {
15
15
  const section = context.dom.createElement('section');
16
+ section.setAttribute('data-testid', 'edit-other-preferences-section');
16
17
  section.setAttribute('aria-labelledby', 'edit-profile-other-preferences-heading');
17
- section.classList.add('profileSection', 'section-bg');
18
+ section.classList.add('profileSection', 'section-bg', 'profile-form');
18
19
  const header = context.dom.createElement('header');
19
20
  header.classList.add('text-center', 'mb-md');
20
21
  const heading = context.dom.createElement('h2');
@@ -1 +1 @@
1
- {"version":3,"file":"EditProfileView.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditProfileView.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,yBAAyB,CAAA;AAChC,OAAO,gCAAgC,CAAA;AAIvC,QAAA,MAAM,eAAe,EAAE,cAiFtB,CAAA;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"EditProfileView.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditProfileView.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,yBAAyB,CAAA;AAChC,OAAO,gCAAgC,CAAA;AAIvC,QAAA,MAAM,eAAe,EAAE,cAoGtB,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -45,14 +45,26 @@ const editProfileView = {
45
45
  // Use <main> for the main content area, styled as a grid like ProfileView
46
46
  const main = dom.createElement('main');
47
47
  main.setAttribute('id', 'profile-edit-main-content');
48
- main.classList.add('profile-grid');
48
+ main.setAttribute('aria-busy', 'true');
49
+ main.setAttribute('tabindex', '-1');
50
+ main.classList.add('profile-grid', 'no-focus-ring');
51
+ const mainHeading = dom.createElement('h1');
52
+ mainHeading.classList.add('visually-hidden');
53
+ mainHeading.textContent = 'Edit Profile';
54
+ main.appendChild(mainHeading);
49
55
  div.appendChild(main);
50
56
 
51
57
  // Use <aside> for the status area
52
58
  const statusArea = dom.createElement('aside');
53
59
  statusArea.classList.add('p-sm');
60
+ statusArea.setAttribute('role', 'status');
54
61
  statusArea.setAttribute('aria-live', 'polite');
55
- div.appendChild(statusArea);
62
+ statusArea.setAttribute('aria-atomic', 'true');
63
+ const ensureStatusArea = () => {
64
+ if (!statusArea.isConnected) {
65
+ div.appendChild(statusArea);
66
+ }
67
+ };
56
68
  const profileContext = {
57
69
  dom: dom,
58
70
  div: main,
@@ -70,6 +82,7 @@ const editProfileView = {
70
82
  } else if (store.updater.editable(profile.uri, store)) {
71
83
  editableProfile = profile;
72
84
  } else {
85
+ ensureStatusArea();
73
86
  statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`, 'straw'));
74
87
  return;
75
88
  }
@@ -78,12 +91,12 @@ const editProfileView = {
78
91
  // Your contact information Section
79
92
  main.appendChild((0, _EditContactsCard.EditContactsSection)(context, me));
80
93
 
81
- // Social Accounts Section
82
- main.appendChild((0, _EditSocialCard.EditSocialSection)(context, me, editableProfile, store));
83
-
84
94
  // Resume Section
85
95
  main.appendChild((0, _EditCVCard.EditCVSection)(context, me, editableProfile, store));
86
96
 
97
+ // Social Accounts Section
98
+ main.appendChild((0, _EditSocialCard.EditSocialSection)(context, me, editableProfile, store));
99
+
87
100
  // Other preferences Section
88
101
  main.appendChild((0, _EditOtherPreferences.EditOtherPreferencesSection)(context, me, editableProfile, store));
89
102
 
@@ -92,8 +105,12 @@ const editProfileView = {
92
105
 
93
106
  // Communities you participate in Section
94
107
  main.appendChild((0, _EditCommunitiesCard.EditProfileCommunitiesSection)(context, me, editableProfile, profile));
108
+ main.setAttribute('aria-busy', 'false');
109
+ main.focus();
95
110
  }).catch(error => {
111
+ ensureStatusArea();
96
112
  statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, error, '#fee'));
113
+ main.setAttribute('aria-busy', 'false');
97
114
  });
98
115
  return div;
99
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditSocialCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditSocialCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eA+B5H"}
1
+ {"version":3,"file":"EditSocialCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditSocialCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAgC5H"}
@@ -13,8 +13,9 @@ const socialMediaFormName = 'socialMedia.ttl'; // The name of the form file
13
13
 
14
14
  function EditSocialSection(context, me, editableProfile, store) {
15
15
  const section = context.dom.createElement('section');
16
+ section.setAttribute('data-testid', 'edit-social-section');
16
17
  section.setAttribute('aria-labelledby', 'edit-profile-social-heading');
17
- section.classList.add('profileSection', 'section-bg');
18
+ section.classList.add('profileSection', 'section-bg', 'profile-form');
18
19
  const header = context.dom.createElement('header');
19
20
  header.classList.add('text-center', 'mb-md');
20
21
  const heading = context.dom.createElement('h2');