Fix param handling for nested embeds#132
Conversation
16d7b24 to
ed3e4fa
Compare
|
This PR seems to fix some of the immediate form validation problems I was having (even though the issue you were mentioning this PR in (#113) is about There seems to be one failing test though I am not sure why this is happening though, as right now I didn't dive deep enough into phoenix form handling yet. Maybe it is happening because recent changes in phoenix html/form handling? Furthermore, you mentioned in #113 that there were issues with the sort params as well, specifically with the approach taken in this PR. Did you find some time to have another look at this yet @nduitz ? |
|
Hey there, One thing I noticed yesterday which caused me a lot of headaches was that |
Never mind my comment about |
|
I would love for this to be merged as we just ran into this today and are jumping through hoops to get around it. |
|
@coladarci @nduitz it is currently in Draft status and it has conflicts. Can anyone resolve and test this? |
|
My fix was off latest release but it appears master is pretty far ahead? I'll investigate how to apply my fix to latest master and open a new PR as a backup.. thanks for the reply! I love this library and find myself going to it in project after project! |
|
I am actually running another commit in prod right now that fixed all of my issues. Good thing is, I implemented tests for all problems I encountered. I will have a look at it next week, checkout the latest main, apply the tests and see if I can reproduce the issues and fix them again. |
ed3e4fa to
0459585
Compare
|
Nevermind, could do it now. 2fcfcbe and 0bd61b5 apply the fixes of the original PR But I can't remember in which cases. I could investigate more and create a minimal reproduction repo if you want. But that would take some time :) |
0459585 to
ee6d450
Compare
|
Thanks @nduitz !! Yeah I had issues with deeply embedded changesets being nuked. |
…within a <.polymorphic_embed_inputs_for /> (see mathieuprog#115 and mathieuprog#132 on upstream)
ee6d450 to
fb46fe6
Compare
|
With #115 now being merged, this only two commits could be dropped from this. I didn't realize I had another PR open actually :D It's been a while. Sorry for that |
|
I asked ChatGPT 5.4 xthink for a review and it says:
wdyt? |
This fixes two things:
a) It picks up the correct action (not from the changeset but from the parent form)
b) It fixes handling parameters for cardinality :many
If you remove the first commit you will see the test is failing and it will produce the incorrect form.
Instead of generating two forms per polymorphic type it will generate only one form for the
devicetype