From 2604fe237ccef77708f203214805c69346b1793e Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Wed, 29 Nov 2023 12:44:45 +0100 Subject: [PATCH] listview work moved to separated package (so I can merge without including, for the moment) --- .../SpMorphicListViewAdapter.class.st | 3 +-- .../SpMorphicListViewDataSource.class.st | 3 +-- .../package.st | 1 + src/Spec2-Core/SpTPresenterBuilder.trait.st | 18 ------------------ src/Spec2-Dialogs/SpApplication.extension.st | 5 +---- .../SpDropDownPresenter.class.st | 5 ++--- .../SpEasyListRowPresenter.class.st | 5 ++--- .../SpEasyListViewPresenter.class.st | 5 ++--- .../SpListViewPresenter.class.st | 5 ++--- .../SpTPresenterBuilder.extension.st | 19 +++++++++++++++++++ src/Spec2-ListView/package.st | 1 + 11 files changed, 32 insertions(+), 38 deletions(-) rename src/{Spec2-Adapters-Morphic => Spec2-Adapters-Morphic-ListView}/SpMorphicListViewAdapter.class.st (95%) rename src/{Spec2-Adapters-Morphic => Spec2-Adapters-Morphic-ListView}/SpMorphicListViewDataSource.class.st (93%) create mode 100644 src/Spec2-Adapters-Morphic-ListView/package.st rename src/{Spec2-Core => Spec2-ListView}/SpDropDownPresenter.class.st (97%) rename src/{Spec2-Core => Spec2-ListView}/SpEasyListRowPresenter.class.st (93%) rename src/{Spec2-Core => Spec2-ListView}/SpEasyListViewPresenter.class.st (98%) rename src/{Spec2-Core => Spec2-ListView}/SpListViewPresenter.class.st (95%) create mode 100644 src/Spec2-ListView/SpTPresenterBuilder.extension.st create mode 100644 src/Spec2-ListView/package.st diff --git a/src/Spec2-Adapters-Morphic/SpMorphicListViewAdapter.class.st b/src/Spec2-Adapters-Morphic-ListView/SpMorphicListViewAdapter.class.st similarity index 95% rename from src/Spec2-Adapters-Morphic/SpMorphicListViewAdapter.class.st rename to src/Spec2-Adapters-Morphic-ListView/SpMorphicListViewAdapter.class.st index 9b10b10e..44333deb 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicListViewAdapter.class.st +++ b/src/Spec2-Adapters-Morphic-ListView/SpMorphicListViewAdapter.class.st @@ -5,8 +5,7 @@ Class { #name : 'SpMorphicListViewAdapter', #superclass : 'SpMorphicListAdapter', #category : 'Spec2-Adapters-Morphic-ListView', - #package : 'Spec2-Adapters-Morphic', - #tag : 'ListView' + #package : 'Spec2-Adapters-Morphic-ListView' } { #category : 'factory' } diff --git a/src/Spec2-Adapters-Morphic/SpMorphicListViewDataSource.class.st b/src/Spec2-Adapters-Morphic-ListView/SpMorphicListViewDataSource.class.st similarity index 93% rename from src/Spec2-Adapters-Morphic/SpMorphicListViewDataSource.class.st rename to src/Spec2-Adapters-Morphic-ListView/SpMorphicListViewDataSource.class.st index a82a507d..ccc7a632 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicListViewDataSource.class.st +++ b/src/Spec2-Adapters-Morphic-ListView/SpMorphicListViewDataSource.class.st @@ -5,8 +5,7 @@ Class { #name : 'SpMorphicListViewDataSource', #superclass : 'SpMorphicListDataSource', #category : 'Spec2-Adapters-Morphic-ListView', - #package : 'Spec2-Adapters-Morphic', - #tag : 'ListView' + #package : 'Spec2-Adapters-Morphic-ListView' } { #category : 'accessing' } diff --git a/src/Spec2-Adapters-Morphic-ListView/package.st b/src/Spec2-Adapters-Morphic-ListView/package.st new file mode 100644 index 00000000..6ccea4bf --- /dev/null +++ b/src/Spec2-Adapters-Morphic-ListView/package.st @@ -0,0 +1 @@ +Package { #name : 'Spec2-Adapters-Morphic-ListView' } diff --git a/src/Spec2-Core/SpTPresenterBuilder.trait.st b/src/Spec2-Core/SpTPresenterBuilder.trait.st index dc5cbe7b..6383dbb3 100644 --- a/src/Spec2-Core/SpTPresenterBuilder.trait.st +++ b/src/Spec2-Core/SpTPresenterBuilder.trait.st @@ -80,12 +80,6 @@ SpTPresenterBuilder >> newDiff [ ^ self instantiate: SpDiffPresenter ] -{ #category : 'scripting - lists' } -SpTPresenterBuilder >> newDropDown [ - - ^ self instantiate: SpDropDownPresenter -] - { #category : 'scripting - widgets' } SpTPresenterBuilder >> newDropList [ ^ self instantiate: SpDropListPresenter @@ -107,12 +101,6 @@ SpTPresenterBuilder >> newDynamicPresentersListIn: accessorSymbol usingBuilder: self build ] -{ #category : 'scripting - lists' } -SpTPresenterBuilder >> newEasyListView [ - self flag: #TODO. "replace newList with this" - ^ self instantiate: SpEasyListViewPresenter -] - { #category : 'scripting - layouts' } SpTPresenterBuilder >> newGridLayout [ @@ -134,12 +122,6 @@ SpTPresenterBuilder >> newList [ ^ self instantiate: SpListPresenter ] -{ #category : 'scripting - lists' } -SpTPresenterBuilder >> newListView [ - - ^ self instantiate: SpListViewPresenter -] - { #category : 'scripting - widgets' } SpTPresenterBuilder >> newMenu [ ^ self instantiate: SpMenuPresenter diff --git a/src/Spec2-Dialogs/SpApplication.extension.st b/src/Spec2-Dialogs/SpApplication.extension.st index 59115c33..a5791566 100644 --- a/src/Spec2-Dialogs/SpApplication.extension.st +++ b/src/Spec2-Dialogs/SpApplication.extension.st @@ -24,10 +24,7 @@ SpApplication >> confirm: aString [ SpApplication >> inform: aString [ "Displays an inform dialog, for more configurable version please use `self application newInform title: ....`." - ^ self newInform - title: 'Alert'; - label: aString; - openModal + ^ self backend inform: aString ] { #category : '*Spec2-Dialogs' } diff --git a/src/Spec2-Core/SpDropDownPresenter.class.st b/src/Spec2-ListView/SpDropDownPresenter.class.st similarity index 97% rename from src/Spec2-Core/SpDropDownPresenter.class.st rename to src/Spec2-ListView/SpDropDownPresenter.class.st index 0c794a26..b4f9346d 100644 --- a/src/Spec2-Core/SpDropDownPresenter.class.st +++ b/src/Spec2-ListView/SpDropDownPresenter.class.st @@ -8,9 +8,8 @@ Class { 'display', 'selection' ], - #category : 'Spec2-Core-Widgets-ListView', - #package : 'Spec2-Core', - #tag : 'Widgets-ListView' + #category : 'Spec2-ListView', + #package : 'Spec2-ListView' } { #category : 'specs' } diff --git a/src/Spec2-Core/SpEasyListRowPresenter.class.st b/src/Spec2-ListView/SpEasyListRowPresenter.class.st similarity index 93% rename from src/Spec2-Core/SpEasyListRowPresenter.class.st rename to src/Spec2-ListView/SpEasyListRowPresenter.class.st index 1a679dff..afd87a74 100644 --- a/src/Spec2-Core/SpEasyListRowPresenter.class.st +++ b/src/Spec2-ListView/SpEasyListRowPresenter.class.st @@ -8,9 +8,8 @@ Class { 'iconPresenter', 'textPresenter' ], - #category : 'Spec2-Core-Widgets-ListView', - #package : 'Spec2-Core', - #tag : 'Widgets-ListView' + #category : 'Spec2-ListView', + #package : 'Spec2-ListView' } { #category : 'layout' } diff --git a/src/Spec2-Core/SpEasyListViewPresenter.class.st b/src/Spec2-ListView/SpEasyListViewPresenter.class.st similarity index 98% rename from src/Spec2-Core/SpEasyListViewPresenter.class.st rename to src/Spec2-ListView/SpEasyListViewPresenter.class.st index 6a31a0de..59915314 100644 --- a/src/Spec2-Core/SpEasyListViewPresenter.class.st +++ b/src/Spec2-ListView/SpEasyListViewPresenter.class.st @@ -11,9 +11,8 @@ Class { '#headerPanel', '#lastSelectedRow => WeakSlot' ], - #category : 'Spec2-Core-Widgets-ListView', - #package : 'Spec2-Core', - #tag : 'Widgets-ListView' + #category : 'Spec2-ListView', + #package : 'Spec2-ListView' } { #category : 'specs' } diff --git a/src/Spec2-Core/SpListViewPresenter.class.st b/src/Spec2-ListView/SpListViewPresenter.class.st similarity index 95% rename from src/Spec2-Core/SpListViewPresenter.class.st rename to src/Spec2-ListView/SpListViewPresenter.class.st index d30c177e..24da7809 100644 --- a/src/Spec2-Core/SpListViewPresenter.class.st +++ b/src/Spec2-ListView/SpListViewPresenter.class.st @@ -7,9 +7,8 @@ Class { '#bindAction', '#headerTitle => ObservableSlot' ], - #category : 'Spec2-Core-Widgets-ListView', - #package : 'Spec2-Core', - #tag : 'Widgets-ListView' + #category : 'Spec2-ListView', + #package : 'Spec2-ListView' } { #category : 'specs' } diff --git a/src/Spec2-ListView/SpTPresenterBuilder.extension.st b/src/Spec2-ListView/SpTPresenterBuilder.extension.st new file mode 100644 index 00000000..fc1242dc --- /dev/null +++ b/src/Spec2-ListView/SpTPresenterBuilder.extension.st @@ -0,0 +1,19 @@ +Extension { #name : 'SpTPresenterBuilder' } + +{ #category : '*Spec2-ListView' } +SpTPresenterBuilder >> newDropDown [ + + ^ self instantiate: SpDropDownPresenter +] + +{ #category : '*Spec2-ListView' } +SpTPresenterBuilder >> newEasyListView [ + + ^ self instantiate: SpEasyListViewPresenter +] + +{ #category : '*Spec2-ListView' } +SpTPresenterBuilder >> newListView [ + + ^ self instantiate: SpListViewPresenter +] diff --git a/src/Spec2-ListView/package.st b/src/Spec2-ListView/package.st new file mode 100644 index 00000000..0168ae96 --- /dev/null +++ b/src/Spec2-ListView/package.st @@ -0,0 +1 @@ +Package { #name : 'Spec2-ListView' }