<commit_before>Class {
	#name : #BrSimpleListAptitude,
	#superclass : #BrAptitude,
	#traits : 'TBrListInfiniteElementScroll',
	#classTraits : 'TBrListInfiniteElementScroll classTrait',
	#instVars : [
		'listElement'
	],
	#category : 'Brick-List - Look'
}

{ #category : #'api - orientation' }
BrSimpleListAptitude >> beHorizontal [
	| anOldListElement |
	self listElement class = BrHorizontalInfiniteListElement ifTrue: [ ^ self ].
	anOldListElement := self listElement.
	listElement := BrHorizontalInfiniteListElement new.
	self replaceListElement: anOldListElement by: self listElement.
	self requestListConfiguration.
]

{ #category : #'api - orientation' }
BrSimpleListAptitude >> beVertical [
	| anOldListElement |
	self listElement class = BrInfiniteListElement ifTrue: [ ^ self ].
	anOldListElement := self listElement.
	listElement := BrInfiniteListElement new.
	self replaceListElement: anOldListElement by: self listElement.
	self requestListConfiguration.
]

{ #category : #initialization }
BrSimpleListAptitude >> initialize [
	super initialize.

	self initializeListElement.
	
	self add: (BrLayoutResizerAptitude new
		inherit;
		inherit: [ self listElement ]).
	
	self addChangeAddChildAs: #(content scrollable) with: [ self listElement ].

	self
		addChangeProperty: #(widgetContent layout)<commit_msg>When changing orientation propagate the list model to the data source of the new element.<commit_after>Class {
	#name : #BrSimpleListAptitude,
	#superclass : #BrAptitude,
	#traits : 'TBrListInfiniteElementScroll',
	#classTraits : 'TBrListInfiniteElementScroll classTrait',
	#instVars : [
		'listElement'
	],
	#category : #'Brick-List - Look'
}

{ #category : #'api - orientation' }
BrSimpleListAptitude >> beHorizontal [
	| anOldListElement |
	self listElement class = BrHorizontalInfiniteListElement ifTrue: [ ^ self ].
	anOldListElement := self listElement.
	listElement := BrHorizontalInfiniteListElement new.
	listElement dataSource 
		listModel: anOldListElement dataSource listModel.
	self replaceListElement: anOldListElement by: self listElement.
	self requestListConfiguration.
]

{ #category : #'api - orientation' }
BrSimpleListAptitude >> beVertical [
	| anOldListElement |
	self listElement class = BrInfiniteListElement ifTrue: [ ^ self ].
	anOldListElement := self listElement.
	listElement := BrInfiniteListElement new.
	listElement dataSource 
		listModel: anOldListElement dataSource listModel.
	self replaceListElement: anOldListElement by: self listElement.
	self requestListConfiguration.
]

{ #category : #initialization }
BrSimpleListAptitude >> initialize [
	super initialize.

	self initializeListElement.
	
	self add: (BrLayoutResizerAptitude new
		inherit;
		inherit: [ self listElement ]).
	
	self addChangeAddChildAs: #(content scrollable) with: [ self listElement ].

	self
		addChangeProperty: #(widgetContent layout)
{'fraction_non_alphanumeric': 0.09005235602094241, 'fraction_numerical': 0.0, 'mean_word_length': 5.484162895927602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2635691', 'n_tokens_mistral': 885, 'n_tokens_neox': 858, 'n_words': 213}