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

Add configurable selection restrictions to FilePicker and simplify custom tab configuration #1214

Open
AFaust opened this issue Aug 28, 2016 · 2 comments

Comments

@AFaust
Copy link
Contributor

AFaust commented Aug 28, 2016

The common use case of the YUI object-finder picker was to allow picking files (and folders!!) with selectability restricted based on the type of the node and required type of a field. It should be possible to easily configure the FilePicker module (without re-configuring all the constituent views), to define rules / conditions for the selectability of items.

Ideally, it should be possible to:

  • support selection of any type of node, i.e. files / folders as well as other kinds of nodes (custom view may need to be provided by developer for custom structure traversal)
  • restrict selectability of nodes based on the type, an aspect (both supported by legacy picker) or custom renderFilter rules based on state (i.e. property comparisons)
  • remove/reorder tabs or add custom tabs to the picker without duplicating (copy&paste) the entire widgetsForDialog config structure

With these requirements in mind, I'd refactor the picker to extract form control functionality, selection rule handling and aggregation of tabs into a base picker module, use mixins for "add-in" pre-defined tabs and one pre-defined "FileFolderPicker" (equivalent to the current "FilePicker") which extends from the base picker and mixes in all the tab mixins. This could in the future also form the base of a complex authority picker (instead of just the simple MultiSelectInput config currently used in the FormsRuntimeService. Developers could use the base picker to build use-case specific pickers without inheriting all the baggage of tabs they don't need.

@draperd
Copy link

draperd commented Aug 30, 2016

Thanks for the input on this, I can add some feature request issues in JIRA but to be honest at the moment my primary focus is in providing something that enables us to make progress with the forms runtime service. That's not to say that these aren't good ideas and shouldn't be implemented, but at the moment I just need something that works for the moment.

I agree that the correct approach is to abstract the re-usable parts into other modules that can be extended and mixed in.

I'm not sure how quickly I'll be able to get this done though.

@draperd
Copy link

draperd commented Nov 7, 2016

I've created https://issues.alfresco.com/jira/browse/AKU-1110 to address this

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

No branches or pull requests

2 participants