pharo-graphics / Spec-Toplo

Toplo backend for Spec (Pharo)
MIT License
0 stars 1 forks source link

Status #10

Open tinchodias opened 3 weeks ago

tinchodias commented 3 weeks ago

We miss a clear way to inform what's current coverage as backend.

As you may know, each Spec-widget needs an adapter counterpart provided by the backend that implements it (instances the corresponding backend-widget with the required subscriptions to keep Spec-widget and backend-widget in sync along the lifecycle.

The methodology on Spec-Toplo up to now was more or less: first, choose a Spec widget without adapter; second, write a script in a workspace to open it using basic API; third, run Spec adapter tests and make some pass; go to first step.

A raw report we can get to check status is listing with Spec widgets have adapter. Currently:

Clearly part of the list are low-hanging fruits, others are complex at the point there isn't a Toplo widget for it. The most prominent: Table and Tree do not exist in Toplo. Also Diff has some complexity, but it should be built on top of Album.

The following script generated the lists:

app := SpApplication new 
  useBackend: #Toplo;
  yourself.

allWidgets := ((SpAbstractWidgetPresenter allSubclasses
    reject: [ :eachClass | eachClass isAbstract ])
    select: [ :eachClass |
        #('Spec2-Core' 'Spec2-Code') anySatisfy: [ :eachPrefix |
             eachClass packageName beginsWith: eachPrefix ] ]).

whetherImplemented := allWidgets groupedBy: [ :eachClass |
    Smalltalk hasClassNamed:
        (SpToploAdapterBindings new
            translateSymbol: eachClass adapterName) ].

(whetherImplemented at: true) size trace.
' Toplo adapters DO exist: ' trace.
(whetherImplemented at: true) asCommaStringAnd traceCr.

(whetherImplemented at: false) size trace.
' Toplo adapters DO NOT exist: ' trace.
(whetherImplemented at: false) asCommaStringAnd traceCr.
Ducasse commented 3 weeks ago

Thanks martin. What is the next one on the list?

tinchodias commented 3 weeks ago

Menu presenters. I have some local changes on this matter. And these look simple: SpLinkPresenter, SpStatusBarPresenter, SpNumberInputFieldPresenter, SpSearchInputFieldPresenter, SpSliderPresenter, SpAthensPresenter

Ducasse commented 3 weeks ago

Martin could you open a list of issues for each of the ones that can be done today so that people can know that they can help.

tinchodias commented 3 weeks ago

@Ducasse --> https://github.com/pharo-graphics/Spec-Toplo/issues/12

Ducasse commented 3 weeks ago

Cool. In the future I would like to ask Enzo to join forces.