On 2018-10-17 18:30, Richard Kimberly Heck wrote:
On 10/17/18 12:02 PM, Daniel wrote:
On 17/10/2018 17:11, Richard Kimberly Heck wrote:

[...]

I've fixed all this in master. It'll go to 2.3.3, if all is well.

Riki

Thanks! I am looking forward to what filter you opted for.

Just consecutive letters, anywhere in the string. Probably I should
update it a bit to allow the user to enter regular expressions that
won't be messed with. So then one could enter e.g. "^sec" to get quickly
to "section". The question is how exactly to do this. I was thinking to
do it vi-like, and have "/" activate "regex mode", as we might put it.
So you'd enter "/^sec" to get quickly to "section". But maybe that's
overthinking it, and we could just have some character mean: Only search
at the start of the string. So then maybe "/sec" works, or "^sec". Of
course, that would fail if someone made a layout whose name actually
began with such a character. But then maybe they deserve what they get.

Seems to me that consecutive letters is good enough.

Right now one can see what one types from the underlined letters.

Actually, this is already a bit hard to see and I would suggest to do something less subtle, like using bold font for the highlight rather than underline. I think that would also look cool.

However, if you want to go further and allow for regex, then maybe the current drop down list style should be changed as well since the typed in regex could not be visualized that way. So, I would suggest a combo box, i.e. a drop-down list with an editable one-line textbox. When typing, the drop down list opens and shows the matches. There may also be a couple of follow up obstacles. For example, one would then also have to find a way to deal with selection. Is there a way to preselect an item in the list (that is then selected by pressing return or so) without overwriting what has been typed into the text box?

Apart from this, there is actually yet another behavior of the layout filter that is confusing or "weird" currently. I am not fully sure what is going on. For example, in plain standard article,

1. Select the Standard layout
2. Filter the layout list for "sub"

Result: "Subsection" is selected

Next,

1. Select the Part layout
2. Filter the layout list again for "sub"

Result: "Subsection*" is selected

I don't see a reason why this behavior is helpful. (But as I said, I don't get the structure at all here.) I think it would be better to select the first match from the top of the list, i.e. independent of what is currently selected. So one would always get the same result when filtering (as long as no new layouts are added).

For completeness: Alternatively, the first item after the currently selected item should be selected, so that, for example, when Part* is selected Subsection* would be selected rather than Subsection. But I don't think the benefits of this approach are worth the costs (not only implementation wise but usage wise). And notice that this is also not what is going on currently in LyX.

Daniel

Reply via email to