ugent-library / biblio-backoffice

Apache License 2.0
7 stars 0 forks source link

When adding an author, automatically put the cursor in the "first name" field #883

Closed mietcls closed 1 year ago

mietcls commented 1 year ago

Enhancement

When adding an author, automatically put the cursor in the "first name" field.

Context: when librarians add people, it is an extra action to undertake and slows them down unnecessarily. If their cursor would already be in "first name" they can always use the tab to got "last name" if needed.

Current behaviour

  1. Go to any publication or dataset, and navigate to People & Affiliations
  2. Click "Add (author, editor, supervisor, ...)"
  3. To start searching for a person, first click on "first name" Image
  4. Start typing Image

Expected behaviour

  1. Go to any publication or dataset, and navigate to People & Affiliations
  2. Click "Add (author, editor, supervisor, ...)"
  3. Immediately be able to start typing in the "first name" field Image
nicolasfranck commented 1 year ago

Why not for every form? This is done often.

mietcls commented 1 year ago

After discussing:

nicolasfranck commented 1 year ago

Some behaviour I noticed when autofocusing a select box:

select_with_focus

Now use the scroll on your mouse:

select_after_scroll

So someone who uses his/her mouse to scroll down the page, accidentally scrolls down the selectbox.

To reproduce:

mietcls commented 1 year ago

@nicolasfranck is your mouse on the select box? I can't seem to reproduce it. We can call / or show me live.

mietcls commented 1 year ago

Is this one done, or is there something missing?

Edit: we decided to only do it for "first name" and will review the interaction as a whole. This issue is still relevant for now.

mietcls commented 1 year ago

The first- and last name search boxes are now switched.

Current behaviour:

First name search box looks for last name, last name search box looks for first name.

Expected behaviour:

First name search box remains in first place and looks for first name, last name search box remains in last name place and looks for last name.

mietcls commented 1 year ago

!! Leave as is right now, because:

We don't always have correct data now (e.g. people whose first name is surname and vice versa) - or we don't always know what is what (people with no surname or first name). So it is good to be forgiving, but we can break the odd pattern later (this is not consistent with expectations).

You would not expect to find "Jolien Danneels" when typing "Dann" in the first name area.

Scherm­afbeelding 2023-01-16 om 11 47 19

But keeping people from being able to find this can also be very blocking.