Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display flex for native scrolling #328

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

display flex for native scrolling #328

wants to merge 3 commits into from

Conversation

paul90
Copy link
Member

@paul90 paul90 commented Nov 3, 2024

Replacing #327, which used the coffeescript, now legacy, branch as a starting point.

(cherry picked from commit fe55e82)

(cherry picked from commit ef11b67)
(cherry picked from commit 8a6ef76)
(cherry picked from commit fe55e82)
@paul90
Copy link
Member Author

paul90 commented Nov 3, 2024

Comments from #327

#327 (comment) (@WardCunningham )

@baldurbjarnason has guided me through this modest improvement styling the lineup using flex for native scrolling. This is expected to work better on mobile. (Test this before merging.)

Note: this and related work is more about investing in the longevity of our codebase than adding mobile as a feature. I once referred to this as "chronological scaling" before we had a clear notion of what that would require. post

#327 (comment) (@paul90)

Only thing I've spotted so far is that the horizontal scrollbar on the lineup needs hiding, and page being opened no longer is scrolled into view. No auto scrolling the lineup to bring the new page into view is most likely a fault in the JS conversion!, looks to be something jQuery related that get broken here.

#327 (comment) (@WardCunningham)

@paul90 recommended this simple fix, bfa2e8b, and adds, "if we were not moving away from browserify it could be fixed by adding browserify-optional into the mix."

Rendering on older iPad.
IMG_0053

Rendered on old iPhone.
IMG_9404

#327 (comment) (@WardCunningham)

Direct positioning within the lineup happens when a specific page is made active. This is handled by code in active.js. Changes here have thrown off these calculations.

Various places in the code will expose a particular page and make it active with idiomatic code that looks like:

active.set($('.page').last())

We see calls like this in these modules:

  • factory.js -- once
  • link.js -- twice
  • state.js -- once
  • search.js -- unused, now obsolete by pop-up?
  • legacy.js -- seven times, in various global event handlers

@paul90
Copy link
Member Author

paul90 commented Nov 9, 2024

Do we want to suppress the horizontal scrollbar on the lineup? Or is that needed for mobile/tablet.

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.

2 participants