* bug#43227: EWW ignores 'multiple' attribute of 'select' @ 2020-09-05 17:23 Nicolas Graner 2020-09-06 23:05 ` Lars Ingebrigtsen 0 siblings, 1 reply; 5+ messages in thread From: Nicolas Graner @ 2020-09-05 17:23 UTC (permalink / raw) To: 43227 EWW renders <select multiple> elements like <select>, not allowing multiple selections. A multiple select should probably be rendered similar to a set of checkboxes. Nicolas ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43227: EWW ignores 'multiple' attribute of 'select' 2020-09-05 17:23 bug#43227: EWW ignores 'multiple' attribute of 'select' Nicolas Graner @ 2020-09-06 23:05 ` Lars Ingebrigtsen 2020-09-07 8:51 ` Nicolas Graner 0 siblings, 1 reply; 5+ messages in thread From: Lars Ingebrigtsen @ 2020-09-06 23:05 UTC (permalink / raw) To: Nicolas Graner; +Cc: 43227 Nicolas Graner <nicolas.graner@universite-paris-saclay.fr> writes: > EWW renders <select multiple> elements like <select>, not allowing > multiple selections. > > A multiple select should probably be rendered similar to a set of > checkboxes. In the context of the new drop-down menu... Perhaps they could just be rendered as [ ] Val1 [ ] Val2 and if you choose one of them, then we go to [x] Val1 [ ] Val2 (and close the menu), and then you have to open it again to click on: [x] Val1 [x] Val2 Because I don't know a way to make the menu stay up after clicking on it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43227: EWW ignores 'multiple' attribute of 'select' 2020-09-06 23:05 ` Lars Ingebrigtsen @ 2020-09-07 8:51 ` Nicolas Graner 2020-09-07 10:17 ` Lars Ingebrigtsen 0 siblings, 1 reply; 5+ messages in thread From: Nicolas Graner @ 2020-09-07 8:51 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: 43227 Lars Ingebrigtsen <larsi@gnus.org> wrote on 2020-09-07 01:05: > In the context of the new drop-down menu... > > Perhaps they could just be rendered as > > [ ] Val1 > [ ] Val2 > > and if you choose one of them, then we go to > > [x] Val1 > [ ] Val2 > > (and close the menu), and then you have to open it again to click on: > > [x] Val1 > [x] Val2 This looks really awkward. Reopening the menu for each item you want to select or deselect is inefficient and counter-intuitive. Besides, it leaves open the question of how to render a multiple select in the eww buffer, showing which options are selected. > Because I don't know a way to make the menu stay up after clicking on it. Pop-up menus are probably not the right tool to implement multiple selects. There is a reason why graphical browsers offer quite different interfaces to single and multiple selects. I stand by my suggestion that a multiple select should look similar to a list of checkboxes. Maybe it could actually be converted to checkboxes at the DOM level, before rendering, and then let the normal checkbox code do the job? Nicolas ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43227: EWW ignores 'multiple' attribute of 'select' 2020-09-07 8:51 ` Nicolas Graner @ 2020-09-07 10:17 ` Lars Ingebrigtsen 2020-09-07 16:05 ` Drew Adams 0 siblings, 1 reply; 5+ messages in thread From: Lars Ingebrigtsen @ 2020-09-07 10:17 UTC (permalink / raw) To: Nicolas Graner; +Cc: 43227 [-- Attachment #1: Type: text/plain, Size: 542 bytes --] Nicolas Graner <nicolas.graner@universite-paris-saclay.fr> writes: > I stand by my suggestion that a multiple select should look similar to a > list of checkboxes. Maybe it could actually be converted to checkboxes > at the DOM level, before rendering, and then let the normal checkbox > code do the job? I think it would be kinda surprising to render a <select multiple> as a series of checkboxes: You expect a <select> to be kinda small even if the number of possible choices is large. I wondered how Chromium rendered those, and it's: [-- Attachment #2: Type: image/png, Size: 6323 bytes --] [-- Attachment #3: Type: text/plain, Size: 346 bytes --] (Multiple to the left and singular to the right.) So it's a widget that's about four lines high and with a scroll bar for further entries... Well, I didn't know about popup-menu -- does Emacs have support for this kind of thing, too? :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43227: EWW ignores 'multiple' attribute of 'select' 2020-09-07 10:17 ` Lars Ingebrigtsen @ 2020-09-07 16:05 ` Drew Adams 0 siblings, 0 replies; 5+ messages in thread From: Drew Adams @ 2020-09-07 16:05 UTC (permalink / raw) To: Lars Ingebrigtsen, Nicolas Graner; +Cc: 43227 > > I stand by my suggestion that a multiple select should look similar to a > > list of checkboxes. Maybe it could actually be converted to checkboxes > > at the DOM level, before rendering, and then let the normal checkbox > > code do the job? > > I think it would be kinda surprising to render a <select multiple> as a > series of checkboxes: You expect a <select> to be kinda small even if > the number of possible choices is large. This is from the Icicles doc, but it's about vanilla Emacs: Any Emacs command could be defined to use an input loop, asking for file names until you do something to signal that you're done inputting. It could provide for file-name completion by calling 'read-file-name' to read your input. (The same applies to any completion, of course, not just file names.) As food for thought about selecting multiple choices, here are two Icicles features. The second probably corresponds more directly with what you're talking about. 1. Choose multiple completion candidates from the minibuffer. https://www.emacswiki.org/emacs/Icicles_-_Multi-Commands Continuation of the text quoted above, about an input loop: * But what if you could also filter the domain of discourse on the fly, so that the candidate files were only those matching a regular expression (regexp) that you typed? Then, the command definition would need to provide for that behavior too. * And what if you could then take the complement of that set of candidate file names, with respect to the complete set of files in the directory? Or subtract (exclude) some set of file names from the set of matching names, to get the set of possible choices? * And what if the set of potential candidates at each step (regexp match, complement, set difference) could also be displayed in a multiple-choice menu? IOW, integrate multiple selection during completion with other completion enhancements. Let a function such as `completing-read' let you choose multiple candidates, and change the set of completion matches on the fly, so that your multiple choices can correspond to different kinds of matches. 2. Mark multiple completion candidates in *Completions*, to select them for subsequent actions. The difference here is that the selected candidates are distinguished in *Completions*. And they can be reused in subsequent commands. They can even be persisted and reused in a later Emacs session. Because they are both distinguished visually ("marked") and reusable later, Icicles calls this "saving" instead of "marking". The marking is shown in *Completions*, but you can do it without switching to that window. https://www.emacswiki.org/emacs/Icicles_-_Nutshell_View#ChooseBeforeYouAct https://www.emacswiki.org/emacs/Icicles_-_Candidate_Sets From that page (about marking "saving" a set of candidates: Matching, saving, and retrieving candidates is a powerful way to interact with completion. One important use is to prepare a list of candidates on which to act, and then act on them all at once using `C-!'. This is a good way to proceed when you want to double-check what to act on, before you actually act. This is the same idea behind marking files in Dired and then operating on the marked files, using 'x'. It corresponds to what is represented in some user interfaces by filling out a checklist followed by clicking 'OK'. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-07 16:05 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-09-05 17:23 bug#43227: EWW ignores 'multiple' attribute of 'select' Nicolas Graner 2020-09-06 23:05 ` Lars Ingebrigtsen 2020-09-07 8:51 ` Nicolas Graner 2020-09-07 10:17 ` Lars Ingebrigtsen 2020-09-07 16:05 ` Drew Adams
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).