Re: [PR] Prototype "volunteers" page - DO NOT MERGE (comdev-site)
ShaneCurcuru commented on code in PR #146: URL: https://github.com/apache/comdev-site/pull/146#discussion_r1404389873 ## static/js/components/person-projects.js: ## @@ -0,0 +1,52 @@ +import fetchPublicData from "./whimsy-loader.js"; +const projects = await fetchPublicData('public_ldap_projects.json'); +var projectsById = {}; + +{ + Object.keys(projects.projects).forEach(project => { +projects.projects[project].members.forEach(m => { + if (!projectsById[m]) { +projectsById[m] = {}; + } + projectsById[m][project] = { pmc: false }; +}) +projects.projects[project].owners.forEach(m => { + if (!projectsById[m]) { +projectsById[m] = {}; + } + projectsById[m][project] = { pmc: true }; +}) + }) +} + +// some projects websites have names that +// differ from their Whimsy name +const projectToWebsite = { Review Comment: See also: https://whimsy.apache.org/docs/hardcoded.cgi which leads to https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/committee.rb#L71 for Whimsy's full list of group name mappings. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org
Re: [PR] Prototype "volunteers" page - DO NOT MERGE (comdev-site)
ShaneCurcuru commented on code in PR #146: URL: https://github.com/apache/comdev-site/pull/146#discussion_r1404391938 ## static/js/components/volunteers-list.js: ## @@ -0,0 +1,40 @@ +import fetchPublicData from "./whimsy-loader.js"; + +// Component that enriches a list of volunteers where each +// entry is formatted in Markdown like +// * bdelacretaz # mentor, speaker # https://grep.codeconsult.ch # Switzerland +// +class VolunteersList extends HTMLElement { + async connectedCallback() { +const people = await fetchPublicData('public_ldap_people.json'); +this.querySelectorAll('li').forEach(li => { + const d = this._parseEntry(li.textContent); + + // set volunteer information + const name = people.people[d.id]?.name ? people.people[d.id]?.name : d.id; + li.innerHTML = ` +${name} +(${d.id}) +- ${d.roles} +${d.location && d.location != 'N/A' ? '- ' + d.location : ''} +- speaks ${d.lang} Review Comment: Should this say "Languages spoken:" (or fluent?) to make it clearer? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org