Changelog
Find here all changes tracked while developing SPAish.
(Maybe) Future Version
- [ ] tab accordion restore
- [ ] sidebar/menu toggle restore
- [ ] A copy-button to copy a headline's URL
- [ ] make
spaish.section.addAnchors()
also copy the URL to the clipboard? maybe show a separate icon when hovering the anchor icon? - [ ] copy-to-clipboard function
- [ ] speak-button to read the text of a section
- [ ] make docs nicer for mobile:
<code>
and<table>
overflow, so they are scrollable - [ ] syntax highlighting for code blocks
v2.1.0
- [x] add
spaish.details.scrollOnToggle()
to scroll the<details>
into view when toggled
v2.0.0 and v.2.0.1
- [x] docs: add a demo about "spaish.scroll.restore()" in the docs
- [x] scroll: use
scrollend
event when available to update the scroll position in the session store, usingbeforeunload
otherwise - [x] introduced ADRs (mostly relevant for development or if you want to understand the decisions made)
- [x] add playwright tests
- [x] make docs work on mobile
spaish.section.*()
- [x] 🐛 multiple headlines with the same
textContent
, e.g., "Parameters" create the sameid="section-parameters"
, so the anchor is not unique, added a number to theid
to make it unique, e.g.,id="section-parameters-abc"
andid="section-parameters-def"
spaish.scroll.restore()
- [x] API change, now call it with an object like
spaish.scroll.restore({key, otherNodes})
, to stay consistent with the other functions
spaish.details.reopen()
🚨
- [x] parameters changed to an object with
key
andnodes
properties,spaish.details.reopen({key, nodes: string[] | NodeList})
, this allows for any param to be optional - [x] the
nodes
parameter can now be of typenodes: string[] | NodeList
, it allows for using a list of string or a result fromdocument.querySelectorAll()
- [x] when
open
attribute is set in the HTML, it should be opened initially but the "update" should come from the storage, so user's changes are respected - [x]
spaish.details.reopen()
without any parameters finds all<details>
elements on the page and restores their state, using thelocation.pathname
as the page key - [x] added ADR-1 describing the
selectors
parameter ofspaish.details.reopen()
- [x] docs
spaish.details.autoOpen()
🆕
- [x] new fn
autoOpen()
– opens<details>
when current page linked inside, useful inside<nav>
s when opened via link - [x] without parameters, it opens all
<details>
elements on the page that contain links to the current page - [x] docs
v1.0.5
- [x] add
spaish.section.addAnchors()
which addsid
attribute if needed and a visual anchor icon to the headings of a section - [x] added documentation for all functionality, see the docs
- [x] put the docs online at https://picossg.dev/tools/spaish/
v1.0.4
- [x] 1.0.3 did just not work, made it work
v1.0.3
- [x] namespace all functions to
spaish.{details,colorScheme,scroll}
, tidying up
v1.0.2
- [x] theme (re)store
v1.0.0
- [x] details-reopen
- [x] scroll-restore