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

I wonder if the invokers proposal could take the place of the scroll buttons proposal? #2

Open
mfreed7 opened this issue Jan 29, 2024 · 3 comments

Comments

@mfreed7
Copy link

mfreed7 commented Jan 29, 2024

Please see the Invokers Proposal for details. But that API proposal allows any button to "target" any other element, and provide an action to take on that target. It seems like scroll up/down might make a good use case for this API? As in

<div id=scroller> Content </div>
<button id=scroll_up invoketarget=scroller invokeaction="scroll up"> UP </button>

@keithamus

@flackr
Copy link
Owner

flackr commented Jan 30, 2024

Thanks for the suggestion. That could certainly work. I'd say the dedicated pseudo element has two main advantages over this:

  • the HTML can be just the content, e.g. the carousel HTML in the demo is effectively a plain list of items.
  • The linkage to the scroller is automatic, so the same pattern can be shared by multiple scrollers without needing unique scroller ids. E.g. it is common for a single vertically scrolling page to have multiple horizontal caroursels.

That said, invokers could still work well if we decide not to pursue dedicated pseudo elements, or even be the underlying explanation for how these buttons work.

@mfreed7
Copy link
Author

mfreed7 commented Jan 30, 2024

Hmm, both of your advantages are indeed compelling. I'm inclined to agree! Feel free to close this and just keep Invokers in mind, should the current proposal fall apart. Thanks!

@flackr
Copy link
Owner

flackr commented Apr 5, 2024

I suspect as with the scroll marker issue that there will be value in having this as an explanation for what the generated pseudo-elements do internally and how you could turn arbitrary elements into scroll buttons.

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

No branches or pull requests

2 participants