Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add option to resize Cover Block #17143
I don't have time to review this today, will look tomorrow. But I think @kjellr wants to look at this.
Even from the GIF it also seems clear that we'll want to adjust how the sibling inserter works here. In a related case, a good friend of mine suggested that maybe we adjust the sibling inserter (the plus that appears on hover) to not appear until 2 seconds has passed, something in that vein. Another option is to disable it when the block above has resize handles. Or is selected. There are a few ways to go here, but it feels like a key issue to solve before we roll out such a vertical handle.
Wouldn't this be better if it changed the min-height rather than height? Imagine mobile viewports where the content spans more lines because of less horizontal space.
Also, does the
those are some very good points @oxyc that I haven't consider.
A second implementation that I didn't upload yet, changes height to min-height, as for the hardcoded min height, I guess I should differ to something more absolute, 20 or 50px sounds reasonable to not get a invisible block and still over wide arrangements.
after giving the code a second look, and with @jorgefilipecosta review, I guess I was just too damn tired yesterday
I've changed the behavior, 430 is not the min height now but the default one. in the future we might abstract it even more to be a theme option, if there is a better option for now I'm all ears to implement it.
the new min value is arbitrarily set to 50px, no strong feeling toward this value, just seemed small enough to not restrict and big enough so the cover is not invisible.
Also now we change the min height & not the height, should fix a lot of compatibility problems.
the input logic has been heavily inspired (read: literally copied & changed variable names) from the spacer block #14785, thank you @Jackie6 & @talldan for the awesome work solving all of those problems for me before hand.
I think this is ready for a final review
jorgefilipecosta left a comment
Excellent work @senadir
Here are some possible improvements I noticed: