Version 7.1.0-beta1
DATE TBD
NOTE: These are work in progress notes
for the next version of bitty.
Check the Version 7.0.0 notes below
for the current version.
Version: 7.0.0
Dec. 10, 2025
-
Version 7.0.0 release.
-
No changes since
7.0.0-rc2.
Version: 7.0.0-rc2
Dec. 7, 2025
This change primarily moves .target and
.sender items from el to ev.
And moves the sending element into
ev.sender with extra the features added.
-
Renamed
ev.valtoev.value -
Renamed
ev.valInttoev.intValue -
Renamed
ev.valFloattoev.floatValue -
Renamed
ev.dstoev.prop -
Renamed
ev.dsInttoev.propToInt -
Renamed
ev.dsFloattoev.propToFloat -
Added
ev.sender.value -
Added
ev.sender.valueToInt -
Added
ev.sender.valueToFloat -
Moved
el.targetBittyIdtoev.bittyId -
Renamed
el.dstoel.prop -
Renamed
el.dsInttoel.propToInt -
Renamed
el.dsFloattoel.propToFloat -
Removed
el.targetDs()in favor of existingev.prop() -
Removed
el.targetDsInt()in favor of existingev.propToInt() -
Removed
el.targetDsFloat()in favor of existingev.propToFloat() -
Moved
el.senderBittyIdtoev.sender.bittyId -
Removed
el.senderDs()in favor of existingev.sender.prop() -
Removed
el.senderDsInt()in favor of existingev.sender.propToInt() -
Removed
el.senderDsFloat()in favor of existingev.sender.propToFloat() -
Removed
el.valin favor of the standardel.value -
Renamed
el.valInttoel.valueToInt -
Renamed
el.valFloattoel.valueToFloat -
Removed
el.targetValin favor ofev.value -
Removed
el.targetValIntin favor ofev.valueToInt -
Removed
el.targetValFloatin favor ofev.valueToFloat -
Removed
el.senderValin favor ofev.sender.value -
Removed
el.senderValIntin favor ofev.sender.valueToInt -
Removed
el.senderValueFloatin favor ofev.sender.valueToFloat -
Renamed
el.matchTargetDstoel.propMatchesTarget -
Renamed
el.matchSenderDstoel.propMatchesSender -
Fixed bug where
el.isSenderwas checking againstel.senderinstead ofev.sender. -
Removed deprecated
el.sendercode. -
Fixed bug where forwared signals required a receiver. They now fire once if there isn't a receiver the same way
data-sendworks. -
The
bittyelement is used as theev.senderon athis.api.tigger(SIGNAL)call (previously, anullvalue was sent) -
Removed
el.bittyParentBittyId. Usethis.api.bittyIdorel.bittyParent.bittyIdinstead. -
Refactored to use centralized processEvent method.
Version: 7.0.0-rc1
This update is a largely a set of API refinements to make things more obvious and consistent.
It also adds data-use which allows an element
to send a signal that only it uses.
-
Improved error messages with more details when connections can't be made.
-
Renamed the
bitty-#.#.#.min.jsfile tobitty-#.#.#.jsto highlight that it's the one that should be used in production. -
Renamed the
bitty-#.#.#.full.jsfile tobitty-#.#.#.dev.jsfor clarity that it's the source code and not what should be used in production. -
TODO: Added
this.api.makeSVGwhich takes a text string and turns it into an SVG. -
Moved
bittyInitback to inline instead of running as an event to allow properasync/awaitfunctionality. -
Moved
bittyReadyback to inline instead of running as an event to allow properasync/awaitfunctionality. -
Added
data-usewhich sends a signal from an element which is only processed by the element itself (e.g. if there are several elements with the samedata-useordata-sendvalues the other aren't processed). This means you don't have to check.isSenderorisTargetif you don't need to update other elements from a signal. (You'd still need them for doing different things when every element needs to be updated differently depending on if it's the sender/target or not.)The
data-useattribute picks up events from child element the same waydata-senddoes. -
Moved
ev.sendertoel.senderThe sender element is no longer appended to the event. It's added to the element instead so that all general usage can be done through the element (e.g.el) argument. -
Renamed
el.getString(KEY)toel.ds(KEY) -
Renamed
el.getInt(KEY)toel.dsInt(KEY) -
Renamed
el.getFloat(KEY)toel.dsFloat(KEY) -
Removed
ev.target.getString(KEY) -
Added:
el.targetDs(KEY) -
Removed
ev.target.getInt(KEY) -
Added:
el.targetDsInt(KEY) -
Removed
ev.target.getFloat(KEY) -
Added:
el.targetDsFloat(KEY) -
Removed
ev.target.stringValue(KEY) -
Added:
el.targetVal(KEY) -
Removed
ev.target.intValue(KEY) -
Added:
el.targetValInt(KEY) -
Removed
ev.target.floatValue(KEY) -
Added:
el.targetValFloat(KEY) -
Removed
ev.sender.getString(KEY) -
Added:
el.senderDs(KEY) -
Removed
ev.sender.getInt(KEY) -
Added:
el.senderDsInt(KEY) -
Removed
ev.sender.getFloat(KEY) -
Added:
el.senderDsFloat(KEY) -
Removed
ev.sender.stringValue(KEY) -
Added:
el.senderVal(KEY) -
Removed
ev.sender.intValue(KEY) -
Added:
el.senderValInt(KEY) -
Removed
ev.sender.floatValue(KEY) -
Added:
el.senderValFloat(KEY) -
Added
el.val -
Added
el.valInt -
Added
el.valFloat -
Added
el.targetBittyId -
Added
el.senderBittyId -
Renamed
el.bittyParentIdtoel.bittyParentBittyIdto be consistent with other...BittyIdproperties. -
Renamed
el.matchTarget(KEY)toel.matchTargetDs(KEY) -
Renamed
el.matchSender(KEY)toel.matchSenderDs(KEY) -
Added
ev.valthese are for when a method is run without a receiver and the target is an input. -
Added
ev.valIntthese are for when a method is run without a receiver and the target is an input. -
Added
ev.valFloatthese are for when a method is run without a receiver and the target is an input. -
Added
ev.ds(KEY)these are for when a method is run without a receiver and the target is an input. -
Added
ev.dsInt(KEY)these are for when a method is run without a receiver and the target is an input. -
Added
ev.dsFloat(KEY)these are for when a method is run without a receiver and the target is an input. -
Added
el.ds(KEY)which is an alias toel.dataset.keywhich gets returns as a string. -
Added
el.senderDs(KEY)which is an alias toel.sender.dataset.keywhich gets returns as a string. -
Added
el.targetDs(KEY)which is an alias toev.sender.dataset.keywhich gets returns as a string. -
Improved error message when
data-connectdoesn't make a connection.
Version: 6.0.0-rc3
DATE TBD
-
Added
event.target.stringValuethe returns theevent.target.valueas a string. (this is effectively an alias that's only here to keep the mental model with.intValueand.floatValueconsistent) -
Added
event.target.intValuethe returns theevent.target.valueas an integer. -
Added
event.target.floatValuethe returns theevent.target.valueas an float. -
Added
event.sender.stringValuethe returns theevent.sender.valueas a string. (this is effectively an alias that's only here to keep the mental model with.intValueand.floatValueconsistent) -
Added
event.sender.intValuethe returns theevent.sender.valueas an integer. -
Added
event.sender.floatValuethe returns theevent.sender.valueas an float. -
Added
event.target.getString(KEY) -
Added
event.target.getInt(KEy) -
Added
event.target.getFloat(KEY) -
Added
event.sender.getString(KEY) -
Added
event.sender.getInt(KEY) -
Added
event.sender.getFloat(KEY) -
Added
el.matchTarget(KEY)Note that there is no string/int/float because the values are always stored as strings so the comparison doesn't have to convert them since it would just be the same thing anyway -
Added
el.matchSender(KEY)Note that there is no string/int/float because the values are always stored as strings so the comparison doesn't have to convert them since it would just be the same thing anyway -
Remove setting
style="display: block;". Leaving this as a decision at implementation time.
Version: 6.0.0-rc2
Nov. 25, 2025
-
Updated the
data-connectprocess so that URLs that start with a/get updated with the origin of thewindow.location.hrefto avoid issues when using CDNs for thebitty-#.#.#...file.At this time, relative URLs that start with a
.are not yet supported.
Version 6.0.0-rc1
Nov. 24, 2025
-
Updated license to CC0 for the public domain.
-
Added
this.api.getBittyParent(el)that returns the bitty element that contains theelelement. If theelelement is a bitty tag it returns itself. -
Added
data-bittyidattrs to everything so they can be used for comparisons. -
Events are captured from every element (not just those with
data-sendanddata-receive). Events bubble up the document where bitty looks for them on the window object. -
For the bitty events, the target that the event happened on and then the
senderthat is the element that had thedata-sendon it are both included. (e.g.event.targetis where the event happened atevent.senderi the element withdata-sendthat sent the signal. Theevent.targetandevent.senderwill be the same element if theevent.targetis what had thedata-sendattribute. Otherwise, they are different. -
Added
el.bittyParentthat contains a reference to the bitty parent element -
Added
el.bittyParentIdthat contains a reference to the bitty parent element's data-bittyid -
Removed
this.api.match()in favor ofel.isTargetandel.isSender. (this.api.matchTarget()andthis.api.matchSender()existed briefly but were also removed as part of the transition toel.isTargetandel.isSender. -
Added
el.isTarget()which is boolean that indicates if the element is the one that generated the event. -
Added
el.isSender()which is boolean that indicates if the element is the one withdata-sendthat sent the event (which may or may not be the same as the target identified byel.isTarget() -
Events bubble up until they hit an element with a
data-sendattribute. (e.g. you can click an element that doesn't have adata-sendattribute that's inside a div that does and the one from the div will fire) -
Renamed
data-sendtodata-initon the<bitty-#-#>tags to matchdata-initbehavior on child elements (i.e. only fires once when the element is initialized) -
data-sendattributes on<bitty-#-#>elements now send events (e.g. from clicks) the same way they do for child elements. -
Converted
bitty...pseudo-events to classes extended fromEvent. All events are set to bubble up the document. -
Created
this.api.localTrigger(SIGNAL_STRING)that only sends the signal to the local element without bubbling and without descending into child bitty elements. -
Added
el.getString(KEY)which goes up the DOM looking for a matchingdataset.KEYthat's a String. -
Added
el.getInt(KEY)which goes up the DOM looking for a matchingdataset.KEYthat's an Int. -
Added
el.getFloat(KEY)which goes up the DOM looking for a matchingdataset.KEYthat's a Float. -
Removed
bittyCatch()functionality. It's not necessary now that all events are examined by this listener without extra filtering. -
Removed adopted stylesheet to set `` to block. This saves loading duplicate stylesheets for each instance.
Using
thie.style.displayto set element to block. That way it can be changed easier by editing the style directly (e.g. by updated the style in thebittyInitfunction) -
Cleaned up tests
Version: 5.1.0-rc6
Nov. 22, 2025
- Fixed bug where Text Nodes didn't
work properly with replaceAll in
this.api.makeHTML(), etc...
Version 5.1.0-rc5
Nov. 22, 2025
-
Set up
this.api.trigger(SIGNAL)to send event that bubbles up to the document root -
Set up
this.api.forward(EVENT, SIGNAL)to send event that bubbles up to the document root -
Set up so
data-bittyidattrs are added on connectedCallback instead of at each event call. -
Set up so
data-bittyidattrs are added onthis.api.makeElement() -
Set up so
data-bittyidattrs are added onthis.api.getElement() -
Set up so
data-bittyidattrs are added onthis.api.makeHTML() -
Set up so
data-bittyidattrs are added onthis.api.getHTML() -
The net result is the
data-bittyidupdates is that anything added with thethis.api.WHATEVERthat has adata-send,data-receive, ordata-init, will have adata-bittyidadded. Anything that's added outside the API won't, event if it has one of the bittydata-*attributes.(The prior behavior was to look query for elements with
data-*attrs on every event. This was the first approach to deal with mutation observer having a race condition when trying to add them. Doing everything explicitly through the API prevents thrashing for things like moving input range sliders)
Version: 5.1.0-rc4
Nov. 21, 2025
- Refactor to process elements with
data-receivedirectly instead of adding them to a list that gets processed as a batch.
Version: 5.1.0-rc3
Nov. 20, 2025
-
Added the ability to convert single HTML Elements to text for find and replace in
makeTXT() -
Added the ability to convert arrays of HTML Elements to text for find and replace in
makeTXT() -
Added the ability to convert single Document Fragments to text for find and replace in
makeTXT() -
Added the ability to convert arrays of Document Fragments to text for find and replace in
makeTXT() -
Added the ability to convert arrays of String to text for find and replace in
makeTXT() -
Added the ability to convert single HTML Elements to text for find and replace in
makeHTML() -
Added the ability to convert arrays of HTML Elements to text for find and replace in
makeHTML() -
Added the ability to convert single Document Fragments to text for find and replace in
makeHTML() -
Added the ability to convert arrays of Document Fragments to text for find and replace in
makeHTML() -
Added the ability to convert arrays of String to text for find and replace in
makeHTML() -
Added the ability to convert single HTML Elements to text for find and replace in
makeElement() -
Added the ability to convert arrays of HTML Elements to text for find and replace in
makeElement() -
Added the ability to convert single Document Fragments to text for find and replace in
makeElement() -
Added the ability to convert arrays of Document Fragments to text for find and replace in
makeElement() -
Added the ability to convert arrays of String to text for find and replace in
makeElement() -
Added the ability to convert single HTML Elements to text for
getTXT() -
Added the ability to send HTML elements as substitutions for
getElement(). -
Added the ability to send HTML elements as substitutions for
getHTML(). -
Added the ability to send Document Fragments as substitutions for
getElement(). -
Added the ability to send Document Fragments as substitutions for
getHTML(). -
Added the ability to send Arrays of HTML elements as substitutions for
getElement(). -
Added the ability to send Arrays of HTML elements as substitutions for
getHTML(). -
Added the ability to send Arrays of Document Fragments as substitutions for
getElement(). -
Added the ability to send Arrays of Document Fragments as substitutions for
getHTML(). -
Added
data-initfor elements that fires a signal that they receive when bitty first initializes. -
Only add
data-bittyidto elements that have adata-send,data-receive,data-initattributes. -
Stopped adding
bittyidwith UUID from events. -
Removed
data-ralias fordata-receive. Better to have things be explicit and only have a single way to do it. (data-swas removed in-rc2)
Version: 5.1.0-rc2
Nov. 17, 2025
-
Removed mutation observer and querying data-receive directly to prevent race condition on events.
-
Removed
data-salias fordata-send. Better to have things be explicit and only have a single way to do it.
Version: 5.1.0-rc1
Nov. 13, 2025
-
Added
bittyReady()call that works likebittyInit()but happens afterthis.runSendFromComponent(); -
If
bittyReady()is defined as async (i.e.async bittyReady()) it's called withawait -
Added
this.api.trigger(signal)which works likethis.api.forward(null, signal). The event type isbittytrigger -
With
this.api.trigger(signal)usingthis.api.forward(event, signal)witheventset tonullis now an error. It's explicitly for forwarding an existing event. -
Added
await:signaltodata-sendandthis.api.forward(event, "await:signal"), andthis.api.trigger("await:signal")to await async methods. -
Added
makeTXT()which returns a text value from a template after running substitutions over it. -
Refactored
makeHTML()andmakeElement()to usemakeTXT() -
Added
data-salias fordata-sendanddata-ralias fordata-receive
Version 5.0.0
Nov. 7, 2025
This is a collection of renames for clarity
and to help avoid collisions with
other code that might add data- attributes.
No actual functionality is changed, but
the renames require a version number
bump.
-
Renamed
getElementstogetHTMLfor clarity. (getElementremains the same and pulls individual HTML elements vsgetHTMLwhich pulls document fragments.) -
Renamed
makeElementstomakeHTMLfor clarity. (makeElementremains the same and makes individual HTML elements vsmakeHTMLwhich makes document fragments.) -
Renamed
response.oktoresponse.valuefor clarity and to avoid confusion with things likeresponse.ok === false. (i.e.response.value === falsetakes less mental overhead) -
Renamed
data-uuidtodata-bittyidto namespace and prevent collisions with anything else the wants to usedata-uuid
Version: 4.0.0
Nov. 6, 2025
- Bumping the version number. No changes since v4.0.0-rc1.
Version: 4.0.0-rc1
Oct. 30, 2025
-
Renamed
this.api.getFragmenttothis.api.getElements(this is a breaking change so it's a major version bump) -
Renamed
this.api.makeFragmenttothis.api.makeElements(with thethis.api.getFragmentchange) -
Added
bittyCatch(event)that catches any events that don't have a.target.dataset.sendvalue. This provides a way to catch message like from.postMessage()and decided what to do with them. -
Removed the
this.api.fnset up. It's not worth the overhead compared to just using functions directly. -
Using a space instead of a
|to separate signals and class names. This mimicsclass="some things"from CSS and is easier to type. Each keys must be a set of characters without spaces so there's no need for an explicit|. -
Changed listeners to be on the window to catch things like
.postMessage(). TODO: Make sure that's cool to listen on the window instead of the document. -
Changed internal use of
event.target.dataset.forwardkey forthis.api.forwardtoevent.bitty.forwardto avoid collisions on theevent.target.dataset -
Fixed bug in
this.api.forwardwhere an event that doesn't have a.targetor.target.datasetgets overridden. -
UUID are added to events that are being forwarded if they don't already exist.
-
Migrated docs site to use variables to make it easier to upgrade versions moving forward.
Version: 3.0.0
Oct. 26, 2025
This isn't a huge jump from Version 2.x, but there are breaking changes so it gets a new number. These are quality of life improvements that make it easier to get external content while providing better errors if something goes wrong.
The details:
-
Did the following renames and additions for consistent API names for getting and adding documet fragments and elements:
-
Renamed
this.api.getHTML()tothis.api.getFragment()which pulls in an external file and returns it as a document fragment. -
Added
this.api.getElement()which pulls in an external file and retuns it as a single HTML Element (if there's more than one node at the top of the file only the first one gets returned). -
Renamed
this.api.useTemplate()tothis.api.makeFragment()which takes a string to use as a template and returns a document fragment. -
Added
this.api.makeElement()which takes a string to use as a template and returns a single HTML Element.
-
-
TODO: Added
getCSS()which pulls an external CSS file and loads it into the document as an adopted stylesheet. -
Added custom BittyError class for better error handling with
this.api.getTHINGcalls that use.fetchand for JSON parsing errors. -
When returning values from fetches return an object with either
{ ok: PAYLOAD }, or{ error: { /* details */ } }with extra data coming down in the error object like status codes for HTML errors. -
Added
connectedMoveCallback()to preventconnectedCallback()from firing if a component is moved. -
Moved everything in the init into the conditional check to see if the component makes a connection to a class. Previous a few things happend prior to the connection attempt. Moving them in prevents UUIDs from being added until a conneciton has been made. Shouldn't make any real difference. It just feels more natural.
-
Added and refined the test suite for increased coverage.
Version: 2.0.0-rc2
Oct. 21, 2025
-
Properly returned
undefinedif there's a problem pulling an external HTML from getHTML(). -
Properly returned
undefinedif there's a problem pulling an external JSON from getJSON(). -
Properly returned
undefinedif there's a problem pulling an external SVG from getSVG(). -
Properly returned
undefinedif there's a problem pulling an external TXT from getTXT().
Version: 2.0.0-rc1
Oct. 19.2025
-
Renamed
this.api.fetchJSON()tothis.api.getJSON()to match case used withJSON.stringify(), and switch fromfetchtogetprelude. -
Added substitutions param to
this.api.getJSON(url, subs=[])so all.getTHING(url, subs=[])methods have the same behavior. -
Added
options={}tothis.api.getJSON()to pass options to the fetch call. The signature isthis.api.getJSON(url, subs=[], options={}). -
Added
this.api.getHTML(url, subs=[], options={})that loads an HTML file and does find replace withsubson the initial string wheresubsis an array of arrays with the patterns to match and replace. The patterns can be strings or regex. -
Added
this.api.getSVG(url, subs=[], options={})that loads an SVG file and does find replace withsubswhich is an array of arrays with the patterns to match and replace. The patterns can be strings or regex. -
Added
this.api.getTXT(url, subs=[], options={})that returns the text content of an external file. -
Switched to array or arrays for find replace strings for
this.api.useTemplate(templateString, subs=[])and defaulting to an empty array so the argument doesn't have be sent which is consistent with the.getTHING(url, subs=[]) -
Added an adoptedStylesheet that sets the
<bitty-x-x>tag todisplay: block. -
Added
this.api.match(event, el, key=""). If a key exists, it's used to check thedatasetof theeventand theeland returns true if they match. If nokeyis provided theuuidof theeventandelare compared instead. -
Allowing whitespace around
data-sendattributes. -
Allowing whitespace around
data-receiveattributes. -
Added
.useHTML(content, subs = [])that converts a string fromcontentinto an HTML template (doing the substitutions) then returns the first element from it as an HTML element instead of a document fragment. -
Ingesting
window.bittyFunctionsfrom the page andconst functionsinside the module and providing access the them viathis.api.fn.FUNCTION() -
Ingest local
const functionsfunctions from the bitty component file that get added asthis.api.fn.FUNCTION() -
Ingested functions are bound with
.bind()so that theirthis.is the bitty component's element itself. -
Combined
this.configandthis.metadatain theconstructor().
Version: 1.3.0
Oct. 13, 2025
- Releasing v1.3.0. No changes from v1.3.0-rc1.
Version: 1.3.0-rc1
Oct. 6, 2025
-
Added
fetchJson(url)method which can be called withthis.api.fetchJson(url). Returns the data object if everything works. Otherwise, throws an error and returnsundefined. -
Added
useTemplate()to assemble a example while doing a find and replace of text
Version: 1.2.0-rc1
Oct. 6, 2025
-
When using
data-connectif the value matches a class on the window object it's used. For example:data-connect="ExampleClass"connects towindow.ExampleClass.Previously, the class had to be in a
window.bittyClassesobject (e.g.window.bittyClasses = { ExampleClass: class {} };
Version: 1.1.0-rc2
Oct. 6, 2025
- Updated console error message if no class to connect to can be found.
Version: 1.1.0-rc1
Oct. 4, 2025
-
<bitty-COMPONENT_VERSION>can be called without adata-connectattribute. When it is, it looks for awindow.BittyClasson the page and uses it if it's available. -
Removed .error() method in favor of calling
console.error()directly in order to get useful line numbers.
Version: 1.0.0
Oct. 4, 2025
-
Moved
v1.0.0-rc5tov1.0.0 -
Tag name is
<bitty-1-0>
Version: 1.0.0-rc5
Oct. 4, 2025
-
Fixed bug with events not being passed to signal processing.
Version: 1.0.0-rc4
Oct. 1, 2025
-
Renamed
<bitty-js>component tag to<bitty-MAJOR_VERSION>for semantic versioning. -
Call
bittyInit()withawaitif it's anasyncfunction. -
Moved
bittyInit()before thedata-sendcalls from the component so the module can set things up before the signals start being sent. -
Allowing
this.api.forward()to be called with anullevent (e.g.this.api.forward(null, "anotherFunction");). This is done to allow things like forwarding a signal frombittyInit()or any other function where there isn't an event to pass along. -
Fixed bug where new receivers weren't being added properly when they were child nodes of new nodes being added (and the top layer didn't have a
data-attr in it) -
Added tests for
this.api.querySelector()anddocument.querySelector() -
Update site to use variables for version numbers to make them easier to maintain instead of having them in multiple places for different displays.
-
Made
this.metadataan object and movedversioninto it (along withcopyrightandlicense)
Version: 1.0.0-rc3
Sept. 23, 2025
-
Fixed bug where
this.api.send()would update thedata-sendattribute on the original element so it no longer send the same signal. The method is now calledthis.api.forward(). -
Removed
data-watch. Any element can receive a signal from anywhere else on the page without extra overhead. The biggest negative to this approach is that you have to be a little more careful to avoid naming collisions. But, the ease of use is well worth that minor trade off. -
Added Test Suite Results Report to site for easier viewing.
-
Applying passed and failed colors to individual tests for quicker scanning.
-
Updated tests to use unique signal names to avoid collisions.
Version: 1.0.0-rc2
Sept. 19, 2025
-
data-watchis applied tobitty-jselements directly instead of individual elements. The signals are send back down the tree when one is received viadata-watch -
Refactored multiple UUID() calls to single function to save a few characters.
Version: 1.0.0-rc1
Sept. 18, 2025
Initial release candidate for version 1.0.0.
No changes since v0.4.0.
Version: 0.4.0
Sept. 17, 2025
-
Flipped module arguments from
example(el, event)toexample(event, el)since that lines up better with the order of send/receive. (i.e. theeventis what gets sent fromdata-sendand theelis the element fromdata-receive -
Remove HTML output of error message. They're nice during debug but wouldn't want them showing up in prod. Could use a
debugflag but that's more overhead than I want to add. So, message just go to the console.
Version: 0.3.0
Sept. 17, 2025
Big refactor based on experience using 0.2.0.
-
Added more generic error handing where you just send a message and it outputs to the page along with the UUID of the element that had the problem. The elements have
bitty-js-errorstyle classes on them so their display can be controlled via CSS. -
Updated to use the name
data-connectinstead ofdata-module -
The
data-connectcan point to either a module or to a class in a globalbittyClasseswindow object. -
Alternate module classes are selected by passing a
|followed by the desired class name instead of usingdata-use. (e.g.data-connect="./module.js|AltClass) -
If there's an
bittyInit()function in a module it's the first thing that gets called once bitty is loaded. -
Removed
data-call. Thedata-sendattribute is used for everything. Nothing would fire from it in prior versions if there wasn't at least one element with adata-receivewith the same name. Now it calls the function once with no element if there's no associateddata-receive -
Added test suite.
-
The biggest update is changing
data-b,data-c,data-r, anddata-stodata-batch,data-call,data-receive, anddata-send, respectively. I originally use the shorter names to reduce the text length. The increased clarity of the longer names is worth the few extra characters. -
Remove expanded error messages. They were nice, but added a bunch of size without a significant improvement.
-
The other big change is removing the leading
_and$characters from function names. They were originally put in place to create a naming convention that differentiated between functions that were hit withdata-callanddata-send. In practice, that wasn't necessary. -
Removed the
data-batchattribute. While there are some use cases where it might be nice, the extra complexity, mental overhead, and maintance aren't worth it. -
Added Mutation Observer so data-* functionality works on elements that are added after initialization.
-
Added Mutation Observer to watch for removed elements to pull them out of the mix when they get gone.
-
Split the web site page up into individual template for sections. Much nicer to work with.
-
Updated example functions to always use
(el, _event)instead of(el, _)for clarity. -
Removed inert/include/ignore from the top level components then remove them. This was originally a way to tell parent components to ignore specific calls and signals from children. After using it a bit, I don't think the complexity is worth it. Better to just name functions an signals so they don't collide.
-
Isolated default signal travel to only go down the DOM. That is, if there are nested bitty-js tags, signals from the child tags don't propagate to the parent by default. (see
data-watchfor how to send signals up and to siblings) -
Added
data-watchso parents and siblings can receive signals from their children and other siblings. With this, signals can be sent up, down, and to siblings. -
Ignore events directly from
bitty-jselements (i.e. only process events from child elements). This is done to preventdata-sendattributes onbitty-jselements from firing repeatedly when things inside the element send events (e.g. clicks). -
Renamed
scriptsdirectory tomodules. -
Moved bitty source script file under
bitty-versions/bitty-v0.3.0.jsand copying to prod at the root of the site (i.e./bitty-v0.3.0.js) so examples look cleaner. -
Renamed
data-bridgetodata-connectfor clarity. -
Renamed
this.widget.bridgetothis.module.apiinbitty-js -
Added
this.api.send(key, event)to send/forward events from inside modules. -
Added Progressive Enhancement and JavaScript Data comparison examples.
-
Added/polished a bunch of other examples.
Version: 0.2.3
June 5, 2025
Lots of error handling work in this one.
-
Moved UUID generation for the
bitty-jsand alldata-*reactive elements to the first thing inconnectedCallback()to aid in error messaging. -
Made
connectedCallback()andasyncfunction to throw loading the widget module into its own funcitoun -
Created an
#errorsprivate var to store error messages and help by ID. - Added the first few error messages
-
Added
this.error()for outputting errors. It takes two optional arguments: an ID and an Element. The ID maps to the IDs in#errors. They're used to add detail and help message to the error output.The ID defaults to
0which is an unclassified error type. The message for that ID includes a note to the developer to use an ID to classify the error. I consider it a bug if an appropriate ID doesn't exist and request an issue be open to fix it.The
this.error()method dumps thebitty-jselemnet after the message.If an element was passed to
this.error()it's dumped out as well.The error message end up being pretty long. The end up adding a bunch of lines to the source file. That's an explicit decision aimed at making bitty easier to work with.
-
Added top level
debugfunction that uses adebugsearch query param from thewindow.locationto see if it should output.Only thing I don't like about it is that it shows the function's line number instead of the line number from where it was called. Something to look into.
-
The
debugfunction takes an optional element. It dumps it to the console if one comes in. -
Renamed
data-wirestodata-bridge. Fits better and maps nicer to the.bridgecoming back in from the support class. - Set up to load the default class exported from a widget module if no other class is defined (which happens with 'data-widget')
- Moved all examples to use a default class export instead of a named class
-
Added a
data-widgetattribute to thebitty-jselements to allow using multiple classes from inside a single supporting .js module file. -
bitty-component-errorandbitty-element-errorclasses are added to the class list of elements where errors occur.
Version: 0.2.2
June 4, 2025
Added UUIDs for pending error handling. Shuffeld a bunch of stuff around to make the examples look nicer.
-
Added uuids as
data-uuidattrs to all elements with relateddata-*attributes. Added them to thebitty-jselements too. I was originally thinking I'd add the UUIDs on the elements internally (i.e.el.uuidinstead ofel.dataset.uuid).I decided on the attribute approach because it offers two benefits: 1. You can see the IDs in the Element tree view of developer consoles, and 2. You can address them with CSS to update styles based on the UUID. Both of those thing will go to supporting better error messages and bug hunting.
- Mostly content updates largely focused on detailing the opening counter example.
- Added CONTRIBUTING file.
- Added watcher script to build site when files change.
-
Refined the initial counter example to remove the text and change the
private variable to
this.numto make the examples look nicer. - Moved the Examples section directly below the initial basic functionality overview section.
- Added reminders all over the place to edit the template and instead of the output for HTML page (which would be overwritten. ask me how I know).
-
Started adding
prettier-ignorecomments to code snippets to prevent the display output from being mangled. -
Started stripping
prettier-ignorecomments from the HTML output so it doesn't show in the example - Same goes for
// deno-fmt-ignore-filein .js files - Added script to maintain the open open/closed states of the section details elements across page loads. (Having them close every time I made a change was maddening)
-
Moved all the example
.jsfiles into the site root. Not a fan of that in general, but it makes the examples look better since the path is shorter.
Version: 0.2.1
June 3, 2025
Some more wiring and some support tools for making the demo/docs site.
- Made a Hello, World example that shows basic features. (Compared to the single button press from the prior first example.)
- Showing Hello, World code as part of the example.
- Load templates automatically.
- Throttling via
.requestAnimationFrame(). -
Renamed
data-ftodata-c(i.e. "call") for clarity. -
Renamed
data-prepattribute onbitty-jstag todata-call(i.e. "call") for clarity. -
Renamed
data-initattribute onbitty-jstag todata-sendso it matchesdata-smore closely. - Made basic site builder for landing page.
-
Moved everything into
detailselements for the landing page.
Version: 0.2.0
June 3, 2025
Setting up a bunch of the basic wiring.
-
Rewrite to provide direct access to receiving elements. They are fully
accessible in the send/receive functions. (As compared to the 0.1.0
approach which required explicitly defining what would happen via an
update (e.g. update
.innerHTMLor.value). -
Renamed
data-wrapperand the targetWrapperclass todata-wiresandWires. (bitty.jsis the wrapper. TheWiresclass is how things are hooked up.). -
Added
data-callattribute parsing tobitty-jstag. It runs functions likedata-cbut does so prior to adding the event listeners to the element. -
Added
data-batchattribute processing tobitty-jstags. It operates likedata-bbut fires before event listeners are added. -
Added
data-ignoreattribute to allow components to avoid calls to the named functions. (Send signals bubble up to parents of nested components by default. This provides a way to ignore them). -
The
bitty-jselement looks for an.init()method in theWiresclass. If it finds one it calls it during the initialization process. - Passing both the element and the triggering event to the send/receive functions.
-
Moved to using
data-bexplicitly to separate block calls from individual function calls. - Order of operations is: function calls, batch calls, single send calls.
- Temporarily removed preflight check until global functionality is defined.
-
Created example of loading a template via the
.init()call back to theWiresclass. - Created example with nested components.
- Created example with parent of child components pulling data from the children to do a calculation.
- Created example showing parent ignoring send signals from children.
- Created example showing on components loading a child component via a template that becomes fully reactive.
Version: 0.1.0
June 2, 2025
Getting the project started.
-
Initial prototype.
-
<bitty-js>;wraps elements to provide them with reactive capabilities. -
Basic
data-c,data-s, anddata-rin place to call functions, send, and receive updates, respectively. -
Functionality is loaded using
data-wrapperto point to a module to load. The module must export aWrapperclass that gets loaded and used to provide functions and send/receive callbacks. -
Uses string prefixes to make determinations about how to handle data through the send/receive channels (e.g.
htmlSOMETHINGupdates.innerHTMLof an element whilevalueSOMETHINGupdates the.value). -
Defined convention for functions.
data-cmaps to functions in theWrapperclass that start with a_(underscore). Thedata-sanddata-rattributes map to functions in theWrapperclass that start with a$(dollar sign). -
Decided against using
data-c data-s and data-ron thebitty.jstags. That would involved a lot of extra overhead in parsing to differentiate between the top level element and the content it wraps. Usingdata-sendinstead as a replacement fordata-c. Others, TBD. -
Set up
data-c="batchSOMETHIGN"functionality to send a single single that gets turned into multiple signals in theWrapper. -
Defined convention of using
.batchesto look for batches. It must be a hash where the keys match the incoming request and the value is an array of functions to run. -
Defined
.bridgeto allowWrapperfunctions to access the parentbitty-jselement. -
Scoped event listeners to the
bitty-jselements. -
Set up
data-listenersattribute onbitty-jstags to override the default listeners (which areinputandclick). -
Created example that stores its own state.
-
Created example that updates an element with the same content it sent (i.e. verified feedback can be avoided).
-
Created example using
data-sendto load initial values. -
Created example that sends multiple signals.
-
Created example with multiple elements receiving the same signal.
-
Created example showing how to update global CSS variables/properties.
-
Created example showing custom event listeners.
-
Created example showing how to update CSS variables/properties scoped to the content of individual
bitty-jstags. -
Examples use parent page's CSS for styling. It confirms I'm happy with the choice to use the light DOM instead of the shadow DOM.
-
Set up initial preflight check to ensure functions are in place.