Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controls to limit export to a specific user #5775

Closed
dwhly opened this issue Aug 29, 2023 · 6 comments
Closed

Controls to limit export to a specific user #5775

dwhly opened this issue Aug 29, 2023 · 6 comments

Comments

@dwhly
Copy link
Member

dwhly commented Aug 29, 2023

We need to allow users to limit the annotations they export to "my" annotations, another specific users, or to everyone. We'll develop a fuller description and some UX as this issue develops;

@dwhly dwhly changed the title Import controls to limit export to a specific user Controls to limit export to a specific user Aug 29, 2023
@jaredpdesigns
Copy link

Here is the revised mocks:

export-revised

Notes:

  • Only selected value shows the quantity of annotations to make it clear how many will be exported.
  • Dropdown for selecting the user includes the following sections:
    • Me (default selected)
    • All Annotations
    • List of users proceeded by a search input
    • Creating a search will reduce the list of users
    • Selecting one of the options in the dropdown will close the dropdown and update the value of annotations

@acelaya
Copy link
Contributor

acelaya commented Aug 30, 2023

Can I suggest doing a couple of iterations on this?

  1. First we focus on supporting "export my annotations" and "export all annotations".
  2. Then we extend it with support to export any user's annotations.

The main reasons are to make sure we have point 1 done this week, and because for point 2 we will need to put some extra work on building the UI components we don't currently have.

@robertknight
Copy link
Member

I would prefer to start by using the existing Select control from Hypothesis's pattern library, which is what the Import tab uses. As Alejandro noted, this doesn't currently support customizing item appearance or adding complex non-static controls, and that is a fair amount of work to do. In a version using the existing control, the dropdown menu can work the same way as the Import menu, but the first item would be "All users" rather than blank (no user). Pre-selection of the current user would work the same way as in the Import tab.

If we do a custom design for the annotation count and the items, we should look at rolling the same design into the Import tab as well for harmony.

In other words, rather than slicing this work by functionality, it could be done in steps like this:

  1. Initial version that uses the same select component as the Import tab
  2. Create custom picker with static menu items, supporting customization of static item appearance
  3. Add search capabilities to the dropdown

Where step (1) is a known and modest amount of work, and the other steps involve more uncertainty and a lot more iteration.

For a custom picker, we might be able to leverage some of the work done for the client's existing drop-down menus, but I'm not sure how much. In terms of existing references to look at for accessibility and keyboard interaction, we can use React Spectrum's Picker.

@jaredpdesigns
Copy link

@robertknight @acelaya agree a multi-phased approach makes sense. I figured a custom control was a heavier lift. Also planned for this to support the import control as well.

FWIW was also thinking there would be a threshold for the search showing up of at least 5 or more users.

@acelaya acelaya self-assigned this Aug 31, 2023
@acelaya
Copy link
Contributor

acelaya commented Aug 31, 2023

I'm going to start with phase 1

  1. Initial version that uses the same select component as the Import tab

@acelaya
Copy link
Contributor

acelaya commented Sep 20, 2023

Since the main capability described here is already implemented by #5779, I'm going to close this issue.

The missing UI improvements will be tracked by #5841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants