pharo-spec / Spec

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

SpChooserPresenter keeps filter text after move, yet does not apply it #1493

Closed JanBliznicenko closed 2 weeks ago

JanBliznicenko commented 11 months ago

If you fill in any filter, then move items, then the filter text keeps showing, yet the filter is no longer applied.

    | targetItemToRemove sourceItemToAdd sourceItems targetItems allItems presenter |
    targetItemToRemove := 'TargetToRemove'.
    sourceItemToAdd := 'SourceToAdd'.
    sourceItems := {
                       'S1'.
                       'S2'.
                       sourceItemToAdd }.
    targetItems := {
                       'T1'.
                       'T2'.
                       targetItemToRemove }.
    allItems := sourceItems , targetItems.

    presenter := SpChooserPresenter
                     sourceItems: sourceItems copy
                     chosenItems: targetItems copy.

    presenter open

    presenter sourceList filterInputPresenter text: 'ToAdd'.
    presenter targetList filterInputPresenter text: 'ToRemove'.
    presenter removeAll.

Example

Possible solutions:

  1. reapply filters after move
  2. clear the filter texts after move

Clearing the text might be simpler and user might probably want to rest those filter anyway after a move is done.

JanBliznicenko commented 2 weeks ago

Fixed by https://github.com/pharo-spec/Spec/pull/1494