site-admin: fix loading state when loading feature flags
Created by: bobheadxi
On fetching feature flags, rather than unwrapping the Observable
and then wrapping it
back into an observable in queryFeatureFlags
with of
, leave it as an Observable
and use piping stuffs inside queryFeatureFlags
. This allows the loading
state of
FilteredConnection
work correctly - previously, when loading, feature flags will be
undefined
and fall back to a list of empty nodes, and the list view will show "no results"
rather than "loading".
Related to https://github.com/sourcegraph/sourcegraph/issues/31182
Test plan
sg start web-standalone
Spam reload the /site-admin/feature-flags
page, see loading indicator