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

Afform - Drag & drop fixes #20263

Merged
merged 1 commit into from
May 12, 2021
Merged

Conversation

colemanw
Copy link
Member

Overview

Fixes bugs related to dragging and dropping fields in the Afform Admin GUI.

Before

Possible to drag fields outside their fieldsets, breaking the UI.

After

Fields belonging to an entity constrained to fieldsets of that entity.

Technical Details

The drag-drop validation broke when af-gui-field was changed from a directive to a component, as the jQuery was looking for the wrong markup.

Comments

Additionally, this attempts to fix a hard-to-reproduce bug where the styling gets stuck in a "dragging" state after something has been dropped.

The drag-drop validation broke when af-gui-field was changed from a directive to
a component, as the jQuery was looking for the wrong markup.

Additionally, this attempts to fix a hard-to-reproduce bug where the styling
gets stuck in a "dragging" state after something has been dropped.
@civibot
Copy link

civibot bot commented May 10, 2021

(Standard links)

@civibot civibot bot added the master label May 10, 2021
@seamuslee001
Copy link
Contributor

I tested this on the PR test site and seems to work but I do not that with my test afform http://core-20263-1xio2.test-1.civicrm.org:8001/civicrm/admin/afform#/edit/afformTestCustomForm I wasn't able to re-order the fields which may be a consequence of this PR but not sure @colemanw

@colemanw
Copy link
Member Author

@seamuslee001 when I followed that link I was able to drag fields around within their own entity's fieldset, but I was not able to drag fields from the Activity fieldset into the Contact's fieldset, which is the goal of this PR. So it seems to be working.

@seamuslee001
Copy link
Contributor

@colemanw I was more thinking reordering the whole field set so that the Activity field set was above that of the Contact, I thought that was possible before

@colemanw
Copy link
Member Author

Oh yea. I see it now. That's not related to this PR, it seems to be a css issue that jQuery sortable doesn't have enough space in the top/bottom margins to drag things into. I'm trying (and getting frustrated) to adjust the css to make jQuery sortable happy. Will try again in the morning.

@seamuslee001
Copy link
Contributor

Merging based on that comment from Coleman

@seamuslee001 seamuslee001 merged commit dec8450 into civicrm:master May 12, 2021
@seamuslee001 seamuslee001 deleted the afformDragFix branch May 12, 2021 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants