-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
Leverage actions-on-current-suggestion
as a list.
#2632
Conversation
(lambda-command scroll-to-selected-hint* (suggestion) | ||
"Highlight and scroll to hint." | ||
(highlight-selected-hint :element suggestion :scroll t)) | ||
(lambda-command copy-selected-hint* (suggestion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it actually make sense as a selection action?
A crazy idea: make both selection-actions
and return-actions
accessible in the return-marks-action
and set-selection-action
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're referring to copy-selected-hint*
right? Actually I had this idea written down and I know I took it from you! It could very well be that I misunderstood you somehow. Note that right now it's not very useful since the URL might be relative (e.g. #potatoes
), but that's an issue orthogonal to this PR...
A crazy idea: make both selection-actions and return-actions accessible in the return-marks-action and set-selection-action?
I think I understand what you mean and I agree. The only obstacle is that return-actions
run over marks
whereas selection-actions
run over a single element (the suggestion
).
Actions should be defined in such a way that it could be used in both cases. If we look at the particular of hint-mode
, then we could use for instance focus*
in whatever context.
(lambda (suggestion) | ||
(highlight-selected-hint :element suggestion | ||
:scroll nil)))) | ||
(list (unless (fit-to-prompt-p (find-submode 'hint-mode)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are NIL values deleted from the selection-actions
list? Maybe they should be...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point! I think they should. Should have been part of #2555...
Looks reasonable to me :) |
Let's postpone this for later, since there are more pressing issues at the moment. |
selection-actions
as a list.actions-on-current-suggestion
as a list.
Closing this PR as there isn't much interest in these features as of now. |
Description
After #2555, we can now think about how this new feature translates into something useful for users!
I'd like to collect ideas from you on this topic. @Ambrevar @jmercouris @aartaka
I've added a dumb example with respect to
hint-mode
. Whenactions-on-current-suggestion
is a list, you can set the default action that runs when the current suggestions changes.Example:
follow-hint
and notice that issuingselect-next
andselect-previous
runs the default action on selection change (highlighting the hint on the web page's buffer)set-selection-action
and set for instancescroll-to-selected-hint
Checklist:
Everything in this checklist is required for each PR. Please do not approve a PR that does not have all of these items.
cd /path/to/nyxt/checkout git submodule add https://gitlab.common-lisp.net/nyxt/py-configparser _build/py-configparser
:documentation
s written in the aforementioned style. (It's OK to skip the docstring for really trivial parts.)changelog.lisp
with my changes if it's anything user-facing (new features, important bug fix, compatibility breakage).migration.lisp
entry for all compatibility-breaking changes.