pharo-graphics / Bloc

Low-level UI infrastructure & framework for Pharo
MIT License
80 stars 40 forks source link

Cleanup: Merge BlGridLayoutImpl into BlGridLayout #573

Open tinchodias opened 1 month ago

tinchodias commented 1 month ago

BlGridLayoutImpl is only referenced from BlGridLayout's initialize, and then it's used by forwarding BlGridLayout's API to BlGridLayoutImpl.

This may be a reminiscence of a port from another library, as the Impl suffix is not common in Pharo.

tinchodias commented 1 month ago

Out of curiosity, I looked for the history. When you check for history of BlGridLayout methods in Calypso, you jump until the migration from Filetree to Tonel. I checked in an external tool for history before that commit, and the layouts were already in the beginning of this repo: 49d20c185c74395ce2c9c411fbcf3bacffdcd644 (~2016).

The original sources should be smalltalkhub. I looked in their archives and there are 2 candidates:

Maybe @plantec knows

tinchodias commented 1 month ago

Same happens between BlFlowLayoutMeasurer and BlFlowLayout.

plantec commented 1 month ago

ahh, ok. I think Glenn did it. A port from a java API I guess

tinchodias commented 1 month ago

This comment in linear layout lead me to Android (https://developer.android.com/reference/android/view/View.MeasureSpec) https://github.com/pharo-graphics/Bloc/blob/a5fe2d3cbb74fb5d01f472191d61f0637ddf939a/src/Bloc-Layout/BlLinearLayoutMeasurer.class.st#L262-L265

tinchodias commented 1 month ago

Additional info (weird): Both BlGridLayoutImpl and BlGridLayout are subclasses of BlLayout