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

Quick Browse #3

Open
laceysanderson opened this issue Mar 17, 2018 · 6 comments
Open

Quick Browse #3

laceysanderson opened this issue Mar 17, 2018 · 6 comments

Comments

@laceysanderson
Copy link
Member

The intent of this field is direct the user to a partially filtered search for more extensive browsing. In order to simplify the field, the design calls for a "Browse by [drop-down]". Based on what type of browser is selected from this drop-down, the user is given a tailored form.
screen shot 2018-03-17 at 3 37 08 pm

@laceysanderson
Copy link
Member Author

laceysanderson commented Mar 17, 2018

The admin would be able to configure

  • the path the user is redirected to when the browse button is clicked
  • the key to use in the url query string per type
  • which form elements to use per type: list, checkboxes, radios
  • auto-submit or show button

screen shot 2018-03-17 at 5 30 32 pm
The "Add Browser Type" button adds an additional fieldset.

@laceysanderson
Copy link
Member Author

Wireframes showing the types of forms:
screen shot 2018-03-17 at 3 50 01 pm
screen shot 2018-03-17 at 3 52 28 pm
screen shot 2018-03-17 at 3 53 34 pm

@laceysanderson
Copy link
Member Author

Decided to switch the browse field to pull options from a custom table/materialized view rather then hard-coding them. That way there is a lot more flexibility for options to vary per page.

@laceysanderson
Copy link
Member Author

This has been started on branch 3-quick_browse :-)

@laceysanderson
Copy link
Member Author

laceysanderson commented May 13, 2018

New design for storing of options

It was decided the original option storage plan was too intensive for admins. Furthermore, I came up with a table structure that I hope will work for most cases.

Two options will be supported by the module:

  1. Options are constant for each field instance.
    • Options will be stored in trpfancy_browse_options
    • Options can be set when the field is first created and edited on any entity edit form
    • This option is less intensive for the administrator since options only need to be set once
    • Not always appropriate since if not all options are defined for all entities, your user
      might end up at an empty browser
  2. Options will be specific to the entity/field instance combination.
    • Options will be stored in trpfancy_browse_options_per_entity
    • Options must be set on the entity edit form for each entity
    • What do we do if they're not set? Should we allow the admin to set a default on the
      field instance form? Should we not show the browse field?
    • More intensive for admins but ensures that the options are specific to the entity
    • Ideal for content types with few entities (e.g. organism)
    • Maybe allow this to be populated via a query to make it less intensive for admins?

@laceysanderson
Copy link
Member Author

laceysanderson commented Jun 22, 2018

Decided not to create a UI for setting options at this time. The above tables (trpfancy_browse_options & trpfancy_browse_options_per_entity) exist and will be used. Admin are instructed on how to add options to the database manually.

Todo:

  • support options in trpfancy_browse_options
  • support entity-specific options in trpfancy_browse_options_per_entity
  • if no option for a given entity, default to trpfancy_browse_options
  • implement front-end design for the field
  • show admin their current options on field edit page so they can verify they added them correctly.

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

1 participant