From 94e5d20c2170da5680ac70a6b5f0ccdf18fc658c Mon Sep 17 00:00:00 2001 From: Szymon Fiedler Date: Thu, 21 Mar 2024 19:58:18 +0100 Subject: [PATCH] Don't add "all" stream to search results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ruby_event_store-browser/elm/src/Layout.elm | 2 +- ruby_event_store-browser/elm/src/Search.elm | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ruby_event_store-browser/elm/src/Layout.elm b/ruby_event_store-browser/elm/src/Layout.elm index 4b0db5744e..88699d3435 100644 --- a/ruby_event_store-browser/elm/src/Layout.elm +++ b/ruby_event_store-browser/elm/src/Layout.elm @@ -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 diff --git a/ruby_event_store-browser/elm/src/Search.elm b/ruby_event_store-browser/elm/src/Search.elm index 0f47a1bb5c..b8dfe42aa1 100644 --- a/ruby_event_store-browser/elm/src/Search.elm +++ b/ruby_event_store-browser/elm/src/Search.elm @@ -26,11 +26,6 @@ type Msg | GoToStream Stream -globalStreamName : Stream -globalStreamName = - "all" - - emptyStreamName : Stream emptyStreamName = "" @@ -38,7 +33,7 @@ emptyStreamName = init : (Stream -> a) -> (Stream -> a) -> Model a init onSelectMsg onQueryMsg = - { streams = [ globalStreamName ] + { streams = [] , value = emptyStreamName , onSelectMsg = onSelectMsg , onQueryMsg = onQueryMsg