pharo-graphics / Bloc

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

Bloc depends on Bloc-Compositor :( #87

Closed Ducasse closed 1 year ago

Ducasse commented 3 years ago

BlElementBoundsUpdater is calling compositionDepth and compositionDepth is packaged in BlCompositor.

BlElementBoundsUpdater >> commitChanges
    | theAssociations theElements theRoots |

    theAssociations := (changes associations sorted: [ :a :b | a key compositionDepth > b key compositionDepth ]).

    theAssociations ifNotEmpty: [
        theAssociations first key telemetry
            timeSync: [ 'commitChanges' ]
            during: [ 
                theAssociations do: [ :eachAssociation | eachAssociation value commitLocalChanges ].

                theElements := theAssociations
                    select: [ :eachAssociation | eachAssociation value isPositionChanged ]
                    thenCollect: [ :eachAssociation | eachAssociation key ].

                theRoots := BlSpace extractRoots: theElements.
                theRoots do: [ :eachRootElement |
                    eachRootElement telemetry
                        timeSync: [ 'onPositionInSpaceChanged ', eachRootElement class name ]
                        during: [ eachRootElement withAllChildrenBreadthFirstDo: [ :eachChild | eachChild onPositionInSpaceChanged ] ] ]  ] ]
Ducasse commented 3 years ago

The baseline of bloc is then wrong

baseline: spec

spec for: #'common' do: [ spec postLoadDoIt: #'postLoadBloc:'. spec baseline: 'Beacon' with: [ spec repository: 'github://feenkcom/pharo-beacon/repository' ]; baseline: 'Fenster' with: [ spec repository: 'github://feenkcom/fenster/src' ]; baseline: 'Sparta' with: [ spec repository: 'github://feenkcom/Sparta/src' ]; baseline: 'Glutin' with: [ spec repository: 'github://feenkcom/gtoolkit-glutin/src' ]. spec package: #Bloc with: [ spec requires: #(#Beacon Fenster) ]; package: #'Bloc-Animation' with: [ spec requires: #(#Bloc) ]; package: #'Bloc-Layout' with: [ "animation is required by animated layouts" spec requires: #(#Bloc #'Bloc-Animation') ]; package: #'Bloc-Text' with: [ spec requires: #('Bloc'). ]; package: #'Bloc-Text-Rope' with: [ spec requires: #('Bloc' 'Bloc-Text') ]; package: #'Bloc-Text-Elements' with: [ spec requires: #('Bloc' 'Bloc-Text' 'Bloc-Text-Rope'). ]; package: #'BlocHost-Mock' with: [ spec requires: #(#Bloc). ]; package: #'BlocHost-Morphic' with: [ spec requires: #(#'Bloc') ]; package: #'Bloc-Tests' with: [ spec requires: #(#Bloc 'BlocHost-Mock' ). ]. spec package: #'BlocHost-Mock' with: [ spec requires: #(#Bloc). ]; package: #'BlocHost-Glutin' with: [ spec requires: #(#Bloc #Fenster #Glutin) ]. "Compositor" spec package: #'Bloc-Compositor' with: [ spec requires: #(#Bloc 'Sparta'). ]. spec package: #'Bloc-Sparta' with: [ spec requires: #('Sparta' 'Bloc' 'Bloc-Text' 'Bloc-Text-Elements' 'Bloc-Compositor'). ]; package: #'Bloc-Exporter' with: [ spec requires: #(#Bloc 'Bloc-Sparta' ). ]. spec package: #'Bloc-DevTool' with: [ spec requires: #(#Bloc #'Bloc-Layout' 'Bloc-Text-Elements' 'Bloc-Text-Rope'). ]; package: #'Bloc-Scripter' with: [ spec requires: #(#Bloc #'Bloc-Layout' #'Bloc-Exporter' #'BlocHost-Mock'). ] ].
Ducasse commented 3 years ago

BlBasicLayout >> testParentWithChildExactSize

tinchodias commented 1 year ago

This is issue not valid in current dev-1.0 branch, commit 1d3bda51218edaa13cac7847b728866cd58735c9

The only implementor of compositionDepth is BlElement>>#compositionDepth, that belongs to Bloc package.