pharo-spec / Spec

Spec is a framework in Pharo for describing user interfaces.
MIT License
62 stars 65 forks source link

New presenter to split sub-presenters #1608

Closed hernanmd closed 1 month ago

hernanmd commented 2 months ago

This PR adds a new composite presenter that contains two presenters. The first presenter is fixed and can be expanded or split. The second presenter is dynamic and can be shown split or hidden. It includes tests for opening with hidden or split view.

Demo

https://github.com/user-attachments/assets/1d342ee2-b50c-4cbb-b261-7243586c644d

Ducasse commented 2 months ago

Hi hernan May be you want to add a splitter and expose an API so that we can preconfigure the proportion and by default keep the equal part for each of the presenter. Like that we can get it used in many scenario. S.

Ducasse commented 2 months ago

these tests are failing on the server

SpToggleSplitPresenterTest
 ✗ #testOpenPresenterIsBuilt (27ms)
 ✗ #testOpenPresenterRaisesDisplayEvent (16ms)
 ✗ #testOpenPresenterRaisesBuiltEvent (30ms)
 ✗ #testExample (41ms)
 ✗ #testOpen (19ms)
 ✗ #testOpenPresenterIsDisplayed (20ms)

ZnClientTest
 ✗ #testGetGeoIP (10141ms)

SystemDependenciesTest
 ✗ #testExternalBasicToolsDependencies (19ms)
 ✗ #testExternalUIDependencies (14ms)
hernanmd commented 1 month ago

Hi hernan May be you want to add a splitter and expose an API so that we can preconfigure the proportion and by default keep the equal part for each of the presenter. Like that we can get it used in many scenario. S.

Thanks for the suggestion, I added a positionOfSlider: method so users can configure the proportion

Captura de pantalla 2024-09-23 a las 14 56 28