Repository navigation
Conversation
Co-Authored-By: Clanker
ActiveAdmin 4 puts no column classes on index cells, so the chooser keys a column by its position and names it by its header text. Co-Authored-By: Clanker
ActiveAdmin 4 replaced the form: option with a partial. The theme renders the fields as a confirm_dialog whose form ActiveAdmin 4's batch script submits, so the inputs keep their ActiveAdmin 3 keys and values. Co-Authored-By: Clanker
ActiveAdmin 4 dropped ActiveAdmin.ModalDialog with jQuery UI. Apps that check a batch selection on the server before the dialog opens can cancel aat:batch-form:open and open the dialog later. Co-Authored-By: Clanker
Covers what apps migrating from select2 used: a dragged order that the form submits, a value kept across a parent change when still offered, a param sent for an empty parent, and result attrs on the picked option. Co-Authored-By: Clanker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Theme 4 features after beta3, in one PR. It stays open while more land.
So far:
localStorage. It is off by default:ActiveAdminTheme.column_chooser = trueturns it on everywhere, andindex column_chooser:overrides one index. ActiveAdmin 4 puts no column classes on index cells, so a column is its position, named by its header text. The selection, id and untitled columns always show.batch_action form:. The theme brings it back in the ActiveAdmin 3 format, as aconfirm_dialogthat ActiveAdmin 4's batch script submits, so the inputs keep their keys and values.confirm:becomes the dialog message. Page objects getbatch_actions.apply(label, with: {...}). Before the dialog opens, a cancelableaat:batch-form:openevent lets an app check the selection on the server.ActiveAdmin.ModalDialog. An opt-in script brings back ActiveAdmin 3's function, which went with jQuery UI, with the same signature and input types.tom_select: {sortable: true}(the form sends the dragged order),{clear: false, search: false}, and an optionalsearchable_select_search_min_options. Dependent selects getdepends_keep_value:anddepends_empty_param:, and a result'sattrsbecome attributes of the picked<option>.v2.0.0.beta3.Checked with
bundle exec rake testagainst ActiveAdmin 4.0.0.beta23 and the layout-hooks branch: 438 runs each, no failures. The chooser's menu and both dialogs are hit-tested on a scrolled page with flash messages.