Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
refactor: OPTIC-429: Step 2 to avoid complexity in reading the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
luarmr committed Feb 14, 2024
1 parent 0024ae8 commit 90c2b4f
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/mixins/DataStore/DataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { flow, getRoot, types } from "mobx-state-tree";
import { guidGenerator } from "../../utils/random";
import { isDefined } from "../../utils/utils";
import { DEFAULT_PAGE_SIZE, getStoredPageSize } from "../../components/Common/Pagination/Pagination";
import { FF_DEV_1470, FF_LOPS_E_3, isFF } from "../../utils/feature-flags";
import { FF_LOPS_E_3, isFF } from "../../utils/feature-flags";

const listIncludes = (list, id) => {
const index =
Expand Down Expand Up @@ -197,7 +197,7 @@ export const DataStore = (

self.loading = true;

if(interaction === "filter" || ((!isFF(FF_DEV_1470)) && interaction === "ordering") || ((!isFF(FF_DEV_1470)) && reload)) {
if(interaction === "filter" || interaction === "ordering" || reload) {
self.page = 1;
} else if (reload || isDefined(pageNumber)) {
if (self.page === 0)
Expand Down
4 changes: 2 additions & 2 deletions src/stores/Tabs/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TabFilter } from "./tab_filter";
import { TabHiddenColumns } from "./tab_hidden_columns";
import { TabSelectedItems } from "./tab_selected_items";
import { History } from '../../utils/history';
import { FF_DEV_1470, FF_LOPS_12, isFF } from "../../utils/feature-flags";
import { FF_LOPS_12, isFF } from "../../utils/feature-flags";
import { CustomJSON, StringOrNumberID, ThresholdType } from "../types";
import { clamp } from "../../utils/helpers";

Expand Down Expand Up @@ -253,7 +253,7 @@ export const Tab = types
setType(type) {
self.type = type;
self.root.SDK.invoke("tabTypeChanged", { tab: self.id, type });
self.save({ reload: isFF(FF_DEV_1470) });
self.save({ reload: false });
},

setTarget(target) {
Expand Down
3 changes: 0 additions & 3 deletions src/utils/feature-flags.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Outliner + Details
export const FF_DEV_1170 = "ff_front_1170_outliner_030222_short";

// Switch to page navigation
export const FF_DEV_1470 = "ff_front_dev_1470_dm_pagination_010422_short";

/**
* Support for notification links in the Label Steam and the Review Stream.
* @link https://app.launchdarkly.com/default/branch/features/feat_front_dev_1752_notification_links_in_label_and_review_streams
Expand Down

0 comments on commit 90c2b4f

Please sign in to comment.