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

Factor hotkey handling out of SPA. #130

Open
1 of 10 tasks
Tracked by #106 ...
nexushoratio opened this issue Sep 13, 2023 · 0 comments
Open
1 of 10 tasks
Tracked by #106 ...

Factor hotkey handling out of SPA. #130

nexushoratio opened this issue Sep 13, 2023 · 0 comments
Labels
cleanup This doesn't seem right, refactor, etc library For libraries linkedin-tool For the LinkedIn Tool userscript

Comments

@nexushoratio
Copy link
Owner

nexushoratio commented Sep 13, 2023

Let's have SPA just focus on selecting the Page.

Page would also lose hotkey knowledge, and go into a details support class similar to SPADetails. LinkedIn might be a place to put some info, but really, I would expect hotkeys to be a common feature of at least anything I write, so should be separate. But come up with some sort of API for SPA to use to interact with registered components. Right now that would only be say, hot key and click-on support. But maybe others in the future.

Pages should still register an element to watch for while the page rebuilds. Then call registered features like turning hotkeys on/off, click handling, anything else that currently goes into _refresh.

Also this means that everything for building the info view should be factored out as well and controlled by SPADetails subclasses.

@nexushoratio nexushoratio added cleanup This doesn't seem right, refactor, etc linkedin-tool For the LinkedIn Tool userscript labels Sep 13, 2023
@nexushoratio nexushoratio removed the linkedin-tool For the LinkedIn Tool userscript label Sep 24, 2023
@nexushoratio nexushoratio changed the title Factor hotkey handling and click-on out of SPA. Factor hotkey handling out of SPA. Oct 5, 2023
@nexushoratio nexushoratio self-assigned this Oct 5, 2023
nexushoratio pushed a commit that referenced this issue Oct 6, 2023
nexushoratio pushed a commit that referenced this issue Oct 7, 2023
At least those for Page subclasses, and a few others.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
This way the caller can track it.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
With #private variables, we need to move away from having code in the base
class that can use overrides in the subclasses.  Instead, we will need to pass
them in through the constructor or other mechanisms.  Here, we are adding some
items similar to what we already use, but can do differently.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
it is a race between two bugs to see which will get fixed first!

Issues #130, #150.

␄
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
This will allow us to move eventually remove the `start()` method.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 8, 2023
nexushoratio pushed a commit that referenced this issue Oct 9, 2023
nexushoratio pushed a commit that referenced this issue Oct 9, 2023
nexushoratio pushed a commit that referenced this issue Oct 9, 2023
nexushoratio pushed a commit that referenced this issue Oct 9, 2023
We are going to remove `start()` from `Page` soon, so it makes no sense to
have a new use of it.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 10, 2023
Not yet fully enabled, though does listen for 'focus' events and can handle
arbitrary conditions like 'inDialog'.

Right now, handling of these kinds of events is global.

This implementation will also allow each `Page` to register more than one set
of shortcuts.  In theory, shortcuts common to different views could be shared,
though may be difficult depending on how much information they would need to
share between them.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 10, 2023
I have wanted this so many times!

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 10, 2023
No-op as `VMKeyboardService` does not yet actively enable keys.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 12, 2023
nexushoratio pushed a commit that referenced this issue Oct 12, 2023
nexushoratio pushed a commit that referenced this issue Oct 19, 2023
nexushoratio pushed a commit that referenced this issue Oct 19, 2023
nexushoratio pushed a commit that referenced this issue Oct 24, 2023
nexushoratio pushed a commit that referenced this issue Oct 24, 2023
Also populated it with a couple of easy to handle tabs.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 25, 2023
The function was getting too long.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 25, 2023
nexushoratio pushed a commit that referenced this issue Oct 25, 2023
nexushoratio pushed a commit that referenced this issue Oct 25, 2023
nexushoratio pushed a commit that referenced this issue Oct 25, 2023
nexushoratio pushed a commit that referenced this issue Oct 25, 2023
Expose the list via a getter and update it when instance are removed.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 26, 2023
nexushoratio pushed a commit that referenced this issue Oct 27, 2023
nexushoratio pushed a commit that referenced this issue Oct 27, 2023
nexushoratio pushed a commit that referenced this issue Oct 27, 2023
Does not yet actually build anything, just logs.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 28, 2023
Other rendering widgets can also use this base, but will require a bit more
work.  This is essentially a distilaltion of previous implementations.

More imporantly, this can be used for the forthcoming accordion widget.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 28, 2023
nexushoratio pushed a commit that referenced this issue Oct 28, 2023
This will make it easier for a tab to be another widget.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 28, 2023
nexushoratio pushed a commit that referenced this issue Oct 28, 2023
Does not do much yet, just a base to build on.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 28, 2023
Very raw, no styling yet.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 28, 2023
They still do nothing, but it will at least allow the new info view to have
content.

Issue #130.

␄
nexushoratio pushed a commit that referenced this issue Oct 29, 2023
Both currently use `VM.shortcut` facilities, so it makes sense to put them
together.

Issue #130.

␄
@nexushoratio nexushoratio added linkedin-tool For the LinkedIn Tool userscript library For libraries labels Oct 30, 2023
@nexushoratio nexushoratio removed their assignment Oct 30, 2023
nexushoratio pushed a commit that referenced this issue Nov 4, 2023
Use new *simpleParseWords()* function and retire similar static `SPA` method.

Issues #130, #180.

␄
nexushoratio pushed a commit that referenced this issue Nov 7, 2023
No longer needed as we have real ones to test with.

Issue #130.

␄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup This doesn't seem right, refactor, etc library For libraries linkedin-tool For the LinkedIn Tool userscript
Projects
None yet
Development

No branches or pull requests

1 participant