ex_doc
ex_doc copied to clipboard
Feature to store sidebare state across reloads
Is it desired to store the sidebar state in ~~localStorage
or~~ sessionStorage
?
For me if I go into my docs "reading mode". Means I close the sidebar and read page by page using the "Next Page →" link on the bottom of each page. It is annoying if on every next page the sidebar pops up "opened" again.
I could contribute this feature when the dev environment is ready to be used on latest node again. I'm to lazy to install old node version for small contributions.
This is tricky because it is stored Per Domain and also we don’t want necessarily for a closed side bar to stick when you come back to hexdocs a week later. So my thought at the moment is no. :)
I understand. But if we use sessionStorage
it would only be valid for your Browser tab session.
Means sidebar would only be still closed if you use the same Browser tab a week later (just hitting the peoples never closing tabs - and finding them a week later again ;).
Ah, so that works for me!
Fine. Then keep it open.
I could contribute this feature when the dev environment is ready to be used on latest node again.
Btw, a PR that bumps to latest node is welcome (i.e. a PR that makes it work for you). Otherwise no one might submit this feature.
I know, but first I've tried to get rid of less
and switch to esbuild
... Then my time ended.
The setup here has grown quite some complexity.
I think it is easier first to just update to latest node, instead of doing a full migration. :)
So I've really tried now to update ex_doc
to be compatible with latest Node.
But I'm sorry I've not managed to be successful.
Doing an immediate update of webpack 4 to webpack 5 to make it work (for now) seems to much energy for now for me.
I've spent bit of time again. Downgraded Node to LTS v16 on my machine - no success. So it's either that the setup does not work on Windows or does not work with latest Node v16 either.
Then I've tried to ditch webpack with esbuild - no success. The handlebars plubin I've found for esbuild doesn't seem to work.
This is not any critic. This is just a public log what I've already tried.
I know, but first I've tried to get rid of
less
and switch toesbuild
... Then my time ended. The setup here has grown quite some complexity.
Relevant to this, I've started to work my way through the Less files, converting to CSS, and hope to subsequently have a go at moving to esbuild. (#1542)