Mapping UX table breaks

Created on 8 November 2020, about 4 years ago
Updated 31 January 2024, 12 months ago

Problem/Motivation

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.

Proposed resolution

Refactor the form UX to use a table.

Remaining tasks

Merge Request is here: https://git.drupalcode.org/project/salesforce/-/merge_requests/9

User interface changes

Salesforce Mapping UX fields page becomes a table, allows for re-ordering fields, and for adding multiple new fields between saves.

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs work

Version

5.0

Component

salesforce_mapping_ui.module

Created by

πŸ‡ΊπŸ‡ΈUnited States gcb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024