Skip to content

Fields UX refactor

Gabriel Carleton-Barnes requested to merge fields_ux_refactor into 8.x-4.x

The field UX in Salesforce Mapping has some issue that make it confusing to use: it requires custom CSS to lay itself out as a table, and that needs regular tweaking. The "add" behavior is inconsistent and buggy when adding multiple new fields without a save. The order of the fields is not editable, which is frustrating when you have a long list of fields and want to organize them for clarity.

This PR refactors the form to use a Drupal table. It uses the "id" property that fields already were carrying and turns it into a "weight", making it editable. (it's not yet able to use the JS-rearrange behavior, it just re-sorts on save). It also fixes the issue with adding multiple new fields at once.

Although this code rearranges the structure of the form elements and submission values a little, it doesn't change any of the underlying data structures, so this is 100% compatible with existing installations with no database updates needed.

Merge request reports