-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: field replace #21419
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
fix: field replace #21419
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #21419 +/- ##
===========================================
- Coverage 63.86% 63.85% -0.02%
===========================================
Files 765 765
Lines 69353 69364 +11
Branches 6271 6272 +1
===========================================
- Hits 44291 44289 -2
+ Misses 21487 21485 -2
- Partials 3575 3590 +15
Flags with carried forward coverage won't be shown. Click here to find out more. |
3212710
to
5f76e97
Compare
something's still missing here. |
7592cbe
to
bafadf0
Compare
bafadf0
to
ecec197
Compare
@shariquerik I just rebased on latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the PR description, it's not clear to me, what you are trying to achieve with this PR.
Some nitpicks:
- The PR title should follow the conventional commit style
- The variable names (
fieldobj
,oldfieldobj
,olfldobj
) are hard to read and make sense of
@barredterra this is a fix for an issue not covered by a test case. I'd usually have supplied a failing one, but I'm not yet proficient enough, so bear with me 😄
Ah! PR Title! Yeah, saw a reference to some pecularities somewhere, thanks for reminding me! Variable names: ack! 👀 |
How could I unit-test DOM initialization? I'm not sure how much of a public API the implementation exposes. While looking at it, it seemed all a bit private api, so not sure how I'd approach a testcase without being sent on an integration test tangent. But maybe there's a way? |
e46307e
to
5b24bce
Compare
splice needs an (integer) index not an element also section field management must be taken into account for all sections
5b24bce
to
60231c7
Compare
@shariquerik @barredterra So what's the game plan for this PR?
Imo, this is ready to merge. |
@shariquerik Thanks for the fix! And thanks for motion to merge! |
@blaggacao Can you resolve the conflicts in backported PR? |
…-21419 fix: field replace (backport #21419)
Prior to this PR, replace_field did simply not work. Because:
This PR uses the correct integer for splicing and also manages sections, columns and tabs
according to the original field that is being replaced so that the field remains at the same
location in the layout.
works blissfully in tandem with #21322 :
And a custom controller: