Skip to content

Commit 4251b11

Browse files
authored
chore: enable no load by default (#5968)
* enable no load by default * remove help section brackets * fallback to server with mentions
1 parent 712339a commit 4251b11

File tree

3 files changed

+19
-25
lines changed

3 files changed

+19
-25
lines changed

web/ce/constants/issues.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,4 @@ export const filterActivityOnSelectedFilters = (
3131
): TIssueActivityComment[] =>
3232
activity.filter((activity) => filter.includes(activity.activity_type as TActivityFilters));
3333

34-
// boolean to decide if the local db cache is enabled
35-
export const ENABLE_LOCAL_DB_CACHE = false;
36-
3734
export const ENABLE_ISSUE_DEPENDENCIES = false;

web/core/components/workspace/sidebar/help-section.tsx

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { usePlatformOS } from "@/hooks/use-platform-os";
1616
// plane web components
1717
import { PlaneVersionNumber } from "@/plane-web/components/global";
1818
import { WorkspaceEditionBadge } from "@/plane-web/components/workspace";
19-
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
2019

2120
export interface WorkspaceHelpSectionProps {
2221
setSidebarActive?: React.Dispatch<React.SetStateAction<boolean>>;
@@ -111,23 +110,21 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(
111110
</a>
112111
</CustomMenu.MenuItem>
113112
<div className="my-1 border-t border-custom-border-200" />
114-
{ENABLE_LOCAL_DB_CACHE && (
115-
<CustomMenu.MenuItem>
116-
<div
117-
onClick={(e) => {
118-
e.preventDefault();
119-
e.stopPropagation();
120-
}}
121-
className="flex w-full items-center justify-between text-xs hover:bg-custom-background-80"
122-
>
123-
<span className="racking-tight">Local Cache</span>
124-
<ToggleSwitch
125-
value={canUseLocalDB}
126-
onChange={() => toggleLocalDB(workspaceSlug?.toString(), projectId?.toString())}
127-
/>
128-
</div>
129-
</CustomMenu.MenuItem>
130-
)}
113+
<CustomMenu.MenuItem>
114+
<div
115+
onClick={(e) => {
116+
e.preventDefault();
117+
e.stopPropagation();
118+
}}
119+
className="flex w-full items-center justify-between text-xs hover:bg-custom-background-80"
120+
>
121+
<span className="racking-tight">Local Cache</span>
122+
<ToggleSwitch
123+
value={canUseLocalDB}
124+
onChange={() => toggleLocalDB(workspaceSlug?.toString(), projectId?.toString())}
125+
/>
126+
</div>
127+
</CustomMenu.MenuItem>
131128
<CustomMenu.MenuItem>
132129
<button
133130
type="button"
@@ -173,8 +170,9 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(
173170
<Tooltip tooltipContent={`${isCollapsed ? "Expand" : "Hide"}`} isMobile={isMobile}>
174171
<button
175172
type="button"
176-
className={`grid place-items-center rounded-md p-1 text-custom-text-200 outline-none hover:bg-custom-background-90 hover:text-custom-text-100 ${isCollapsed ? "w-full" : ""
177-
}`}
173+
className={`grid place-items-center rounded-md p-1 text-custom-text-200 outline-none hover:bg-custom-background-90 hover:text-custom-text-100 ${
174+
isCollapsed ? "w-full" : ""
175+
}`}
178176
onClick={() => toggleSidebar()}
179177
>
180178
<MoveLeft className={`h-4 w-4 duration-300 ${isCollapsed ? "rotate-180" : ""}`} />

web/core/store/user/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { TUserPermissions } from "@plane/types/src/enums";
99
import { API_BASE_URL } from "@/helpers/common.helper";
1010
// local
1111
import { persistence } from "@/local-db/storage.sqlite";
12-
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
1312
import { EUserPermissions } from "@/plane-web/constants/user-permissions";
1413
// services
1514
import { AuthService } from "@/services/auth.service";
@@ -278,6 +277,6 @@ export class UserStore implements IUserStore {
278277
}
279278

280279
get localDBEnabled() {
281-
return ENABLE_LOCAL_DB_CACHE && this.userSettings.canUseLocalDB;
280+
return this.userSettings.canUseLocalDB;
282281
}
283282
}

0 commit comments

Comments
 (0)