imp: web: preserve sidebar position during navigation#2644
Open
acinader wants to merge 1 commit into
Open
Conversation
Author
|
I have been using it for a few weeks now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an exploratory draft PR for hledger 2.x
main.When reviewing a large chart of accounts in hledger-web, clicking account links currently reloads the full page and resets the account sidebar position. This patch keeps the existing server-rendered links and progressively enhances same-origin
/journaland/registernavigation when JavaScript is available:hrefs for no-JS / failed-JS fallback behavior#main-contentscrollTophistory.pushState/popstatefor URLs and browser back/forwardI also made
#sidebar-menua bounded vertical scroll container.Related context:
Checks run locally:
node -c hledger-web/static/hledger.jsgit diff --checkcabal v2-build hledger-web --enable-tests --allow-newer --constraint='persistent >=2.17'cabal v2-test hledger-web:apptest --allow-newer --constraint='persistent >=2.17'The Cabal build/test needed the
persistent >=2.17constraint because this machine only has GHC 9.14.1, and the default plan selectedpersistent-2.11.0.4, which did not compile with this toolchain. With the local dependency workaround, hledger-web built and its test suite passed: 4 examples, 0 failures.Manual smoke check:
hledger.jsandhledger.csswere served.Still worth checking before considering this ready:
--base-urlAI assistance disclosure:
This patch and PR text were prepared with OpenAI/Codex assistance. Approximate usage: several interactive Codex turns for research, patch drafting/refinement, local testing, and PR preparation. I understand the project currently prefers not to accept OpenAI-assisted work; I am opening this as a draft for review/discussion and to learn whether this direction is useful.