Skip to content

Rewrite README: document all 9 component types, replace TODO placeholders, update sensor types#301

Merged
tyeth merged 4 commits intomainfrom
copilot/update-readme-documentation
Mar 27, 2026
Merged

Rewrite README: document all 9 component types, replace TODO placeholders, update sensor types#301
tyeth merged 4 commits intomainfrom
copilot/update-readme-documentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

Description

README hadn't been updated in years — the I2C Component Format section was literally "todo", the Legend section was empty, the sensor types list was missing entries, and only Pin components were documented despite 9 component types existing.

Rewrote from the ground up using the actual schema.json files and existing component definitions as source of truth:

  • Repository Structure — tree diagram of components/ layout
  • Contributing — added Image Requirements (4:3, 400×300 max, 100KB, lowercase) and CI Validation pipeline overview
  • Common Fields — factored out the 6 fields shared across all types (displayName, vendor, published, description, productURL, documentationURL)
  • All 9 component type formats documented — Pin, I2C, I2C Output, Display, DS18x20, Pixel, PWM, Servo, UART — each with required fields, field tables, visualization types where applicable, and collapsible real-world examples
  • Sensor Types — complete table of all 35 types with display names (added missing voc-index, nox-index, tvoc)
  • Removed empty Legend section (content now inline in component format sections)

Product URL

N/A — documentation-only change

Product Documentation URL

N/A — documentation-only change


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI changed the title [WIP] Update README with current information and remove TODOs Rewrite README: document all 9 component types, replace TODO placeholders, update sensor types Mar 20, 2026
Copilot AI requested a review from tyeth March 20, 2026 20:58
@tyeth tyeth marked this pull request as ready for review March 27, 2026 16:05
Copy link
Copy Markdown
Member

@tyeth tyeth left a comment

Choose a reason for hiding this comment

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

I reviewed before the last two fixup commits.

I found it useful to use this bookmarklet pasted into the addressbar with Files changed tab visible so I could see the split view rendered markdown diff:

javascript:var e,t;e=this,t=function(){var e={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function t(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function r(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}return function n(o,l){var a,i,d,s,c,f=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t|  {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|(  \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,p=[],u="",g=l||{},h=0;function y(t){var r=e[t[1]||""],n=p[p.length-1]==t;return r?r[1]?(n?p.pop():p.push(t),r[0|n]):r[0]:t}function m(){for(var e="";p.length;)e+=y(p[p.length-1]);return e}for(o=o.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,t,r){return g[t.toLowerCase()]=r,""}).replace(/^\n+|\n+$/g,"");d=f.exec(o);)i=o.substring(h,d.index),h=f.lastIndex,a=d[0],i.match(/[^\\](\\\\)*\\$/)||((c=d[3]||d[4])?a='<pre class="code '+(d[4]?"poetry":d[2].toLowerCase())+'"><code'+(d[2]?' class="language-'+d[2].toLowerCase()+'"':"")+">"+t(r(c).replace(/^\n+|\n+$/g,""))+"</code></pre>":(c=d[6])?(c.match(/\./)&&(d[5]=d[5].replace(/^\d+/gm,"")),s=n(t(d[5].replace(/^\s*[>*+.-]/gm,""))),">"==c?c="blockquote":(c=c.match(/\./)?"ol":"ul",s=s.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),a="<"+c+">"+s+"</"+c+">"):d[8]?a='<img src="'+r(d[8])+'" alt="'+r(d[7])+'">':d[10]?(u=u.replace("<a>",'<a href="'+r(d[11]||g[i.toLowerCase()])+'">'),a=m()+"</a>"):d[9]?a="<a>":d[12]||d[14]?a="<"+(c="h"+(d[14]?d[14].length:d[13]>"="?1:2))+">"+n(d[12]||d[15],g)+"</"+c+">":d[16]?a="<code>"+r(d[16])+"</code>":(d[17]||d[1])&&(a=y(d[17]||"--"))),u+=i,u+=a;return(u+o.substring(h)+m()).replace(/^\n+|\n+$/g,"")}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).snarkdown=t(),function(){"use strict";function e(e){var t=[],r=null;return e.forEach(function(e){r&&r.type===e.type||(r={type:e.type,lines:[]},t.push(r)),r.lines.push(e.content)}),t}function t(e){var t=window.snarkdown||snarkdown,r=function(e){for(var t=e.split("\n"),r=[],n=!1,o=0;o<t.length;o++){var l=t[o],a=/^`{3,}/.test(l.trim());if(a&&!n){for(var i=!1,d=o+1;d<t.length;d++)if(/^`{3,}\s*$/.test(t[d].trim())){i=!0;break}if(i)r.push(l),n=!0;else{var s=l.trim().replace(/^`{3,}\s*/,""),c=[];for(o++;o<t.length;o++)c.push(t[o]);var f=c.join("\n").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");r.push('<pre class="code '+s+'"><code>'+f+"</code></pre>")}}else if(a&&n)r.push(l),n=!1;else if(n||0!==o||a)r.push(l);else{for(var p=-1,u=0;u<t.length;u++)if(/^`{3,}/.test(t[u].trim())){p=u;break}var g=p>0&&/^`{3,}\s*$/.test(t[p].trim());if(g)for(var h=0;h<p;h++)if(/^#{1,6}\s|^\s*[-*+]\s|^\|/.test(t[h])){g=!1;break}g?(f=t.slice(0,p).join("\n").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r.push('<pre class="code"><code>'+f+"</code></pre>"),o=p):r.push(l)}}return r.join("\n")}(e).replace(/^[ \t]*([-*_])[ \t]*\1[ \t]*\1[ \t]*$/gm,"<hr />");return function(e){var t=e.replace(/<\/p>\s*<p>/g,"\n").replace(/<br\s*\/?>/g,"\n").replace(/(<\/h[1-6]>|<\/div>|<\/blockquote>|<\/pre>|<\/ul>|<\/ol>|<\/table>)/g,"$1\n").replace(/(<h[1-6][^>]*>|<div[^>]*>|<blockquote[^>]*>|<pre[^>]*>|<ul[^>]*>|<ol[^>]*>)/g,"\n$1").split("\n"),r=[],n=[];function o(){if(n.length<2)return n.forEach(function(e){r.push(e)}),void(n=[]);var e=[[]];n.forEach(function(t){var r=t.replace(/<[^>]*>/g,"").trim();if(/^[\s|:-]+$/.test(r)&&-1!==r.indexOf("-")){var n=e[e.length-1],o=n.length>0?n.pop():null;return(n.length>0||e.length>1)&&e.push([]),void(o&&e[e.length-1].push(o))}e[e.length-1].push(t)}),e.forEach(function(e){if(0!==e.length){var t='<table style="border-collapse:collapse;margin:4px 0">';e.forEach(function(e,r){for(var n=0===r?"th":"td",o=e.replace(/<code[^>]*>[\s\S]*?<\/code>/g,function(e){return e.replace(/\|/g,"\0P\0")}),l=[],a="",i=!1,d=0;d<o.length;d++){var s=o.charAt(d);"<"===s?i=!0:">"===s&&(i=!1),"|"!==s||i?a+=s:(l.push(a),a="")}l.push(a);var c=l.slice(1,-1);0!==c.length&&(t+="<tr>",c.forEach(function(e){e=e.replace(/\x00P\x00/g,"|").trim(),t+="<"+n+' style="border:1px solid currentColor;padding:2px 8px;opacity:0.8">'+e+"</"+n+">"}),t+="</tr>")}),t+="</table>",r.push(t)}}),n=[]}var l=!1;return t.forEach(function(e){if(/<pre[\s>]/i.test(e)&&(l=!0),l)return n.length>0&&o(),r.length>0&&!/<pre[\s>]/i.test(e)?r[r.length-1]+="\n"+e:r.push(e),void(/<\/pre>/i.test(e)&&(l=!1));var t=e.replace(/<[^>]*>/g,"").trim();/^\|.+\|$/.test(t)?n.push(e):(n.length>0&&o(),r.push(e))}),n.length>0&&o(),r.join("")}(t(r))}function r(e,r,n){var o=t(e);if(!r)return o;var l=function(e,t){var r=e.split(/(\s+)/),n=t.split(/(\s+)/),o=r.length,l=n.length;if(o*l>5e4)return null;var a,i,d=[];for(a=0;a<=o;a++)for(d[a]=[],i=0;i<=l;i++)0===a||0===i?d[a][i]=0:r[a-1]===n[i-1]?d[a][i]=d[a-1][i-1]+1:d[a][i]=Math.max(d[a-1][i],d[a][i-1]);var s=[];for(i=0;i<l;i++)s[i]=!0;for(a=o,i=l;a>0&&i>0;)r[a-1]===n[i-1]?(s[i-1]=!1,a--,i--):d[a-1][i]>d[a][i-1]?a--:i--;var c=[];for(i=0;i<l;i++){var f=c.length>0?c[c.length-1]:null;f&&f.changed===s[i]?f.text+=n[i]:c.push({text:n[i],changed:s[i]})}return c}(r,e);if(!l)return o;var a=[];if(l.forEach(function(e){e.changed&&e.text.trim()&&e.text.split(/(\s+)/).forEach(function(e){e.trim()&&a.push(e.trim())})}),0===a.length)return o;var i=a.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});i.sort(function(e,t){return t.length-e.length});var d=RegExp("("+i.join("|")+")","g"),s='<mark style="background:'+n+';border-radius:3px;padding:0 1px">';return o.replace(/(<[^>]*>)|([^<]+)/g,function(e,t,r){return t||r.replace(d,s+"$1</mark>")})}function n(e,n,o){var l=e.lines.join("\n"),a=n?n.lines.join("\n"):null,i=document.createElement("div");i.className="bookmarklet-diff-chunk bookmarklet-diff-chunk--"+e.type,"add"===e.type?(i.innerHTML=r(l,a,o.addWordBg),i.style.backgroundColor=o.addBg,i.style.borderLeft="4px solid "+o.addBorder,i.style.padding="2px 8px 2px 24px"):"delete"===e.type?(i.innerHTML=r(l,a,o.delWordBg),i.style.backgroundColor=o.delBg,i.style.borderLeft="4px solid "+o.delBorder,i.style.padding="2px 8px 2px 24px"):(i.innerHTML=t(l),i.style.padding="2px 8px 2px 28px");for(var d=i.querySelectorAll("ul, ol"),s=0;s<d.length;s++)d[s].style.paddingInlineStart="20px";for(var c=i.querySelectorAll("code"),f=0;f<c.length;f++){var p=c[f];p.parentNode&&"PRE"===p.parentNode.nodeName||(p.style.background=o.codeBg,p.style.border="1px solid "+o.codeBorder,p.style.borderRadius="6px",p.style.padding="0.2em 0.4em",p.style.fontSize="85%",p.style.fontFamily="ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace")}for(var u=i.querySelectorAll("pre"),g=0;g<u.length;g++)u[g].style.background=o.codeBg,u[g].style.border="1px solid "+o.codeBorder,u[g].style.borderRadius="6px",u[g].style.padding="12px",u[g].style.overflow="auto",u[g].style.fontSize="85%",u[g].style.fontFamily="ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace";for(var h=i.querySelectorAll("h1, h2, h3, h4, h5, h6"),y=0;y<h.length;y++)h[y].style.marginTop="16px",h[y].style.marginBottom="8px";for(var m=i.querySelectorAll("hr"),b=0;b<m.length;b++)m[b].style.margin="16px 0",m[b].style.border="none",m[b].style.borderTop="1px solid "+o.codeBorder;return i}function o(e,t){e.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif',e.style.fontSize="14px",e.style.lineHeight="1.5",e.style.border="1px solid "+t.wrapperBorder,e.style.borderRadius="3px",e.style.background=t.wrapperBg,e.style.color=t.fg,e.style.overflowX="auto"}function l(e,t,r){for(var o=0;o<t.length;o++){var l=t[o];"delete"===l.type&&o+1<t.length&&"add"===t[o+1].type?(e.appendChild(n(l,t[o+1],r)),o++,e.appendChild(n(t[o],t[o-1],r))):e.appendChild(n(l,null,r))}}"undefined"!=typeof snarkdown||void 0!==window.snarkdown?function(){var t=document.querySelectorAll(".file"),r=!1;if(0===t.length){if(0===(t=document.querySelectorAll('[class*="Diff-module__diff__"]')).length){var n=document.querySelectorAll("table[data-diff-anchor]");if(n.length>0){var a=[];n.forEach(function(e){a.push(e.parentElement.parentElement||e.parentElement)}),t=a}}r=!0}if(0===t.length)return console.warn("[MD Diff] No .file containers found. GitHub may be using a different UI."),void console.warn("[MD Diff] Debug: body classes = "+document.body.className);var i=0;Array.prototype.forEach.call(t,function(t){if(!t.dataset.mdDiffAugmented&&function(e,t){if(t){var r=e.querySelector("table[aria-label]");if(r){var n=r.getAttribute("aria-label")||"";return/\.md$/i.test(n)}return!1}if(e.querySelector('[title$=".md"]'))return!0;var o=e.querySelector(".file-info a, .file-header a");return!!o&&(o.getAttribute("title")||o.textContent||"").trim().toLowerCase().endsWith(".md")}(t,r)){var n=t.querySelector("table");if(n){var a=function(e){var t=[];return e.querySelectorAll("tbody tr").forEach(function(e){var r=Array.prototype.slice.call(e.querySelectorAll(".blob-code"));if(0===r.length&&(r=Array.prototype.slice.call(e.querySelectorAll(".diff-text-cell"))),0!==r.length&&!e.classList.contains("js-expandable-line")){var n=!1;r.forEach(function(e){var r=function(e){if(e.classList.contains("blob-code-addition"))return"add";if(e.classList.contains("blob-code-deletion"))return"delete";if(e.classList.contains("blob-code-context"))return"context";var t=e.querySelector("code");if(t){if(t.classList.contains("addition"))return"add";if(t.classList.contains("deletion"))return"delete";if(t.classList.contains("diff-text"))return"context"}return null}(e);if(r){if("context"===r){if(n)return;n=!0}var o=function(e){var t=e.querySelector(".blob-code-inner");if(t){var r=t.textContent;return t.hasAttribute("data-code-marker")?r:r.length>0&&("+"===r[0]||"-"===r[0]||" "===r[0])?r.slice(1):r}var n=e.querySelector(".diff-text-inner");return n?n.textContent:""}(e);""===o.trim()&&"context"!==r||t.push({type:r,content:o})}})}}),t}(n);if(a.length){t.dataset.mdDiffAugmented="true";var d=function(t,r){var n,a=e(t),i="dark"===(n=document.documentElement.getAttribute("data-color-mode"))||"light"!==n&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?{wrapperBg:"#0d1117",wrapperBorder:"#30363d",addBg:"rgba(46,160,67,0.15)",addBorder:"#238636",addWordBg:"rgba(46,160,67,0.40)",delBg:"rgba(248,81,73,0.15)",delBorder:"#da3633",delWordBg:"rgba(248,81,73,0.40)",fg:"#e6edf3",codeBg:"rgba(110,118,129,0.4)",codeBorder:"rgba(110,118,129,0.3)"}:{wrapperBg:"#ffffff",wrapperBorder:"#d0d7de",addBg:"#e6ffec",addBorder:"#22863a",addWordBg:"#abf2bc",delBg:"#ffebe9",delBorder:"#cb2431",delWordBg:"#ff8182",fg:"#1f2328",codeBg:"rgba(175,184,193,0.2)",codeBorder:"rgba(31,35,40,0.15)"},d=document.createElement("div");if(d.className="bookmarklet-rendered-diff",!r)return o(d,i),d.style.padding="10px 0",l(d,a,i),d;o(d,i),d.style.padding="0";var s=[],c=null;t.forEach(function(e){"context"===e.type?(c&&"context"===c.phase||(c={phase:"context",left:[],right:[]},s.push(c)),c.left.push(e),c.right.push(e)):(c&&"context"!==c.phase||(c={phase:"change",left:[],right:[]},s.push(c)),"delete"===e.type?c.left.push(e):c.right.push(e))});var f=document.createElement("table");return f.className="bookmarklet-split-table",f.style.width="100%",f.style.borderCollapse="collapse",f.style.tableLayout="fixed",s.forEach(function(t){var r=document.createElement("tr"),n=document.createElement("td");n.className="bookmarklet-split-left",n.style.width="50%",n.style.verticalAlign="top",n.style.padding="4px 0";var o=document.createElement("td");o.className="bookmarklet-split-right",o.style.width="50%",o.style.verticalAlign="top",o.style.padding="4px 0",o.style.borderLeft="1px solid "+i.wrapperBorder,t.left.length>0&&l(n,e(t.left),i),t.right.length>0&&l(o,e(t.right),i),r.appendChild(n),r.appendChild(o),f.appendChild(r)}),d.appendChild(f),d}(a,n.classList.contains("file-diff-split")||!!n.querySelector(".left-side-diff-cell, .right-side-diff-cell"));d.style.display="none";var s=n.parentNode;s.parentNode.insertBefore(d,s.nextSibling);var c=function(){var e=document.createElement("button");return e.className="bookmarklet-toggle-btn",e.textContent="Show Rendered Diff",e.setAttribute("aria-pressed","false"),e.setAttribute("title","Toggle rendered markdown diff view"),e.style.marginLeft="8px",e.style.padding="3px 10px",e.style.fontSize="12px",e.style.fontWeight="500",e.style.lineHeight="20px",e.style.cursor="pointer",e.style.color="#fff",e.style.backgroundColor="#2ea44f",e.style.border="1px solid rgba(27,31,35,.15)",e.style.borderRadius="6px",e.style.whiteSpace="nowrap",e.style.verticalAlign="middle",e}(),f=!1;c.addEventListener("click",function(){f=!f,c.setAttribute("aria-pressed",f+""),f?(n.style.display="none",d.style.display="block",c.textContent="Show Code Diff"):(n.style.display="",d.style.display="none",c.textContent="Show Rendered Diff")}),function(e,t,r){if(r){var n=e.querySelector('[class*="DiffFileHeader"]');return n?void n.appendChild(t):void e.insertBefore(t,e.firstChild)}var o=e.querySelector(".file-actions")||e.querySelector(".file-header");o&&o.appendChild(t)}(t,c,r),i++}}else console.warn("[MD Diff] .md file found but no diff table yet \u2014 content may still be loading. Try running the bookmarklet again.")}}),0===i?console.warn("[MD Diff] No markdown file diffs found on this page."):console.log("[MD Diff] Augmented "+i+" markdown diff(s).")}():console.error("[MD Diff] snarkdown is not available. Run the build to inline it.")}();

@tyeth tyeth requested a review from brentru March 27, 2026 16:10
Copy link
Copy Markdown
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

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

lgtm this is great

@tyeth tyeth merged commit 440c5ab into main Mar 27, 2026
14 of 15 checks passed
@tyeth tyeth deleted the copilot/update-readme-documentation branch March 27, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants