Re: GUI changes for inserting citations in 2.2x

2016-09-18 Thread Guillaume Munch

Le 18/09/2016 à 11:33, Enrico Forestieri a écrit :

On Sat, Sep 17, 2016 at 10:35:15PM +0100, g...@lyx.org wrote:


In general the data manipulated by LyX is very small. In my experience
LyX is sometimes slow not because of the size of the data but because of
bad design in certain places (e.g. constant repaintings of whole insets,
constant global updates of macros, repeated calls to costly functions
(0a8b7f6a)), or algorithmic oversights (e.g. quadratic or worse amount
of calls to copy constructors and such, see c51ebd9b, b2b87330,
89175ee0). As a rule of thumb one should more be on the lookout for
these. Of course this remark is not sufficient to rule-out your concern.


Dear Guillaume, let me raise some points on the way you (but not only you)
distribute sentences. LyX is a very big project that evolves with time.
Not everyone knows all of its intricacies. When something new is
introduced, at that time the design maybe Ok, but if something else
is changed, it can make the original design bad. So, the design may not
be bad in absolute and, for example, telling that macros are a bad
design is not fair. I am not the one who updated them the way they are
now, and I was many time upset by some aspects and criticized it. But I
don't even think to say that it was a bad design (on the contrary), and
if I were the author I would be upset by this sentence. Scorning the
work of someone else is neither elegant nor motivating.



Hi Enrico,

You are entirely right. I did not mean that it was bad design at the
start. I should have made that clearer. (Likewise for the other issues I
mentioned.)

Guillaume



Re: GUI changes for inserting citations in 2.2x

2016-09-18 Thread Enrico Forestieri
On Sat, Sep 17, 2016 at 10:35:15PM +0100, g...@lyx.org wrote:
> 
> In general the data manipulated by LyX is very small. In my experience
> LyX is sometimes slow not because of the size of the data but because of
> bad design in certain places (e.g. constant repaintings of whole insets,
> constant global updates of macros, repeated calls to costly functions
> (0a8b7f6a)), or algorithmic oversights (e.g. quadratic or worse amount
> of calls to copy constructors and such, see c51ebd9b, b2b87330,
> 89175ee0). As a rule of thumb one should more be on the lookout for
> these. Of course this remark is not sufficient to rule-out your concern.

Dear Guillaume, let me raise some points on the way you (but not only you)
distribute sentences. LyX is a very big project that evolves with time.
Not everyone knows all of its intricacies. When something new is
introduced, at that time the design maybe Ok, but if something else
is changed, it can make the original design bad. So, the design may not
be bad in absolute and, for example, telling that macros are a bad
design is not fair. I am not the one who updated them the way they are
now, and I was many time upset by some aspects and criticized it. But I
don't even think to say that it was a bad design (on the contrary), and
if I were the author I would be upset by this sentence. Scorning the
work of someone else is neither elegant nor motivating.

Sincerely yours

-- 
Enrico


Re: GUI changes for inserting citations in 2.2x

2016-09-18 Thread Jürgen Spitzmüller
Am Samstag, den 17.09.2016, 22:35 +0100 schrieb g...@lyx.org:
> Thank you for your recent improvements regarding this one. I do not
> have
> much experience with this dialog since it is possible to insert
> cross-references only by using copy-paste.
> 
> Two things I noticed:
> * The "clear" button does not work in the GuiRef filter.
> * LyX 2.3 requires qt ≥ 4.8 so the preprocessor directives are not
> necessary.

Thanks, done.

> > Having said that, I am completely fine with making "search on fly"
> opt-
> > out.
> >
> 
> This is an alternative I had in mind in the absence of a consensus,
> so
> since you are fine with it I might commit such a patch directly.

Done.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-17 Thread gm

Le 17/09/2016 à 08:43, Jürgen Spitzmüller a écrit :


Consistent with which search field?


I had the outliner and PanelStack in mind.


The one in the PanelStack that
greys out items that do not match the filter instead of hiding them (do
you want to do this here as well?)?


Indeed, I would find it clearer and more consistent if PanelStack hide
the entries instead of greying them. (Unless a peculiarity of PanelStack
escapes me, making the current behaviour necessary.)


The one in the Refs dialog that is
below the browser widget and does not provide regex


Thank you for your recent improvements regarding this one. I do not have
much experience with this dialog since it is possible to insert
cross-references only by using copy-paste.

Two things I noticed:
* The "clear" button does not work in the GuiRef filter.
* LyX 2.3 requires qt ≥ 4.8 so the preprocessor directives are not
necessary.


(the next candidatefor dropping, then)?


I have no secret plan to drop the regex option.



And how does your proposal to bind the Enter key to jumping widgets add
consistency?


My suggestion makes sense as well for the other search fields that I 
mentioned.





You are a developer as well (and we both are users), and what you
propose is inevitably based on your tastes and habits. So please do not
play out "subjective" and "objective" reasons.


I did not mean to exclude myself from the description, of course.
Also, unless a developer with a training in UX starts contributing, the
best we can do is try to imitate what other applications do. In
particular habits deriving from other applications are more relevant, to
a certain degree.



(And believe it or not,
I am also able to abstract from my own narrow POV; I can follow your
arguments, but still I think the current UI makes sense).


It does make sense. To me it already did with the QToolBox, but
what we have now is even better, on a much larger scale than the
small details I have been discussing. Thanks!





The proposal to assign "Enter" to a different function seems to
imply
the proposal to remove the option to toggle "search on fly". If you
mean this, I will object, since I'd like to have it switched off.


Yes, this is what I mean.


I think it makes sense since this is a filter that needs to filter very
long lists (in my case several thousand entries in over 70 fields). The
performance is acceptable, but I am not sure what happens with larger
databases.


I am not really worried about performance. This is small for a computer.
Especially as the filter already has the optimisation where it filters
among the already-found items, which is very efficient for the
"on the fly" mode. There is an easy test to do: see whether using
backspace in the filter feels ok. There is no optimization in this case.
If the result is that it feels okay, then LyX will cope with much larger
databases.

In general the data manipulated by LyX is very small. In my experience
LyX is sometimes slow not because of the size of the data but because of
bad design in certain places (e.g. constant repaintings of whole insets,
constant global updates of macros, repeated calls to costly functions
(0a8b7f6a)), or algorithmic oversights (e.g. quadratic or worse amount
of calls to copy constructors and such, see c51ebd9b, b2b87330,
89175ee0). As a rule of thumb one should more be on the lookout for
these. Of course this remark is not sufficient to rule-out your concern.



Having said that, I am completely fine with making "search on fly" opt-
out.



This is an alternative I had in mind in the absence of a consensus, so
since you are fine with it I might commit such a patch directly.

Guillaume



Re: GUI changes for inserting citations in 2.2x

2016-09-17 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 22:47 +0100 schrieb Guillaume Munch:
> Actually I did generalize, by giving an objective reason: consistency
> with other search fields.

Consistent with which search field? The one in the PanelStack that
greys out items that do not match the filter instead of hiding them (do
you want to do this here as well?)? The one in the Refs dialog that is
below the browser widget and does not provide regex (the next candidate
for dropping, then)?

And how does your proposal to bind the Enter key to jumping widgets add
consistency?

> I do not think that it all comes down to the tastes and habits of
> developers. On the contrary, I believe that this sort of argument
> does
> not lead to great design: it leads to dialogs with three different
> ways
> to validate changes, where a button "Apply" does not have the same
> effect between the two preferences dialogs, and where one is offered
> the
> choice to search as one types or not. Another consequence is that I
> often refrain myself from making (what I find are) small improvements
> because I know that such changes can trigger long discussions.

You are a developer as well (and we both are users), and what you
propose is inevitably based on your tastes and habits. So please do not
play out "subjective" and "objective" reasons. (And believe it or not,
I am also able to abstract from my own narrow POV; I can follow your
arguments, but still I think the current UI makes sense).

> > The proposal to assign "Enter" to a different function seems to
> > imply
> > the proposal to remove the option to toggle "search on fly". If you
> > mean this, I will object, since I'd like to have it switched off.
> 
> Yes, this is what I mean.

I think it makes sense since this is a filter that needs to filter very
long lists (in my case several thousand entries in over 70 fields). The
performance is acceptable, but I am not sure what happens with larger
databases.

Having said that, I am completely fine with making "search on fly" opt-
out.

> > We could assign "Enter" to a second function anyway (if "search on
> > fly"
> > is activated or even if it isn't, after the filter has been
> > applied),
> > but I think this would be irritating. And in general, I think that
> > the
> > binding of the Enter moving widgets is quite opaque.
> > 
> > What's wrong with Alt-V?
> > 
> 
> Nothing is wrong with Alt-V.

Good.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-17 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 22:09 +0100 schrieb Guillaume Munch:
> Yes, it seems that all that cannot be used to control the html
> formatting, which the citation preview uses. I finally found that the
> trick was to change the html. See attached.

Thanks.

> > In any case, if it is done, it should be done for all widgets that
> > do
> > only display information.
> > 
> 
> Where else should that be done?

As said, this needs to be checked. Examples are: GuiChanges, Modules,
Listings, External, ErrorList, but I did not check all.

Jürgen

> 
> Guillaume
> 

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Guillaume Munch

Le 16/09/2016 à 13:53, Jürgen Spitzmüller a écrit :

Am Freitag, den 16.09.2016, 13:41 +0100 schrieb Guillaume Munch:

Am Freitag, den 16.09.2016, 12:39 +0100 schrieb Guillaume Munch:

Now one will expect "search on the fly" to be always activated,

for

consistency for other search fields. If this is done, it makes

sense

to
assign "Enter" to focus the available citations.


Note that this setting is saved between sessions, so everybody can

set

it as s/he feels fit.



I don't think this is related to my point.


I think it is, although I did not spell out my argumentation.


Thank you for clarifying.



The ones that "will expect 'search on the fly' to be always activated"
(and I doubt you can generalize that to a general "one" -- I am the
example that will falsify such a claim) can easily preset it once and
for all.


Actually I did generalize, by giving an objective reason: consistency
with other search fields.

I do not think that it all comes down to the tastes and habits of
developers. On the contrary, I believe that this sort of argument does
not lead to great design: it leads to dialogs with three different ways
to validate changes, where a button "Apply" does not have the same
effect between the two preferences dialogs, and where one is offered the
choice to search as one types or not. Another consequence is that I
often refrain myself from making (what I find are) small improvements
because I know that such changes can trigger long discussions.



The proposal to assign "Enter" to a different function seems to imply
the proposal to remove the option to toggle "search on fly". If you
mean this, I will object, since I'd like to have it switched off.


Yes, this is what I mean.



We could assign "Enter" to a second function anyway (if "search on fly"
is activated or even if it isn't, after the filter has been applied),
but I think this would be irritating. And in general, I think that the
binding of the Enter moving widgets is quite opaque.

What's wrong with Alt-V?



Nothing is wrong with Alt-V.




Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Guillaume Munch

Le 16/09/2016 à 18:12, Jürgen Spitzmüller a écrit :

Am Freitag, den 16.09.2016, 10:20 -0600 schrieb Joel Kulesza:

Perhaps not something to be done immediately, but do you agree that
it is a reasonable request to be considered for implementation in the
future?


Yes. Note, though, that it seems to be non-trivial. I have tried to
implement it, but did not succeed to change the color in a sensible
way. Disabling the widget does not, as in the case of other widgets,
grey it out. The way to go seems to be playing with the color palette,
but I didn't manage to get it to work either (but did not try too
hard).


Yes, it seems that all that cannot be used to control the html
formatting, which the citation preview uses. I finally found that the
trick was to change the html. See attached.



In any case, if it is done, it should be done for all widgets that do
only display information.



Where else should that be done?

Guillaume

>From d803e0b6c566dc1d4ba74b7a901df1c6e1cceade Mon Sep 17 00:00:00 2001
From: Guillaume Munch 
Date: Fri, 16 Sep 2016 22:06:38 +0100
Subject: [PATCH] GuiCitation: Set infoML to read-only colors

---
 src/frontends/qt4/GuiCitation.cpp | 26 +++---
 src/frontends/qt4/GuiCitation.h   |  2 ++
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp
index b294fd8..078a3e3 100644
--- a/src/frontends/qt4/GuiCitation.cpp
+++ b/src/frontends/qt4/GuiCitation.cpp
@@ -124,6 +124,9 @@ GuiCitation::GuiCitation(GuiView & lv)
 	searchOpts->addAction(instant_);
 	searchOptionsPB->setMenu(searchOpts);
 
+	//initialize info box
+	setInfoHtml(docstring());
+
 	connect(citationStyleCO, SIGNAL(activated(int)),
 		this, SLOT(on_citationStyleCO_currentIndexChanged(int)));
 	connect(fulllistCB, SIGNAL(clicked()),
@@ -366,14 +369,23 @@ void GuiCitation::setButtons()
 
 void GuiCitation::updateInfo(BiblioInfo const & bi, QModelIndex const & idx)
 {
-	if (!idx.isValid() || bi.empty()) {
-		infoML->document()->clear();
-		return;
-	}
+	docstring const html = (!idx.isValid() || bi.empty()) ? docstring()
+		: bi.getInfo(qstring_to_ucs4(idx.data().toString()),
+		 documentBuffer(),
+		 true);
+	setInfoHtml(html);
+}
 
-	QString const keytxt = toqstr(
-		bi.getInfo(qstring_to_ucs4(idx.data().toString()), documentBuffer(), true));
-	infoML->document()->setHtml(keytxt);
+
+void GuiCitation::setInfoHtml(docstring const & html)
+{
+	//set preview in window colors to denote read-only
+	QString body(""
+	 "%3"
+	 "");
+	body = body.arg(QPalette().windowText().color().name());
+	body = body.arg(QPalette().window().color().name());
+	infoML->document()->setHtml(body.arg(toqstr(html)));
 }
 
 
diff --git a/src/frontends/qt4/GuiCitation.h b/src/frontends/qt4/GuiCitation.h
index 035b2d2..fee8c60 100644
--- a/src/frontends/qt4/GuiCitation.h
+++ b/src/frontends/qt4/GuiCitation.h
@@ -95,6 +95,8 @@ private:
 	bool isSelected(const QModelIndex &);
 	/// update the display of BibTeX information
 	void updateInfo(BiblioInfo const & bi, QModelIndex const &);
+	/// format and insert text into the info QTextEdit
+	void setInfoHtml(docstring const & html);
 	/// enable/disable buttons
 	void setButtons();
 	/// fill the fields combo
-- 
2.7.4



Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 13:31 -0400 schrieb Scott Kostyshak:
> On Fri, Sep 16, 2016 at 07:22:06PM +0200, Jürgen Spitzmüller wrote:
> > 
> > Am Freitag, den 16.09.2016, 12:59 -0400 schrieb Scott Kostyshak:
> > > 
> > > Is the style also remembered now? This is:
> > > http://www.lyx.org/trac/ticket/10256
> > 
> > No. However, if I understand the report correctly, it is not meant
> > to
> > store the style over sessions, but within a session.
> 
> I see. Thanks for checking.

Nevertheless I went ahead and implemented both.

Jürgen


> 
> Scott

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Scott Kostyshak
On Fri, Sep 16, 2016 at 07:22:06PM +0200, Jürgen Spitzmüller wrote:
> Am Freitag, den 16.09.2016, 12:59 -0400 schrieb Scott Kostyshak:
> > Is the style also remembered now? This is:
> > http://www.lyx.org/trac/ticket/10256
> 
> No. However, if I understand the report correctly, it is not meant to
> store the style over sessions, but within a session.

I see. Thanks for checking.

Scott


signature.asc
Description: PGP signature


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 12:59 -0400 schrieb Scott Kostyshak:
> Is the style also remembered now? This is:
> http://www.lyx.org/trac/ticket/10256

No. However, if I understand the report correctly, it is not meant to
store the style over sessions, but within a session.

Jürgen

> Scott

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 10:20 -0600 schrieb Joel Kulesza:
> Perhaps not something to be done immediately, but do you agree that
> it is a reasonable request to be considered for implementation in the
> future? 

Yes. Note, though, that it seems to be non-trivial. I have tried to
implement it, but did not succeed to change the color in a sensible
way. Disabling the widget does not, as in the case of other widgets,
grey it out. The way to go seems to be playing with the color palette,
but I didn't manage to get it to work either (but did not try too
hard).

In any case, if it is done, it should be done for all widgets that do
only display information.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Scott Kostyshak
On Fri, Sep 16, 2016 at 01:50:11PM +0200, Jürgen Spitzmüller wrote:
> Am Freitag, den 16.09.2016, 12:39 +0100 schrieb Guillaume Munch:
> > Now one will expect "search on the fly" to be always activated, for 
> > consistency for other search fields. If this is done, it makes sense
> > to 
> > assign "Enter" to focus the available citations.
> 
> Note that this setting is saved between sessions, so everybody can set
> it as s/he feels fit.

Is the style also remembered now? This is:
http://www.lyx.org/trac/ticket/10256

Scott


signature.asc
Description: PGP signature


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Joel Kulesza
On Thu, Sep 15, 2016 at 11:43 PM, Jürgen Spitzmüller  wrote:

>
> That would mean to audit all other dialogs to have consistency. And I
> don't have time for that.
>
>
Perhaps not something to be done immediately, but do you agree that it is a
reasonable request to be considered for implementation in the future?


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 13:41 +0100 schrieb Guillaume Munch:
> > Am Freitag, den 16.09.2016, 12:39 +0100 schrieb Guillaume Munch:
> >> Now one will expect "search on the fly" to be always activated,
> for
> >> consistency for other search fields. If this is done, it makes
> sense
> >> to
> >> assign "Enter" to focus the available citations.
> >
> > Note that this setting is saved between sessions, so everybody can
> set
> > it as s/he feels fit.
> >
> 
> I don't think this is related to my point.

I think it is, although I did not spell out my argumentation.

The ones that "will expect 'search on the fly' to be always activated"
(and I doubt you can generalize that to a general "one" -- I am the
example that will falsify such a claim) can easily preset it once and
for all.

The proposal to assign "Enter" to a different function seems to imply
the proposal to remove the option to toggle "search on fly". If you
mean this, I will object, since I'd like to have it switched off.

We could assign "Enter" to a second function anyway (if "search on fly"
is activated or even if it isn't, after the filter has been applied),
but I think this would be irritating. And in general, I think that the
binding of the Enter moving widgets is quite opaque.

What's wrong with Alt-V?

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 12:39 +0100 schrieb Guillaume Munch:
> Now one will expect "search on the fly" to be always activated, for 
> consistency for other search fields. If this is done, it makes sense
> to 
> assign "Enter" to focus the available citations.

Note that this setting is saved between sessions, so everybody can set
it as s/he feels fit.

Jürgen


signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Guillaume Munch

Le 16/09/2016 à 08:22, Jürgen Spitzmüller a écrit :


I've pushed the stuff with these fixes to master.

Probably something to come back to for 2.2.3.



Works very well.

Now one will expect "search on the fly" to be always activated, for 
consistency for other search fields. If this is done, it makes sense to 
assign "Enter" to focus the available citations.






Re: GUI changes for inserting citations in 2.2x

2016-09-16 Thread Jürgen Spitzmüller
Am Freitag, den 16.09.2016, 07:45 +0200 schrieb Jürgen Spitzmüller:
> Am Donnerstag, den 15.09.2016, 22:30 +0100 schrieb Guillaume Munch:
> > 
> > * Why Fi instead of ?
> 
> A mystery. I set , but the designer reset it. Will fix it.
> 
> > 
> > * One could use the search field with the "clear" button already
> > present
> > in the outliner. But this can be done another time.
> 
> Yes, I thought of using the FancyLineEdit, but I was busy enough with
> the rest. Will check.
> 
> > 
> > * It would be great (in my opinion) if Filter is the field selected
> > when
> > opening the dialog. Pressing enter should focus the available
> > citations.
> > Like above, this is not urgent.
> 
> Yes, good idea.

I've pushed the stuff with these fixes to master.

Probably something to come back to for 2.2.3.

Jürgen

> 
> Thanks
> Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-15 Thread Jürgen Spitzmüller
Am Donnerstag, den 15.09.2016, 22:30 +0100 schrieb Guillaume Munch:
> * Why Fi instead of ?

A mystery. I set , but the designer reset it. Will fix it.

> * One could use the search field with the "clear" button already
> present
> in the outliner. But this can be done another time.

Yes, I thought of using the FancyLineEdit, but I was busy enough with
the rest. Will check.

> * It would be great (in my opinion) if Filter is the field selected
> when
> opening the dialog. Pressing enter should focus the available
> citations.
> Like above, this is not urgent.

Yes, good idea.

Thanks
Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-15 Thread Jürgen Spitzmüller
Am Donnerstag, den 15.09.2016, 12:16 -0600 schrieb Joel Kulesza:
> Thank you for your continued work on this - this interface looks
> great!  However, I stand by my previous suggestion: can the preview
> box be made grey (suggesting non-editable) with default text
> "Bibliography entry preview." until it is populated?

That would mean to audit all other dialogs to have consistency. And I
don't have time for that.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-15 Thread Guillaume Munch

Le 15/09/2016 à 22:30, Guillaume Munch a écrit :


* One could use the search field with the "clear" button already present
in the outliner. But this can be done another time.



In fact, it is only in the search field of the settings and document
preferences dialogs (look up FancyLineEdit in PanelStack.cpp). The
outliner could also make use of a similar improvement.




Re: GUI changes for inserting citations in 2.2x

2016-09-15 Thread Guillaume Munch

Le 15/09/2016 à 18:55, Jürgen Spitzmüller a écrit :

Am Samstag, den 10.09.2016, 14:47 +0200 schrieb Charles de Miramon:

If there is a redesign of the dialog, could it be posible to put the
search
field on the top ?


Patch and screenshot attached.

Opinions (I prefer this one)?



This looks very nice.

* Why Fi instead of ?

* One could use the search field with the "clear" button already present
in the outliner. But this can be done another time.

* It would be great (in my opinion) if Filter is the field selected when
opening the dialog. Pressing enter should focus the available citations.
Like above, this is not urgent.

Guillaume



Re: GUI changes for inserting citations in 2.2x

2016-09-15 Thread Jean-Marc Lasgouttes
This looks pretty good.

JMarc

Le 15 septembre 2016 19:55:22 GMT+02:00, "Jürgen Spitzmüller"  a 
écrit :
>Am Samstag, den 10.09.2016, 14:47 +0200 schrieb Charles de Miramon:
>> If there is a redesign of the dialog, could it be posible to put the
>> search 
>> field on the top ?
>
>Patch and screenshot attached.
>
>Opinions (I prefer this one)?
>
>Jürgen


Re: GUI changes for inserting citations in 2.2x

2016-09-15 Thread Joel Kulesza
On Thu, Sep 15, 2016 at 11:55 AM, Jürgen Spitzmüller  wrote:

>
> Opinions (I prefer this one)?
>

Thank you for your continued work on this - this interface looks great!
However, I stand by my previous suggestion: can the preview box be made
grey (suggesting non-editable) with default text "Bibliography entry
preview." until it is populated?

Best regards,
Joel


Re: GUI changes for inserting citations in 2.2x

2016-09-15 Thread Jürgen Spitzmüller
Am Samstag, den 10.09.2016, 14:47 +0200 schrieb Charles de Miramon:
> If there is a redesign of the dialog, could it be posible to put the
> search 
> field on the top ?

Patch and screenshot attached.

Opinions (I prefer this one)?

Jürgendiff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp
index a99db88..9055368 100644
--- a/src/frontends/qt4/GuiCitation.cpp
+++ b/src/frontends/qt4/GuiCitation.cpp
@@ -34,6 +34,7 @@
 #include "support/lstrings.h"
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -93,6 +94,20 @@ GuiCitation::GuiCitation(GuiView & lv)
 {
 	setupUi(this);
 
+	// Add search options as button menu
+	regexp_ = new QAction(qt_("Regular e"), this);
+	regexp_->setCheckable(true);
+	casesense_ = new QAction(qt_("Case se"), this);
+	casesense_->setCheckable(true);
+	instant_ = new QAction(qt_("Search as you "), this);
+	instant_->setCheckable(true);
+
+	QMenu * searchOpts = new QMenu(this);
+	searchOpts->addAction(regexp_);
+	searchOpts->addAction(casesense_);
+	searchOpts->addAction(instant_);
+	searchOptionsPB->setMenu(searchOpts);
+
 	connect(citationStyleCO, SIGNAL(activated(int)),
 		this, SLOT(on_citationStyleCO_currentIndexChanged(int)));
 	connect(fulllistCB, SIGNAL(clicked()),
@@ -103,8 +118,6 @@ GuiCitation::GuiCitation(GuiView & lv)
 		this, SLOT(updateStyles()));
 	connect(textAfterED, SIGNAL(textChanged(QString)),
 		this, SLOT(updateStyles()));
-	connect(findLE, SIGNAL(returnPressed()),
-		this, SLOT(on_searchPB_clicked()));
 	connect(textBeforeED, SIGNAL(returnPressed()),
 		this, SLOT(on_okPB_clicked()));
 	connect(textAfterED, SIGNAL(returnPressed()),
@@ -119,6 +132,13 @@ GuiCitation::GuiCitation(GuiView & lv)
 	connect(selectionManager, SIGNAL(okHook()),
 		this, SLOT(on_okPB_clicked()));
 
+	connect(regexp_, SIGNAL(triggered()),
+		this, SLOT(regexChanged()));
+	connect(casesense_, SIGNAL(triggered()),
+		this, SLOT(caseChanged()));
+	connect(instant_, SIGNAL(triggered(bool)),
+		this, SLOT(instantChanged(bool)));
+
 	setFocusProxy(availableLV);
 }
 
@@ -154,40 +174,10 @@ void GuiCitation::showEvent(QShowEvent * e)
 {
 	findLE->clear();
 	availableLV->setFocus();
-
-	// Set the minimal size of the QToolbox. Without this, the size of the
-	// QToolbox is only determined by values in the ui file (e.g. computed by
-	// qtcreator) and therefore causes portability and localisation issues. Note
-	// that the page widgets must have a layout with layoutSizeContraint =
-	// SetMinimumSize or similar.  KNOWN ISSUE: the calculations are incorrect
-	// the first time the dialog is shown. This problem is mitigated by the fact
-	// that LyX remembers the dialog sizes between sessions.
-	QSize minimum_size = QSize(0,0);
-	// Compute the max of the minimal sizes of the pages
-	QWidget * page;
-	for (int i = 0; (page = citationTB->widget(i)); ++i)
-		minimum_size = minimum_size.expandedTo(page->minimumSizeHint());
-	// Add the height of the tabs
-	if (citationTB->currentWidget())
-		minimum_size.rheight() += citationTB->height() -
-			citationTB->currentWidget()->height();
-	citationTB->setMinimumSize(minimum_size);
-
 	DialogView::showEvent(e);
 }
 
 
-void GuiCitation::on_citationTB_currentChanged(int i)
-{
-	if (i == 0)
-		findLE->setFocus();
-	else if (citationStyleCO->isEnabled())
-		citationStyleCO->setFocus();
-	else
-		textAfterED->setFocus();
-}
-
-
 void GuiCitation::on_okPB_clicked()
 {
 	applyView();
@@ -390,8 +380,9 @@ void GuiCitation::findText(QString const & text, bool reset)
 	else
 		entry_type = entries[index];
 
-	bool const case_sentitive = caseCB->checkState();
-	bool const reg_exp = regexCB->checkState();
+	bool const case_sentitive = casesense_->isChecked();
+	bool const reg_exp = regexp_->isChecked();
+
 	findKey(bi, text, onlyKeys, field, entry_type,
 	   case_sentitive, reg_exp, reset);
 	//FIXME
@@ -427,10 +418,8 @@ void GuiCitation::on_citationStyleCO_currentIndexChanged(int index)
 
 void GuiCitation::on_findLE_textChanged(const QString & text)
 {
-	bool const searchAsWeGo = (asTypeCB->checkState() == Qt::Checked);
-	searchPB->setDisabled(text.isEmpty() || searchAsWeGo);
 	if (!text.isEmpty()) {
-		if (searchAsWeGo)
+		if (instant_->isChecked())
 			findText(findLE->text());
 		return;
 	}
@@ -438,30 +427,31 @@ void GuiCitation::on_findLE_textChanged(const QString & text)
 	findLE->setFocus();
 }
 
-void GuiCitation::on_searchPB_clicked()
+void GuiCitation::on_findLE_returnPressed()
 {
 	findText(findLE->text(), true);
 }
 
 
-void GuiCitation::on_caseCB_stateChanged(int)
+void GuiCitation::caseChanged()
 {
 	findText(findLE->text());
 }
 
 
-void GuiCitation::on_regexCB_stateChanged(int)
+void GuiCitation::regexChanged()
 {
 	findText(findLE->text());
 }
 
 
-void GuiCitation::on_asTypeCB_stateChanged(int)
+void GuiCitation::instantChanged(bool checked)
 {
-	bool const searchAsWeGo = (asTypeCB->checkState() == Qt::Checked);
-	searchPB->setDisabled(findLE->text().isEmpty() || searchAsWeGo);
-	if (searchAsWeGo)
+	if 

Re: GUI changes for inserting citations in 2.2x

2016-09-10 Thread Jürgen Spitzmüller
Am Samstag, den 10.09.2016, 14:47 +0200 schrieb Charles de Miramon:
> I agree with Maria that the new dialog is a usability regression.
> 
> If there is a redesign of the dialog, could it be posible to put the
> search 
> field on the top ?
> 
> My workflow to insert a citation is :
> 
> 1) type the name of the author or some word of the title. My main 
> bibliography file has around 1900 entries and grows slowly. 
> 2) select the exact reference in the list
> 3) add a page number
> 4) insert
> 
> Having the search field on top and the results below is what is
> intuitive 
> today after years of Google use.
> 
> I think kbibtex has a rather nice search field that take little
> vertical 
> space and hides seldom used search options behind a button.

Note that the screen shot does not show the current version. KBibTeX
0.6 uses two combo boxes, mainly because a menu is unusable with the
many biblatex fields (see attached screenshot). Also note that we have
more widgets, so we cannot put everything into one row. 

Moving it to the top would be trivial, but still we need to show/hide
the search options.

> If you have search-as-you-type, I'm wondering who needs search with
> regular 
> expressions. 

These two are orthogonal.

Jürgen

> I'm certainly not a real geek !
> 
> Cheers,
> Charles

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-10 Thread Charles de Miramon
Maria Gouskova wrote:

> Hi developers,
> 
> I just upgraded to 2.2.1 today. I can see that there have been a lot of
> changes in the appearance of the interface, so obviously quite a lot of
> work went into the redesign. I confess I was stumped, though, when I went
> to insert a citation. The "Search" and "Formatting" options are hidden,
> and it's done in such a way that if I didn't know that they were there, it
> would not occur to me that those areas of the window were clickable. So I
> was wondering what the motivation was for the change--I can see that it's
> a "cleaner" look, but I think it really hampers the usability of the GUI,
> especially for new users.
> 

I agree with Maria that the new dialog is a usability regression.

If there is a redesign of the dialog, could it be posible to put the search 
field on the top ?

My workflow to insert a citation is :

1) type the name of the author or some word of the title. My main 
bibliography file has around 1900 entries and grows slowly. 
2) select the exact reference in the list
3) add a page number
4) insert

Having the search field on top and the results below is what is intuitive 
today after years of Google use.

I think kbibtex has a rather nice search field that take little vertical 
space and hides seldom used search options behind a button.


If you have search-as-you-type, I'm wondering who needs search with regular 
expressions. I'm certainly not a real geek !

Cheers,
Charles

Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jürgen Spitzmüller
Am Freitag, den 09.09.2016, 12:13 +0200 schrieb Jean-Marc Lasgouttes:
> My idea was to replace the combo-box by entries in a submenu.

That submenu would hold 76 items for "Search Fields" and 16 itemsfor
"Search Type", respectively, with my usual (biblatex) database.

Jürgen

> JMarc


signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jean-Marc Lasgouttes

Le 09/09/2016 à 11:49, Jürgen Spitzmüller a écrit :

We could use a Menu (on a button) which displays the actions. However,
for the combo boxes, we would need a QWidgetAction, and this class
seems to have limitations on Mac OSX that make it non-useable for our
task:
http://doc.qt.io/qt-5/qwidgetaction.html#details


My idea was to replace the combo-box by entries in a submenu.

JMarc




Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jürgen Spitzmüller
Am Freitag, den 09.09.2016, 11:36 +0200 schrieb Jean-Marc Lasgouttes:
> Le 09/09/2016 à 11:11, Jürgen Spitzmüller a écrit :
> > 
> > Am Freitag, den 09.09.2016, 10:56 +0200 schrieb Jean-Marc
> > Lasgouttes:
> > > 
> > > In MS word there is a menubutton for special formatting
> > > search/replace.
> > 
> > But you end in a sub-dialog (at least in Office 2010).
> > 
> > I think this is not a good UI.
> 
> We do not have to follow this part.

We could use a Menu (on a button) which displays the actions. However,
for the combo boxes, we would need a QWidgetAction, and this class
seems to have limitations on Mac OSX that make it non-useable for our
task:
http://doc.qt.io/qt-5/qwidgetaction.html#details

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jean-Marc Lasgouttes

Le 09/09/2016 à 11:11, Jürgen Spitzmüller a écrit :

Am Freitag, den 09.09.2016, 10:56 +0200 schrieb Jean-Marc
Lasgouttes:

In MS word there is a menubutton for special formatting
search/replace.


But you end in a sub-dialog (at least in Office 2010).

I think this is not a good UI.


We do not have to follow this part.


Or the search entry could expand to some larger proto-window
(without title bar) with options when clicking on it. I've see that
on web page, but I cannot give an example of real UI.


Hm, I cannot follow you.


I'm not sure either that I can follow myself. If I find a convincing
example, I'll chime in.

JMarc



Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jürgen Spitzmüller
Am Donnerstag, den 08.09.2016, 20:28 +0200 schrieb Jürgen Spitzmüller:
> How about the attached alternative (not yet finished) design?

Patch attached. I had to do some limbo dance in order to get the
resizing of the dialog working. It works now as intended, at least in
my testing.

Jürgendiff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp
index a99db88..420de20 100644
--- a/src/frontends/qt4/GuiCitation.cpp
+++ b/src/frontends/qt4/GuiCitation.cpp
@@ -119,6 +119,8 @@ GuiCitation::GuiCitation(GuiView & lv)
 	connect(selectionManager, SIGNAL(okHook()),
 		this, SLOT(on_okPB_clicked()));
 
+	searchOptsW->setVisible(false);
+
 	setFocusProxy(availableLV);
 }
 
@@ -150,41 +152,30 @@ void GuiCitation::applyView()
 }
 
 
-void GuiCitation::showEvent(QShowEvent * e)
+void GuiCitation::adjustSearchOptsSize(bool init)
 {
-	findLE->clear();
-	availableLV->setFocus();
-
-	// Set the minimal size of the QToolbox. Without this, the size of the
-	// QToolbox is only determined by values in the ui file (e.g. computed by
-	// qtcreator) and therefore causes portability and localisation issues. Note
-	// that the page widgets must have a layout with layoutSizeContraint =
-	// SetMinimumSize or similar.  KNOWN ISSUE: the calculations are incorrect
-	// the first time the dialog is shown. This problem is mitigated by the fact
-	// that LyX remembers the dialog sizes between sessions.
+	// Adjust the size of the hideable Search Options.
 	QSize minimum_size = QSize(0,0);
-	// Compute the max of the minimal sizes of the pages
-	QWidget * page;
-	for (int i = 0; (page = citationTB->widget(i)); ++i)
-		minimum_size = minimum_size.expandedTo(page->minimumSizeHint());
-	// Add the height of the tabs
-	if (citationTB->currentWidget())
-		minimum_size.rheight() += citationTB->height() -
-			citationTB->currentWidget()->height();
-	citationTB->setMinimumSize(minimum_size);
+	if (searchOptsW->isVisible())
+		minimum_size = searchOptsW->minimumSizeHint();
+	else if (!init)
+		// if the dialog is not shown for the first time
+		// and search opt are visible, we have to adjust
+		// the minimum height to make it shrink when the opts
+		// are hidden
+		setMinimumHeight(minimumHeight()
+			- searchOptsW->minimumSizeHint().height());
 
-	DialogView::showEvent(e);
+	searchOptsW->setFixedSize(minimum_size);
 }
 
 
-void GuiCitation::on_citationTB_currentChanged(int i)
+void GuiCitation::showEvent(QShowEvent * e)
 {
-	if (i == 0)
-		findLE->setFocus();
-	else if (citationStyleCO->isEnabled())
-		citationStyleCO->setFocus();
-	else
-		textAfterED->setFocus();
+	findLE->clear();
+	availableLV->setFocus();
+	adjustSearchOptsSize(true);
+	DialogView::showEvent(e);
 }
 
 
@@ -214,6 +205,22 @@ void GuiCitation::on_restorePB_clicked()
 	init();
 }
 
+void GuiCitation::on_searchOptionsPB_clicked()
+{
+	bool const was_visible = searchOptsW->isVisible();
+	searchOptsW->setVisible(!was_visible);
+
+	if (was_visible)
+		searchOptionsPB->setText(qt_("Show O"));
+	else
+		searchOptionsPB->setText(qt_("Hide O"));
+
+	adjustSearchOptsSize();
+	// this is necessary to get the latest size hints.
+	QCoreApplication::processEvents();
+	adjustSize();
+}
+
 
 void GuiCitation::updateControls()
 {
diff --git a/src/frontends/qt4/GuiCitation.h b/src/frontends/qt4/GuiCitation.h
index cc24eb9..6af68f6 100644
--- a/src/frontends/qt4/GuiCitation.h
+++ b/src/frontends/qt4/GuiCitation.h
@@ -44,12 +44,12 @@ public:
 	~GuiCitation();
 
 private Q_SLOTS:
-	void on_citationTB_currentChanged(int i);
 	void on_okPB_clicked();
 	void on_cancelPB_clicked();
 	void on_restorePB_clicked();
 	void on_applyPB_clicked();
 	void on_searchPB_clicked();
+void on_searchOptionsPB_clicked();
 	void on_findLE_textChanged(const QString & text);
 	void on_fieldsCO_currentIndexChanged(int index);
 	void on_entriesCO_currentIndexChanged(int index);
@@ -84,6 +84,8 @@ private:
 	//@}
 
 	///
+	void adjustSearchOptsSize(bool init = false);
+	///
 	void showEvent(QShowEvent * e);
 	///
 	void closeEvent(QCloseEvent * e);
diff --git a/src/frontends/qt4/ui/CitationUi.ui b/src/frontends/qt4/ui/CitationUi.ui
index 360d941..ec77afc 100644
--- a/src/frontends/qt4/ui/CitationUi.ui
+++ b/src/frontends/qt4/ui/CitationUi.ui
@@ -6,8 +6,8 @@

 0
 0
-590
-506
+614
+637

   
   
@@ -16,7 +16,7 @@
   
true
   
-  
+  

 
  
@@ -104,8 +104,7 @@
  
  
   
-   
-  
+   ..
  
  
   false
@@ -128,8 +127,7 @@
  
  
   
-   
-  
+   ..
  
  
   false
@@ -143,7 +141,7 @@

 
  
-  Selected Citations:
+  Selected Citations:
  
  
   selectedLV
@@ -182,296 +180,294 @@
 


-
- 
-  
-   0
-   0
-  
+  

Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jürgen Spitzmüller
Am Freitag, den 09.09.2016, 10:56 +0200 schrieb Jean-Marc Lasgouttes:
> In MS word there is a menubutton for special formatting
> search/replace. 

But you end in a sub-dialog (at least in Office 2010).

I think this is not a good UI.

> Or the search entry could expand to some larger proto-window
> (without 
> title bar) with options when clicking on it. I've see that on web
> page, 
> but I cannot give an example of real UI.

Hm, I cannot follow you.

Jürgen

> 
> JMarc
> 
> 
> 

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jürgen Spitzmüller
Am Freitag, den 09.09.2016, 11:05 +0200 schrieb Edwin Leuven:
> what about adding above the right pane a “search” combobox where the
> matching items would show up in a dropdown list as you type, and
> hitting enter would add the top/selected match to the selected
> citations
> 
> the search options could then be in a tabwidget

I do not understand.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Edwin Leuven
what about adding above the right pane a “search” combobox where the matching 
items would show up in a dropdown list as you type, and hitting enter would add 
the top/selected match to the selected citations

the search options could then be in a tabwidget

(not sure i like dialogs that resize ;-)

?

ed.



> On 09 Sep 2016, at 10:33, Jürgen Spitzmüller  wrote:
> 
> Am Freitag, den 09.09.2016, 09:23 +0200 schrieb Jean-Marc Lasgouttes:
>> What happens when options are expanded on a 800x600 screen? 
> 
> The dialog expands the screen. However, it can be collapsed again after
> the options have been set, so this is IMHO bearable.
> 
>> Could the 
>> options be put in a menu instead ? Since there is no text entry
>> field, 
>> this seems doable. I do not know whether Qt has some special UI for 
>> menus-in-dialogs.
> 
> I am not sure. Sounds like unusual UI to me. We could move it in a sub-
> dialog, but that sounds rather clumsy as well.
> 
> Jürgen
> 
>> 
>> JMarc



Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jean-Marc Lasgouttes

Le 09/09/2016 à 10:33, Jürgen Spitzmüller a écrit :

Am Freitag, den 09.09.2016, 09:23 +0200 schrieb Jean-Marc Lasgouttes:

What happens when options are expanded on a 800x600 screen?


The dialog expands the screen. However, it can be collapsed again after
the options have been set, so this is IMHO bearable.


Could the
options be put in a menu instead ? Since there is no text entry
field,
this seems doable. I do not know whether Qt has some special UI for
menus-in-dialogs.


I am not sure. Sounds like unusual UI to me. We could move it in a sub-
dialog, but that sounds rather clumsy as well.


In MS word there is a menubutton for special formatting search/replace. 
I agree that it is weird, but not unheard of. My proposal was for search 
pions only, of course.


Or the search entry could expand to some larger proto-window (without 
title bar) with options when clicking on it. I've see that on web page, 
but I cannot give an example of real UI.


JMarc





Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jürgen Spitzmüller
Am Freitag, den 09.09.2016, 09:23 +0200 schrieb Jean-Marc Lasgouttes:
> What happens when options are expanded on a 800x600 screen? 

The dialog expands the screen. However, it can be collapsed again after
the options have been set, so this is IMHO bearable.

> Could the 
> options be put in a menu instead ? Since there is no text entry
> field, 
> this seems doable. I do not know whether Qt has some special UI for 
> menus-in-dialogs.

I am not sure. Sounds like unusual UI to me. We could move it in a sub-
dialog, but that sounds rather clumsy as well.

Jürgen

> 
> JMarc
> 

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jean-Marc Lasgouttes

Le 08/09/2016 à 20:28, Jürgen Spitzmüller a écrit :

Am Donnerstag, den 08.09.2016, 11:55 -0400 schrieb Richard Heck:

I would second this. I think what is confusing people is partly the
"stacked"
nature of these tabs. As someone else mentioned, it would also save
vertical
space to use a QTabWidget. And it should be a pretty simple change.


How about the attached alternative (not yet finished) design?


What happens when options are expanded on a 800x600 screen? Could the 
options be put in a menu instead ? Since there is no text entry field, 
this seems doable. I do not know whether Qt has some special UI for 
menus-in-dialogs.


JMarc



Re: GUI changes for inserting citations in 2.2x

2016-09-09 Thread Jürgen Spitzmüller
Am Donnerstag, den 08.09.2016, 19:53 +0100 schrieb Guillaume Munch:
> I think this missing feature is explained here:
> https://doc.qt.io/qt-4.8/qshortcut.html#mnemonic
> 
> It would be still possible to enable accelerators on OSX, only they
> would not show up on screen.
> 
> I think it has to do with "helping us" getting rid of 19th century
> technology: keyboards, jack plugs...

Weird.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Joel Kulesza
On Thu, Sep 8, 2016 at 12:28 PM, Jürgen Spitzmüller  wrote:

>
> How about the attached alternative (not yet finished) design?
>

I like that look *much* better that what is there currently!  One
suggestion (Maria raised this point): can the entry preview box be made
grey (suggesting non-editable) with default text "Bibliography entry
preview." until it is populated?


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Joel Kulesza
On Thu, Sep 8, 2016 at 1:05 AM, Jürgen Spitzmüller  wrote:

> Yes, the idea is to keep all dialogs under that limit. Are you aware of
> dialogs that are larger?
>

Not definitively (I don't routinely measure my dialogs --- I'm lucky to
work exclusively on 4k-5k screens).  However, the preferences/document
settings dialogs struck me as most likely to violate that size (or,
perhaps, they are right at it).


> I have never seen a dialog with a scroll area (as opposed to some
> scrollable browser or list widget). This sounds like awful GUI design.
>

I've seen such things, when required due to display limitations.  Yes, it
is bad design.  However, it is functional and yet allows larger displays to
forgo them in order to display everything properly.


> I really appreciate the feedback.
>

Thanks for keeping an open mind!


> Actually, I prefer qualitative arguments over quantitative. If we would
> rely on number of users, many features (and language supports) would
> never have been implemented.
>

My preference is for for a sane mixture of both qualitative and
quantitative reasoning.  I might call this a rational argument. ;-)


> > What are your thoughts on relabeling to Find Citation and introducing
> > an F-based keyboard solution?  This is a redesign (which as you note
> > is annoying); however, using "F" for "Find" is a more common design
> > element than "S" for "Search" vice "Save".
>
> That's fine with me.
>

I'll put an enhancement request into the tracker for this.


> I am just arguing.
>

So I noticed. ;-)  Nevertheless, I'm happy we can have the back-and-forth
dialog.


> It
> is also not possible to have both open, which would be even a better
> option.
>

Bummer.


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Pavel Sanda
Jürgen Spitzmüller wrote:
> Am Donnerstag, den 08.09.2016, 11:55 -0400 schrieb Richard Heck:
> > I would second this. I think what is confusing people is partly the
> > "stacked"
> > nature of these tabs. As someone else mentioned, it would also save
> > vertical
> > space to use a QTabWidget. And it should be a pretty simple change.
> 
> How about the attached alternative (not yet finished) design?

Seems good solution to me. We should remember show/hide state 
of the dialog at least within a session. P


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Guillaume Munch

Le 08/09/2016 à 19:28, Jürgen Spitzmüller a écrit :

Am Donnerstag, den 08.09.2016, 11:55 -0400 schrieb Richard Heck:

I would second this. I think what is confusing people is partly the
"stacked"
nature of these tabs. As someone else mentioned, it would also save
vertical
space to use a QTabWidget. And it should be a pretty simple change.


How about the attached alternative (not yet finished) design?



I like the idea, especially the fact that I would no longer have to see
these fields which I never use. However I am not sure to like how it
looks yet. I am curious to see the finished design.



Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Guillaume Munch

Le 08/09/2016 à 14:04, Jürgen Spitzmüller a écrit :

Am Donnerstag, den 08.09.2016, 14:45 +0200 schrieb Jean-Marc
Lasgouttes:


I am sure this has been debated but what is the reason why we do
not use good old tabs for these two panes? I'd say that what you
using there can be good for sidebars, but not necessarily dialogs.


On the contrary, I think that tabs are useful for whole dialog
sections, while ToolBoxes are more useful for collapsing parts of a
dialog. This is how these widgets are used at least in KDE.

But if everybody thinks it is irritating, then change it to tabs.


I would find tabs more irritating, because it does not has the same
meaning. It would be better to make the toolbox more convenient. I find
it an interesting tool that could be used elsewhere.

Le 08/09/2016 à 14:20, Maria Gouskova a écrit :


I think there are three problems--(a) the users who are used to the
old way might be getting annoyed at the changes, (b) the new
interface does not present the available options in a
self-explanatory way (not apparent that search is clickable, but
there is what looks like a text field that cannot be typed into), and
(c) the options that are available by default are not presented in
the logical order of need (formatting is available before a citation
is selected, and search is hidden).


With this nice summing up of the problem, I would suggest:

* for (b):
  - Tabs can have an icon. Use this to reinforce the "open/closed" 
state with a downward-pointing arrows and rightward-pointing arrows as 
is done in other places.

  - Try to fix tabulation
  - Activate accelerators (as possible)

* for (c):
  - Remember which tab was open in the previous session.



Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Richard Heck
On 09/08/2016 02:28 PM, Jürgen Spitzmüller wrote:
> Am Donnerstag, den 08.09.2016, 11:55 -0400 schrieb Richard Heck:
>> I would second this. I think what is confusing people is partly the
>> "stacked"
>> nature of these tabs. As someone else mentioned, it would also save
>> vertical
>> space to use a QTabWidget. And it should be a pretty simple change.
> How about the attached alternative (not yet finished) design?

I thought about a similar idea, and it could work. Probably changing the
options is something one only needs to do on occasion. So this would at
least be worth trying.

Richard



Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Guillaume Munch

Le 08/09/2016 à 14:27, Jürgen Spitzmüller a écrit :

Am Donnerstag, den 08.09.2016, 09:20 -0400 schrieb Maria Gouskova:

What about at least changing it so that "Search" appears in "open
position" or in a top tab, and "Formatting" is in a back tab?


I thought about this. I think for people using Natbib/BibLaTeX, the
formatting is much more important than Search.



The thing to do here is to remember the state between sessions (as it 
already does in a session).





Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Guillaume Munch

Le 07/09/2016 à 06:36, Jürgen Spitzmüller a écrit :

Am Dienstag, den 06.09.2016, 23:29 -0600 schrieb Joel Kulesza:

On Tue, Sep 6, 2016 at 11:19 PM, Jürgen Spitzmüller 
wrote:

Am Dienstag, den 06.09.2016, 23:15 -0600 schrieb Joel Kulesza:

On OSX, Alt-S does nothing.  Same for Control-S and Command-S.


I don't have OS X, so I can't check.


I'm ignorant on the subject of Qt accelerators.  Is this a known
(dys)function on OSX?


Not that I know. If it is, it would be a rather grave UI problem for
Mac users.




I think this missing feature is explained here:
https://doc.qt.io/qt-4.8/qshortcut.html#mnemonic

It would be still possible to enable accelerators on OSX, only they
would not show up on screen.

I think it has to do with "helping us" getting rid of 19th century
technology: keyboards, jack plugs...




Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Guillaume Munch

Le 07/09/2016 à 07:06, Jürgen Spitzmüller a écrit :


As I wrote, I think it is important that the dialogs work on all
current screens, and in general, I think 800x600 is still a good
maximum for dialogs.


And now with Hi-DPI it is no longer a matter of resolution since one
also has to take scaling into account. I find the smaller dialog more
convenient too because of its size.



As to scrollbars, I don't think this is a good idea. This is not usable
without the mouse (and I doubt it can be elegantly done with Qt).


Same.





Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Jürgen Spitzmüller
Am Donnerstag, den 08.09.2016, 11:55 -0400 schrieb Richard Heck:
> I would second this. I think what is confusing people is partly the
> "stacked"
> nature of these tabs. As someone else mentioned, it would also save
> vertical
> space to use a QTabWidget. And it should be a pretty simple change.

How about the attached alternative (not yet finished) design?

Jürgen

> 
> Richard
> 

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Richard Heck
On 09/08/2016 08:45 AM, Jean-Marc Lasgouttes wrote:
> Le 08/09/2016 à 09:05, Jürgen Spitzmüller a écrit :
>> This is not possible. One pane at a time must (and can) be opened. It
>> is also not possible to have both open, which would be even a better
>> option.
>
> I have missed most of the discussion, but I have to admit that the
> current panes system is not intuitive to me. Actually, when I open the
> dialog, I am not completely sure of what I see.
>
> I am sure this has been debated but what is the reason why we do not
> use good old tabs for these two panes? I'd say that what you using
> there can be good for sidebars, but not necessarily dialogs.

I would second this. I think what is confusing people is partly the
"stacked"
nature of these tabs. As someone else mentioned, it would also save vertical
space to use a QTabWidget. And it should be a pretty simple change.

Richard



Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Maria Gouskova
On Thu, Sep 8, 2016 at 9:04 AM, Jürgen Spitzmüller  wrote:

> Am Donnerstag, den 08.09.2016, 14:45 +0200 schrieb Jean-Marc
> Lasgouttes:
>
> > I have missed most of the discussion, but I have to admit that the
> > current panes system is not intuitive to me. Actually, when I open
> > the
> > dialog, I am not completely sure of what I see.
>
> These are not panes, but so-called tool boxes (in Qt speech)
>
> > I am sure this has been debated but what is the reason why we do not
> > use
> > good old tabs for these two panes? I'd say that what you using there
> > can
> > be good for sidebars, but not necessarily dialogs.
>
> On the contrary, I think that tabs are useful for whole dialog
> sections, while ToolBoxes are more useful for collapsing parts of a
> dialog. This is how these widgets are used at least in KDE.
>
> But if everybody thinks it is irritating, then change it to tabs.
>

I think there are three problems--(a) the users who are used to the old way
might be getting annoyed at the changes, (b) the new interface does not
present the available options in a self-explanatory way (not apparent that
search is clickable, but there is what looks like a text field that cannot
be typed into), and (c) the options that are available by default are not
presented in the logical order of need (formatting is available before a
citation is selected, and search is hidden).

As for (a), I agree that people should just deal. But I think (b) and (c)
are new problems with the GUI design that were introduced to fix something
that might not have been a huge deal in the first place.

What about at least changing it so that "Search" appears in "open position"
or in a top tab, and "Formatting" is in a back tab?

Maria


>
> Jürgen
>
> >
> > JMarc
> >


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Jürgen Spitzmüller
Am Donnerstag, den 08.09.2016, 09:20 -0400 schrieb Maria Gouskova:
> What about at least changing it so that "Search" appears in "open
> position" or in a top tab, and "Formatting" is in a back tab? 

I thought about this. I think for people using Natbib/BibLaTeX, the
formatting is much more important than Search.

In any case, this might be an advantage to you but in turn a
disadvantage to others.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Jürgen Spitzmüller
Am Donnerstag, den 08.09.2016, 14:45 +0200 schrieb Jean-Marc
Lasgouttes:

> I have missed most of the discussion, but I have to admit that the 
> current panes system is not intuitive to me. Actually, when I open
> the 
> dialog, I am not completely sure of what I see.

These are not panes, but so-called tool boxes (in Qt speech)

> I am sure this has been debated but what is the reason why we do not
> use 
> good old tabs for these two panes? I'd say that what you using there
> can 
> be good for sidebars, but not necessarily dialogs.

On the contrary, I think that tabs are useful for whole dialog
sections, while ToolBoxes are more useful for collapsing parts of a
dialog. This is how these widgets are used at least in KDE.

But if everybody thinks it is irritating, then change it to tabs.

Jürgen

> 
> JMarc
> 

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Jean-Marc Lasgouttes

Le 08/09/2016 à 09:05, Jürgen Spitzmüller a écrit :

This is not possible. One pane at a time must (and can) be opened. It
is also not possible to have both open, which would be even a better
option.


I have missed most of the discussion, but I have to admit that the 
current panes system is not intuitive to me. Actually, when I open the 
dialog, I am not completely sure of what I see.


I am sure this has been debated but what is the reason why we do not use 
good old tabs for these two panes? I'd say that what you using there can 
be good for sidebars, but not necessarily dialogs.


JMarc



Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Jürgen Spitzmüller
Am Mittwoch, den 07.09.2016, 08:29 -0400 schrieb Maria Gouskova:
> The "Formatting" options were hidden in the older view until a
> citation was selected. They are open by default now, but I think
> that's a little misleading since one should not want to or be able to
> format a citation when none are selected yet.

That's not true (at least on Linux). The formatting was always shown.
The "Citation Style" combo was disabled until a citation was selected.
This is the same in the new design. So no change here.

See attached screenshot, showing the initial state of LyX 2.1.x and LyX
2.2.x on Linux. It also documents the size improvement.

> The other misleading thing about the current GUI dialog is that the
> one field that's visible and looks like it could be typed in is the
> citation preview field.

This hasn't changed either. Again, see screenshot

> P.S. on the extra clicks issue--on Linux at least, and I think it
> used to be that way in the previous Mac OS versions, one could get to
> the Search field by hitting the Tab key. 

That seems true. The Tab accelerators unfortunately do not enter
collapsed panes (which strikes me like a Qt bug). But I am currently
looking into a solution.

> The new GUI requires a mouse click on the Search tab.

No, you can use the keyboard accelerators.

Best
Jürgen


signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-08 Thread Jürgen Spitzmüller
Am Mittwoch, den 07.09.2016, 07:38 -0600 schrieb Joel Kulesza:
> That's a fair opinion.  Do you know whether there are plans to bring
> any remaining dialogs >800x600 into compliance with this soft limit? 
> If so, do you know what approaches are planned?  Consistency will
> help adoption of design elements like the tabs in the citation
> dialog.

Yes, the idea is to keep all dialogs under that limit. Are you aware of
dialogs that are larger?

>  
> > As to scrollbars, I don't think this is a good idea. This is not
> > usable
> > without the mouse (and I doubt it can be elegantly done with Qt).
> 
> Scrollbars are traditionally mouse driven; however, for someone who
> prefers the keyboard the arrow keys or page up / page down can be
> used (thus only limiting Vim zealots like myself without yet more
> exotic key bindings).  Tab can be used to navigate between fields. 
> Again admitting ignorance, but it seems like the QScrollArea could be
> used.  Going further, perhaps the scrollbars can wrapped in a
> conditional that queries the user's resolution on launch to see if
> they are even needed (if the screen resolution is larger than the
> dialog, don't draw them but embed the layouts that would traditional
> lay within them directly into the dialog).

I have never seen a dialog with a scroll area (as opposed to some
scrollable browser or list widget). This sounds like awful GUI design.

> > When I did the redesign, I really tried several options. It was
> > _not_
> > possible to design a dialog of the proper size without using a
> > pane/tabbar or toolbox. I selected the latter, since it is the most
> > space-saving option and it does not introduce any extra-clicks.
> 
> Sounds good, I appreciate your diligence and willingness to share
> your approach.  I'm just hoping to offer user perspectives and
> options that might feel "more natural" for the uninitiated yet still
> be serviceable and unintrusive to all.

I really appreciate the feedback.

> > Of course any redesign is annoying since you have to get used to
> > the
> > new UI, but we have to make the dialogs work for everybody.
> 
> Understood.  I'm still curious what fraction of LyX users have such
> resolution limitations.  Some interesting desktop web browser
> statistics
> here: http://www.w3schools.com/browsers/browsers_display.asp.

Actually, I prefer qualitative arguments over quantitative. If we would
rely on number of users, many features (and language supports) would
never have been implemented.

>  
> > Any points I missed?
> 
> What are your thoughts on relabeling to Find Citation and introducing
> an F-based keyboard solution?  This is a redesign (which as you note
> is annoying); however, using "F" for "Find" is a more common design
> element than "S" for "Search" vice "Save".

That's fine with me.

> > (Note that I am not talking about the shortcut to open the
> search dialog)
> 
> Because it does not work for me (or I don't know how to properly use
> it), what is Alt-S supposed to do?

If the dialog is opened, it will open the "Search Citation" section and
put the cursor into the search field, so you can immediately go ahead
and enter your search term (same as in LyX 2.1)  


> In closing, for your consideration and not requiring a response,
> 
> Thank you for the continued discussion on this.  Please don't get me
> wrong: I truly value the work that you and the other developers do (I
> hope to join you and contribute in some small ways once my studies
> have finished).
> 
> However, I've stood by silently until now but am compelled by Maria's
> initiation of the discussion.  I have introduced LyX to numerous
> (cross-platform and savvy) new users and this is one of the
> functional elements that commonly, once explained, gets the response
> "but why?"  I suppose the main line of thought that I've heard is
> "why does Formatting look like a header with fields below it and
> there are no fields for text entry below the Search Citation header"
> not realizing it is in fact a clickable design element.  Once
> explained and the fields shown, the question is "why is that hidden
> by default?" because, in my experience, most users are not writing
> documents on a small resolution display and thus don't likely expect
> such space-saving measures.  

As written above, we really appreciate any feedback. I am just arguing.

> I do not want to diminish your efforts or discard your work, but this
> strikes me as a potential case where the needs/expectations of the
> many users may outweigh the needs of a the few (who can still be
> accommodated).  It is also somewhat a slippery slope.  Netbooks drove
> the change.  What happens if LyX is ported to a device with a more
> limited screen in terms of size / resolution?

800x600 was always the measure AFAIR. It somehow got forgotten when
most developers used those larger screens.

> To aid the current design, perhaps it is more sensible to have both
> Search and Formatting initially collapsed to (a) 

Re: GUI changes for inserting citations in 2.2x

2016-09-07 Thread Joel Kulesza
On Wed, Sep 7, 2016 at 12:06 AM, Jürgen Spitzmüller  wrote:

>
> As I wrote, I think it is important that the dialogs work on all
> current screens, and in general, I think 800x600 is still a good
> maximum for dialogs.
>

That's a fair opinion.  Do you know whether there are plans to bring any
remaining dialogs >800x600 into compliance with this soft limit?  If so, do
you know what approaches are planned?  Consistency will help adoption of
design elements like the tabs in the citation dialog.


> As to scrollbars, I don't think this is a good idea. This is not usable
> without the mouse (and I doubt it can be elegantly done with Qt).
>

Scrollbars are traditionally mouse driven; however, for someone who prefers
the keyboard the arrow keys or page up / page down can be used (thus only
limiting Vim zealots like myself without yet more exotic key bindings).
Tab can be used to navigate between fields.  Again admitting ignorance, but
it seems like the QScrollArea could be used.  Going further, perhaps the
scrollbars can wrapped in a conditional that queries the user's resolution
on launch to see if they are even needed (if the screen resolution is
larger than the dialog, don't draw them but embed the layouts that would
traditional lay within them directly into the dialog).


> When I did the redesign, I really tried several options. It was _not_
> possible to design a dialog of the proper size without using a
> pane/tabbar or toolbox. I selected the latter, since it is the most
> space-saving option and it does not introduce any extra-clicks.
>

Sounds good, I appreciate your diligence and willingness to share your
approach.  I'm just hoping to offer user perspectives and options that
might feel "more natural" for the uninitiated yet still be serviceable and
unintrusive to all.

Of course any redesign is annoying since you have to get used to the
> new UI, but we have to make the dialogs work for everybody.
>

Understood.  I'm still curious what fraction of LyX users have such
resolution limitations.  Some interesting desktop web browser statistics
here: http://www.w3schools.com/browsers/browsers_display.asp.


> Any points I missed?
>

What are your thoughts on relabeling to Find Citation and introducing an
F-based keyboard solution?  This is a redesign (which as you note is
annoying); however, using "F" for "Find" is a more common design element
than "S" for "Search" vice "Save".

> (Note that I am not talking about the shortcut to open the search dialog)

Because it does not work for me (or I don't know how to properly use it),
what is Alt-S supposed to do?

In closing, for your consideration and not requiring a response,

Thank you for the continued discussion on this.  Please don't get me wrong:
I truly value the work that you and the other developers do (I hope to join
you and contribute in some small ways once my studies have finished).

However, I've stood by silently until now but am compelled by Maria's
initiation of the discussion.  I have introduced LyX to numerous
(cross-platform and savvy) new users and this is one of the functional
elements that commonly, once explained, gets the response "but why?"  I
suppose the main line of thought that I've heard is "why does Formatting
look like a header with fields below it and there are no fields for text
entry below the Search Citation header" not realizing it is in fact a
clickable design element.  Once explained and the fields shown, the
question is "why is that hidden by default?" because, in my experience,
most users are not writing documents on a small resolution display and thus
don't likely expect such space-saving measures.

I do not want to diminish your efforts or discard your work, but this
strikes me as a potential case where the needs/expectations of the many
users may outweigh the needs of a the few (who can still be accommodated).
It is also somewhat a slippery slope.  Netbooks drove the change.  What
happens if LyX is ported to a device with a more limited screen in terms of
size / resolution?

To aid the current design, perhaps it is more sensible to have both Search
and Formatting initially collapsed to (a) instigate inquisitive behavior
that will lead to a click, (b) will then provide the user a session-wide
persistent open version of his/her preferred portion, and (c) I believe by
your logic, introduce no additional clicks.  Perhaps easier: include in the
label "(click to open)" when collapsed.


Re: GUI changes for inserting citations in 2.2x

2016-09-07 Thread Maria Gouskova
On Wed, Sep 7, 2016 at 8:29 AM, Maria Gouskova  wrote:

> I had to do a bit of research just now to figure out what things used to
> look like vs. how they look now.
>
> By default, the first thing you see on a Mac now (this is 10.8 for sure
> but also 10.10, I think?  can't remember my office Mac's OS version):
> [image: Inline image 1]
>
> The "Search Citation" field is hidden from view, where before it was open
> on first view. It still is on my not-yet-upgraded Linux machine.
>
> The "Formatting" options were hidden in the older view until a citation
> was selected. They are open by default now, but I think that's a little
> misleading since one should not want to or be able to format a citation
> when none are selected yet.
>
> The other misleading thing about the current GUI dialog is that the one
> field that's visible and looks like it could be typed in is the citation
> preview field.
>
> Maria
>

P.S. on the extra clicks issue--on Linux at least, and I think it used to
be that way in the previous Mac OS versions, one could get to the Search
field by hitting the Tab key. The new GUI requires a mouse click on the
Search tab.

Maria





>
> On Wed, Sep 7, 2016 at 2:06 AM, Jürgen Spitzmüller  wrote:
>
>> Am Dienstag, den 06.09.2016, 23:56 -0600 schrieb Joel Kulesza:
>> > In the meantime, I'm interested in any thoughts you have on my other
>> > points.
>>
>> As I wrote, I think it is important that the dialogs work on all
>> current screens, and in general, I think 800x600 is still a good
>> maximum for dialogs.
>>
>> As to scrollbars, I don't think this is a good idea. This is not usable
>> without the mouse (and I doubt it can be elegantly done with Qt).
>>
>> When I did the redesign, I really tried several options. It was _not_
>> possible to design a dialog of the proper size without using a
>> pane/tabbar or toolbox. I selected the latter, since it is the most
>> space-saving option and it does not introduce any extra-clicks.
>>
>> Of course any redesign is annoying since you have to get used to the
>> new UI, but we have to make the dialogs work for everybody.
>>
>> Any points I missed?
>>
>> Jürgen
>
>
>


Re: GUI changes for inserting citations in 2.2x

2016-09-07 Thread Maria Gouskova
I had to do a bit of research just now to figure out what things used to
look like vs. how they look now.

By default, the first thing you see on a Mac now (this is 10.8 for sure but
also 10.10, I think?  can't remember my office Mac's OS version):
[image: Inline image 1]

The "Search Citation" field is hidden from view, where before it was open
on first view. It still is on my not-yet-upgraded Linux machine.

The "Formatting" options were hidden in the older view until a citation was
selected. They are open by default now, but I think that's a little
misleading since one should not want to or be able to format a citation
when none are selected yet.

The other misleading thing about the current GUI dialog is that the one
field that's visible and looks like it could be typed in is the citation
preview field.

Maria

On Wed, Sep 7, 2016 at 2:06 AM, Jürgen Spitzmüller  wrote:

> Am Dienstag, den 06.09.2016, 23:56 -0600 schrieb Joel Kulesza:
> > In the meantime, I'm interested in any thoughts you have on my other
> > points.
>
> As I wrote, I think it is important that the dialogs work on all
> current screens, and in general, I think 800x600 is still a good
> maximum for dialogs.
>
> As to scrollbars, I don't think this is a good idea. This is not usable
> without the mouse (and I doubt it can be elegantly done with Qt).
>
> When I did the redesign, I really tried several options. It was _not_
> possible to design a dialog of the proper size without using a
> pane/tabbar or toolbox. I selected the latter, since it is the most
> space-saving option and it does not introduce any extra-clicks.
>
> Of course any redesign is annoying since you have to get used to the
> new UI, but we have to make the dialogs work for everybody.
>
> Any points I missed?
>
> Jürgen


Re: GUI changes for inserting citations in 2.2x

2016-09-07 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 23:56 -0600 schrieb Joel Kulesza:
> In the meantime, I'm interested in any thoughts you have on my other
> points.

As I wrote, I think it is important that the dialogs work on all
current screens, and in general, I think 800x600 is still a good
maximum for dialogs.

As to scrollbars, I don't think this is a good idea. This is not usable
without the mouse (and I doubt it can be elegantly done with Qt).

When I did the redesign, I really tried several options. It was _not_
possible to design a dialog of the proper size without using a
pane/tabbar or toolbox. I selected the latter, since it is the most
space-saving option and it does not introduce any extra-clicks.

Of course any redesign is annoying since you have to get used to the
new UI, but we have to make the dialogs work for everybody.

Any points I missed?

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Joel Kulesza
On Tue, Sep 6, 2016 at 11:36 PM, Jürgen Spitzmüller  wrote:

>
> Not that I know. If it is, it would be a rather grave UI problem for
> Mac users.
>
> Maybe someone who actually has a Mac can help.
>
>
Sounds good.  Thanks for looking into it.  Hopefully one of the OSX-centric
developers can weigh-in and/or tell me how I'm misusing Alt-S with the
current implementation.  In the meantime, I'm interested in any thoughts
you have on my other points.


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 23:29 -0600 schrieb Joel Kulesza:
> On Tue, Sep 6, 2016 at 11:19 PM, Jürgen Spitzmüller 
> wrote:
> > Am Dienstag, den 06.09.2016, 23:15 -0600 schrieb Joel Kulesza:
> > > On OSX, Alt-S does nothing.  Same for Control-S and Command-S.
> > 
> > I don't have OS X, so I can't check.
> 
> I'm ignorant on the subject of Qt accelerators.  Is this a known
> (dys)function on OSX?  

Not that I know. If it is, it would be a rather grave UI problem for
Mac users.

Maybe someone who actually has a Mac can help.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Joel Kulesza
On Tue, Sep 6, 2016 at 11:19 PM, Jürgen Spitzmüller  wrote:

> Am Dienstag, den 06.09.2016, 23:15 -0600 schrieb Joel Kulesza:
> > On OSX, Alt-S does nothing.  Same for Control-S and Command-S.
>
> I don't have OS X, so I can't check.
>

I'm ignorant on the subject of Qt accelerators.  Is this a known
(dys)function on OSX?  Is there a way that this can be modified so all
users can benefit?


>
> > It's a shame that this shortcut (accelerator?) isn't what I believe
> > is more common: Control-F / Command-F.
>
> Well, the label string is "Search Citation", so we cannot use an F.
> Accelerators in the dialog always use Alt and one letter of the widget
> label.
>

My thought was that one can change the label "Search Citation" to "Find
Citation".  Regrettably, this will entail some translation effort but I
believe this is unambiguous and is consistent with Edit -> Find within LyX
and myriad other applications.


>
> (Note that I am not talking about the shortcut to open the search
> dialog)
>
>
I'm unsure how to use Alt-S then.  When I expand search and enter
something, Alt-S gives me "ß" (Control-S and Command-S have no function).

> As the ticket has it: 1024x600 px.

(Bringing the two threads into one).  Thank you for pointing to that.  I
also saw discussion on 1024x768 and wondered if that resolution was also
affected.  I was curious what "standard" resolutions were affected (which
might suggest how many users were affected).


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 23:18 -0600 schrieb Joel Kulesza:
> > > On Tue, Sep 6, 2016 at 11:16 PM, Jürgen Spitzmüller 
wrote:
> > 
> > Too small is too small for current screens.
> > 
> > 
> 
> > > That is not a satisfying answer.  Please indicate what resolution(s)
the dialog was found incompatible with.  I am genuinely curious and
am trying to better understand the issue.
> 
> 

As the ticket has it: 1024x600 px.

Jürgen


signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 23:15 -0600 schrieb Joel Kulesza:
> On OSX, Alt-S does nothing.  Same for Control-S and Command-S.

I don't have OS X, so I can't check.

> It's a shame that this shortcut (accelerator?) isn't what I believe
> is more common: Control-F / Command-F.

Well, the label string is "Search Citation", so we cannot use an F.
Accelerators in the dialog always use Alt and one letter of the widget
label.

(Note that I am not talking about the shortcut to open the search
dialog)

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Joel Kulesza
On Tue, Sep 6, 2016 at 11:16 PM, Jürgen Spitzmüller  wrote:

>
> Too small is too small for current screens.
>
>
That is not a satisfying answer.  Please indicate what resolution(s) the
dialog was found incompatible with.  I am genuinely curious and am trying
to better understand the issue.


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 23:11 -0600 schrieb Joel Kulesza:
> To my question earlier: how small is too small?  The ticket
> references netbooks. 

Too small is too small for current screens.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Joel Kulesza
On Tue, Sep 6, 2016 at 11:10 PM, Jürgen Spitzmüller  wrote:

>
> It is not an extra click. Previously, you had to click in the search
> field in order to search (= 1 click). Now you have to click on the
> "Search" header. This sets the cursor into the search field (i.e.,
> still 1 click). No extra click.
>

I see, that subtlety was lost on me.


>
> Same with keyboard: Alt+S still immediately lets you search.
>

On OSX, Alt-S does nothing.  Same for Control-S and Command-S.

It's a shame that this shortcut (accelerator?) isn't what I believe is more
common: Control-F / Command-F.


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Joel Kulesza
On Tue, Sep 6, 2016 at 11:03 PM, Jürgen Spitzmüller  wrote:

>
> The dialog was too large for small screens. We had a bug report about
> that.
>
>
I read http://www.lyx.org/trac/ticket/9618 from Guillaume's earlier message
in this thread (unfortunately, the screen capture is no longer available
because it was not attached to the ticket).  To my question earlier: how
small is too small?  The ticket references netbooks.  Following on
Richard's comment in the ticket: do we have a realistic feeling for how
many users were afflicted by this (I don't want to propose excluding users,
but the cure may be worse than the disease).

Would an alternate solution be acceptable such as a scroll area?  For
example: users who don't suffer from this might never see scroll bars, but
the ones (few?) that do can scroll as needed (eliminating a click but
causing a scroll).  I also envision this being a more elegant, and easier
to implement, fix for other large-footprint dialog boxes.


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 21:10 -0600 schrieb Joel Kulesza:
> To the argument that there are no extra clicks, I disagree.  If I
> open Insert -> Citation and never use Formatting, but always use
> Search, I need to click and expand search before I can proceed for
> each session.  Yes, it is just one extra click.  But it is one I
> don't like to have to make.

It is not an extra click. Previously, you had to click in the search
field in order to search (= 1 click). Now you have to click on the
"Search" header. This sets the cursor into the search field (i.e.,
still 1 click). No extra click.

Same with keyboard: Alt+S still immediately lets you search.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 19:23 -0700 schrieb Pavel Sanda:
> Is this how it was supposed to look?

Yes.

Jürgen


signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Jürgen Spitzmüller
Am Dienstag, den 06.09.2016, 16:20 -0400 schrieb Maria Gouskova:
> So I was wondering what the motivation was
> for the change

The dialog was too large for small screens. We had a bug report about
that.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Richard Heck
On 09/06/2016 10:23 PM, Pavel Sanda wrote:
> Guillaume Munch wrote:
>> The tabs look differently depending on the platform, this may explain
>> why on yours it does not invite clicks. To be sure that I understand
>> your description, "Search" and "Formatting" cannot be hidden
>> simultaneously, can they? A screenshot of the dialog in a state that you
>> find confusing would help.
> It looks very weird on my screen (qt 4.8, plastique style), two labels of 
> tabs are not in two columns/one row as one would expect but in two rows and 
> one column. It took me a minute to actually realize it is just tabbar with 
> vertical
> instead of horizontal stacking. It also loses vertical space compared to one 
> row tabbar. 
> Is this how it was supposed to look?

I don't know, but it is essentially the same here. It is a consequence
of the decision to use a QToolBox rather than a QTabWidget. The latter
has the tabs side by side instead of stacked.

Presumably, this would be pretty easy to change.

Richard



Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Pavel Sanda
Guillaume Munch wrote:
> The tabs look differently depending on the platform, this may explain
> why on yours it does not invite clicks. To be sure that I understand
> your description, "Search" and "Formatting" cannot be hidden
> simultaneously, can they? A screenshot of the dialog in a state that you
> find confusing would help.

It looks very weird on my screen (qt 4.8, plastique style), two labels of tabs
are not in two columns/one row as one would expect but in two rows and one
column. It took me a minute to actually realize it is just tabbar with vertical
instead of horizontal stacking. It also loses vertical space compared to one
row tabbar. 
Is this how it was supposed to look?

Pavel


Re: GUI changes for inserting citations in 2.2x

2016-09-06 Thread Guillaume Munch

Le 06/09/2016 à 21:20, Maria Gouskova a écrit :

Hi developers,

I just upgraded to 2.2.1 today. I can see that there have been a lot of
changes in the appearance of the interface, so obviously quite a lot of
work went into the redesign. I confess I was stumped, though, when I
went to insert a citation. The "Search" and "Formatting" options are
hidden, and it's done in such a way that if I didn't know that they were
there, it would not occur to me that those areas of the window were
clickable.



Hi Maria,

I had a similar reaction the first time, however when I read the
archived discussions I got convinced that the new interface with tabs
was well thought-out (http://www.lyx.org/trac/ticket/9618). Clicking on
a tab selects the most useful field ("search" and "text after") so there
is no wasted click. This also works with the keyboard accelerators.

The tabs look differently depending on the platform, this may explain
why on yours it does not invite clicks. To be sure that I understand
your description, "Search" and "Formatting" cannot be hidden
simultaneously, can they? A screenshot of the dialog in a state that you
find confusing would help.



So I was wondering what the motivation was for the change--I
can see that it's a "cleaner" look, but I think it really hampers the
usability of the GUI, especially for new users.


As I understand, taking less space and having enough accelerators for
all the fields.



On a more practical note, is there a way to customize the thing so that
the search and formatting options stay visible by default?


Having them visible at the same time is not possible without a lot
of work, as I understand (unless we go back to a flat dialog). But it
should be easy to remember across sessions the last open tab (so that
people who only use search do not have to open that tab every time —
though as I said it will not reduce the amount of clicks).

My opinion is that the search interface could be made simpler and more
prominent (similar to the filter of the outliner). Then it becomes less
of a concern if less important options are hidden inside tabs. But for
short-term improvements, suggestions are welcome!

Guillaume