Note that the following has nothing to do with the improved Area Join, and is only about a specific part of the new "Area Close" operator. Let me explain…
Since we are now able to join any area to any neighboring area, this has allowed us to add a “Close” operation. But since any area can be subsumed by any neighbor, we also have to choose which one. This should be able to follow a user’s intuition. Unfortunately, the current neighbor selection does not select the obvious one in some cases.
This example was pointed out by @Daniel Salazar (zanqdo) :
The above works as expected for all areas except for closing Timeline at the bottom, as it is replaced by Properties. The following illustrates why the current algorithm lets us down. Because it is only concerned with total amount of misalignment it considers "Properties" a better candidate because A is shorter than B or C.
Obviously, this is not what you would intuitively guess or want to happen. Looking at this you might guess that Timeline is about half-aligned with either 3DView, but only about a quarter aligned with Properties. This because we are comparing the ratios of the shared edges. And that is what this patch does instead of using absolute lengths.
This gives the expected result in all cases I have thrown at it. And of course this specific test case as well:


