mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix infinite render loop in release details (#4710)
* Fix infinite render loop in release details by replacing stateful, UI-triggered releaseStore with reactive async computed Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Update injectable Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Remove unnecessary return Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Remove empty lines Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Allow injection of history Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Make data required for opening of release details a dependency to make sure it's present Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Remove dead code Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Make arriving release values not re-render whole details Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
b7d29f8c49
commit
4f5a2988cb
33 files changed
+836
-600
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { history } from "./history";
|
||||
|
||||
const historyInjectable = getInjectable({
|
||||
instantiate: () => history,
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default historyInjectable;
|
||||
@@ -14,8 +14,14 @@ export const searchParamsOptions: ObservableSearchParamsOptions = {
|
||||
joinArraysWith: ",", // param values splitter, applicable only with {joinArrays:true}
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated: Switch to using di.inject(historyInjectable)
|
||||
*/
|
||||
export const history = ipcRenderer ? createBrowserHistory() : createMemoryHistory();
|
||||
|
||||
/**
|
||||
* @deprecated: Switch to using di.inject(observableHistoryInjectable)
|
||||
*/
|
||||
export const navigation = createObservableHistory(history, {
|
||||
searchParams: searchParamsOptions,
|
||||
});
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
|
||||
import { navigation as observableHistory } from "./history";
|
||||
|
||||
const observableHistoryInjectable = getInjectable({
|
||||
instantiate: () => observableHistory,
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default observableHistoryInjectable;
|
||||
Reference in new issue
Block a user