open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
37 stars 26 forks source link

:alien: [#4693] Integrate Objects API prefill modal with backend #4799

Open stevenbal opened 3 weeks ago

stevenbal commented 3 weeks ago

Closes #4693

Changes

Checklist

Check off the items that are completed or not relevant.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.60%. Comparing base (e4fb7bb) to head (1e6ab24).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4799 +/- ## ========================================== + Coverage 96.58% 96.60% +0.02% ========================================== Files 749 749 Lines 25531 25531 Branches 3376 3376 ========================================== + Hits 24659 24665 +6 + Misses 608 604 -4 + Partials 264 262 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

stevenbal commented 3 weeks ago

@sergei-maertens I'm trying to fix the issue with the react-select menu being clipped, but I'm not sure how to fix it. I've tried setting a z-index, but that alone doesn't fix the issue. If I try using overflow: visible, I do see the full menu, but the rest of the modal breaks :/

current situation image with overflow image

Any ideas on how this can be fixed? Changing the menuPlacement to bottom will likely cause the same issue in the future, if the list of choices gets long enough

stevenbal commented 3 weeks ago

@sergei-maertens I've made the placement bottom and set a maxMenuHeight for the selects used in the modal to avoid overflow issues (https://github.com/open-formulieren/open-forms/pull/4799/commits/efb307d44275fbfdc6ab70e1dd87a68e8e181a18)

sergei-maertens commented 3 days ago

Rebased on master - I will now look at the state again and do a thorough review!

sergei-maertens commented 3 days ago

I'm not happy yet with the "copy configuration" button and this is a tough nut to crack. After some discussion/debate with Joeri, we've settled on something like this:

  1. When you open the prefill modal, you get the current state (with dropdowns likely empty if this is the initial configuration:

    image

    • A link is injected next to the 'plugin' field. This will require some interesting changes which we can discuss tomorrow, since you currently can't provide additional children for the plugin field... We can add a tooltip here that describes how it works/what it does for better documentation.
    • The registration backend dropdown is not visible at all
  2. The user clicks the link to copy the settings - this makes the registration dropdown visible:

    image

  3. Clicking the link again just collapse the form row again

  4. Selecting a backend and then clicking the 'copy' button performs the copy as it is right now, but also automatically collapses the form row again at the end to declutter the UI again.

Please also set up the styling properly so that the link and button are nicely aligned.