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

Scroller: navbar height can change #240

Open
10 of 19 tasks
nexushoratio opened this issue Feb 3, 2024 · 1 comment
Open
10 of 19 tasks

Scroller: navbar height can change #240

nexushoratio opened this issue Feb 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working linkedin-tool For the LinkedIn Tool userscript

Comments

@nexushoratio
Copy link
Owner

nexushoratio commented Feb 3, 2024

When the page resizes, the text "For Business", can wrap, increasing the height of the navbar, throwing everything off.

Bah.

  • Monitor for size changes
  • Add Dispatcher for this
  • Allow Scroller to take changes
  • Implement listeners in a Service
    • Rename ScrollerService
    • Rename anything navBar to navbar for consistency
    • Get details so access to new navbarDispatcher and globals
    • LinkedIn should expose #globals.
    • Implement Scroller: navbar height can change #240 (comment)
      • Use optional chaining with accessing this.#scroller?.activate()
      • Have service take Scroller via setter, empty sets to null
      • Migrate existing primaries to use new setter instead of argument
      • Remove param from ctor
      • Create services for all secondaries
      • Have existing create/destroy code paths update secondary services (what about autoActivate?)
    • Update margins on activate (include toolbar if present as replacement for LinkedInToolbarService?)
    • Add/remove listeners to the dispatcher
    • Can toolbar change size?
  • Retire LinkedIn.navbarScrollerFixup()
@nexushoratio nexushoratio added bug Something isn't working linkedin-tool For the LinkedIn Tool userscript labels Feb 3, 2024
@nexushoratio nexushoratio self-assigned this Feb 3, 2024
@nexushoratio nexushoratio changed the title navbar height can change Scroller: navbar height can change Feb 7, 2024
nexushoratio pushed a commit that referenced this issue Feb 8, 2024
nexushoratio pushed a commit that referenced this issue Feb 8, 2024
First step in plumbing through detecting changes.

Issue #240.

␄
nexushoratio pushed a commit that referenced this issue Feb 14, 2024
We now know that the values sometimes need to change after being initialized.

Issue #240.

␄
nexushoratio pushed a commit that referenced this issue Feb 16, 2024
nexushoratio pushed a commit that referenced this issue Feb 16, 2024
@nexushoratio
Copy link
Owner Author

nexushoratio commented Feb 17, 2024

Rather than make yet another service, it is probably appropriate to roll this into ScrollerService itself. And while doing so, cover what LinkedInToolbarService is doing as well.

This does leave secondary Scrollers in the wind, however.

We can worry about that detail later, but to capture some initial thoughts:

  • Always have the secondaries present, and allow it to update base on the fly rather than destroy. Though that would require enhancing to allow a null base, it would definitely simplify the various getters.
  • Wrap secondaries with the service anyway, just for the listener parts. Either enhance the the service to update the associated scroller, so we can use addService(), or turn the service on/off ourselves. This seems like the best option.

nexushoratio pushed a commit that referenced this issue Feb 18, 2024
Alas, it will no longer be generic.

Issue #240.

␄
nexushoratio pushed a commit that referenced this issue Feb 23, 2024
nexushoratio pushed a commit that referenced this issue Feb 25, 2024
nexushoratio pushed a commit that referenced this issue Feb 26, 2024
Upcoming changing will make this field optional (e.g., secondary `Scroller`s).

Issue #240.

␄
nexushoratio pushed a commit that referenced this issue Feb 26, 2024
nexushoratio pushed a commit that referenced this issue Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linkedin-tool For the LinkedIn Tool userscript
Projects
None yet
Development

No branches or pull requests

1 participant