Skip to content

Commit

Permalink
Don't add "all" stream to search results
Browse files Browse the repository at this point in the history
Initially it made sens, but it can be problematic and confusing in the
long run. It's a search box, so we should present there only things
which are matching the user input.

Co-authored-by: Paweł Pacana <[email protected]>
  • Loading branch information
fidel and mostlyobvious committed Mar 21, 2024
1 parent e8ecb48 commit 94e5d20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ruby_event_store-browser/elm/src/Layout.elm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ update msg model =
SearchedStreamsFetched (Ok streams) ->
let
streams_ =
"all" :: List.map .streamId streams
List.map .streamId streams

searchModel =
model.internal.search
Expand Down
7 changes: 1 addition & 6 deletions ruby_event_store-browser/elm/src/Search.elm
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,14 @@ type Msg
| GoToStream Stream


globalStreamName : Stream
globalStreamName =
"all"


emptyStreamName : Stream
emptyStreamName =
""


init : (Stream -> a) -> (Stream -> a) -> Model a
init onSelectMsg onQueryMsg =
{ streams = [ globalStreamName ]
{ streams = []
, value = emptyStreamName
, onSelectMsg = onSelectMsg
, onQueryMsg = onQueryMsg
Expand Down

0 comments on commit 94e5d20

Please sign in to comment.