teammates icon indicating copy to clipboard operation
teammates copied to clipboard

Audit logs: support 'type to locate' in the student name drop-down

Open damithc opened this issue 3 years ago • 7 comments

image

This drop-down can be quite long. Can we support 'type to locate' ability here?

damithc avatar Apr 12 '21 05:04 damithc

An alternative is to pop-up a modal containing all students (possibly with more details such as team, email, section etc. -- somewhat similar to what we do in the 'Remind' feature) and advise the user to Ctrl+F to locate the name.

damithc avatar Apr 12 '21 05:04 damithc

The modal option makes it seem as if the instructor can search for multiple students?

I think the type to locate would be a more friendly option. Would imagine that a instructor using the page should know the student name he/she wants to search for (if using that filtering option).

t-cheepeng avatar Apr 12 '21 09:04 t-cheepeng

The modal option makes it seem as if the instructor can search for multiple students?

Depends on the content of the modal.

I think the type to locate would be a more friendly option. Would imagine that a instructor using the page should know the student name he/she wants to search for (if using that filtering option)

Sure, I'm fine with that too.

damithc avatar Apr 12 '21 09:04 damithc

@damithc

The typeahead looks something like this 123

Only appears whn > 1 character is typed and maximum of 10 names will appear. Is the 10 name limit okay? Or leave it unbounded?

t-cheepeng avatar Apr 14 '21 09:04 t-cheepeng

The typeahead looks something like this

I was expecting the dropdown to remain, and allow typing to narrow down the selection. Is that possible? In the end, this is meant to be a choice among options, not a free text entry.

damithc avatar Apr 14 '21 13:04 damithc

The easiest way is to use the <datalist> tag. But the issue is that the tag is styled very differently in browsers(which is expected but some browsers style it weirdly) and is buggy in older browsers like safari. See the attached below. Also, bootstrap does not style this tag for us so we cannot fall back on it.

Left: Firefox, right is Chrome. The dropdown arrow is missing in the firefox one but present in chrome 123

We could also manually toggle the dropdown and typing though that will take a while to get up and running

t-cheepeng avatar Apr 15 '21 09:04 t-cheepeng

Desirable properties, off the top of my head:

  1. User has a way use the dropdown, without having to type anything
  2. User cannot search for something that is not one of the available options
  3. What user types need not be at the start of the name
  4. Case should not matter
  5. There is some indication that the user can type-to-locate

damithc avatar Apr 15 '21 10:04 damithc