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

QueueTools: Add filtering and revamp select #247

Open
Venefilyn opened this issue Mar 5, 2020 · 0 comments
Open

QueueTools: Add filtering and revamp select #247

Venefilyn opened this issue Mar 5, 2020 · 0 comments

Comments

@Venefilyn
Copy link
Member

Expanding on #218, there was discussion in Discord about my proposal of doing filtering instead of selecting and moving some select actions to the select-all checkbox. That way I can more easily see what I'm selecting before approving since I'm first doing filtering and then manually selecting. Current implementation is ambiguous to what you're actually selecting if you have a lot of things. There is no feedback to what you're approving/removing unless you go through everything. With filter then select you can more clearly see what's going on.

UX Implementation would be similar to this PatternFly demo. You would have a select all with dropdown functionality, as well as a select dropdown and changing field.

image

For the select-all dropdown you would have current select actions of

  • shadow-banned,
  • spam-filtered,
  • all comments,
  • etc.

Dropdown with changing field would be the filtering part. A left-most dropdown with different options, and a changing field on the right that could be an input or dropdown.

Implementation of the select dropdown and changing field can be as follows:

// Create a key-value map
const typeMap = new Map();
// key being part of left dropdown, value being what type of input
typeMap.set('Subreddit', 'input');
// value could also be a custom element instead of input
// that way we could use id, class, etc. to customize better
// otherwise, if we had string the UI generator we would 
// generate id based off of key
let someDiv = document.createElement('div');
typeMap.set('Subreddit', someDiv);

// callback function that is called when value is changed
let onChange = ([key, value]) => {
  // apply filter to list of filters or update existing filter of key-value pair
  // filter list then filters down visible items
}

// in TBUi
function filterSelect(typeMap, onChange) {
  // Render dropdown on left
  // Render mapped value on right
  // On enter/submit/select, call callback with value-pair and input value
}

Moreover, we could technically support both filtering and selecting in a setting. Which would mean that for selecting we can change filtering icon to something else and functionality of select to continually narrow the selection based on the entries

@Venefilyn Venefilyn changed the title Change queuetools to filtering instead of select QueueTools: Add filtering and revamp select Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant