-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improve SitesNeighbourhoods selector #887
Conversation
a254c82
to
479b2b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
Is this loading neighbourhoods via ajax? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Make fuzzy search type input work on new selects
- All selects currently set to Abbey, Leics
- Make delete link just a link and tidy up UX a lil. i would put all of the inputs together in a fieldset
- Think we need to do something to make the site save buttons look bigger / more important than the secondary neighbourhoods buttons
… creation. So it is intended to be scrapped for another solution
…oods (update fails due to it still passing the neighbourhood_ids parameter l o l. so it is useless. Also probably singlehandedly the most disgusting code ive written lmaoo
… is 99% ready lol
… cocoon (does not work); Rename button
- Memoize parent_name in Neighbourhoods table - Add that to the Neighbourhoods datatables - Add try/catch block to datatable.js to stop errors appearing on pages that do not contain datatables - Remove filtering of primary id from options_for_sites_neighbourhoods - Correct Sites behaviours file to: - Properly add select2 to sites neighbourhoods relational inputs - Remove primary neighbourhood from form field input - Ensure primary neighbourhood selection uses select2 - Properly render SitesNeighbourhoods relation input form template
7fe7236
to
114896d
Compare
Rebased on main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- A few UX suggetions as per discord
- Add better description text under headings
- Fix create new site picker for main neighbourhood
Done :)
hmm it is not broken for me, it just doesn't display as a select2 element for whatever reason. Moved it to a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested controller tests:
- Create new site with primary neighbourhood only saves. Ditto for edit/update
- Create new site with both primary and secondary neighbourhood saves. Ditto for edit/update.
- Create new site with primary neighbourhood == secondary neighbourhood just saves the primary neighbourhood. Ditto for edit/update
- Same as above but with a few secondary neighbourhoods
- Primary neighbourhood is mandatory (might exist already)
Merged, controller tests created as another ticket |
* Add select2 to primary neighbourhoods form * Add select2 + cocoon to secondary neighbourhoods form * Memoize parent_name field in Neighbourhoods * Give neighbourhoods more context * Add try/catch block to datatable.js to stop errors appearing on pages that do not contain datatables * Remove filtering of primary id from options_for_sites_neighbourhoods * Correct Sites behaviours file to remove primary neighbourhood from form field input * Fix CSS on Cocoon * Buttons: Red. Descriptions: Added Co-authored-by: Dr Kim Foale <[email protected]>
Improves Secondary Neighbourhood selection in Sites Admin view
Fixes #885