diff --git a/plugins/tracker-resources/src/components/issues/ViewOptions.svelte b/plugins/tracker-resources/src/components/issues/ViewOptions.svelte
new file mode 100644
index 0000000000..de6a89ae4a
--- /dev/null
+++ b/plugins/tracker-resources/src/components/issues/ViewOptions.svelte
@@ -0,0 +1,72 @@
+
+
+
+
+
+
diff --git a/plugins/tracker-resources/src/components/issues/ViewOptionsButton.svelte b/plugins/tracker-resources/src/components/issues/ViewOptionsButton.svelte
deleted file mode 100644
index 1fc2ebc934..0000000000
--- a/plugins/tracker-resources/src/components/issues/ViewOptionsButton.svelte
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
diff --git a/plugins/tracker-resources/src/index.ts b/plugins/tracker-resources/src/index.ts
index 0370be90f1..12e1f51809 100644
--- a/plugins/tracker-resources/src/index.ts
+++ b/plugins/tracker-resources/src/index.ts
@@ -26,7 +26,6 @@ import EditIssue from './components/issues/edit/EditIssue.svelte'
import IssueItem from './components/issues/IssueItem.svelte'
import IssuePresenter from './components/issues/IssuePresenter.svelte'
import IssuePreview from './components/issues/IssuePreview.svelte'
-import Issues from './components/issues/Issues.svelte'
import IssuesView from './components/issues/IssuesView.svelte'
import ListView from './components/issues/ListView.svelte'
import ModificationDatePresenter from './components/issues/ModificationDatePresenter.svelte'
@@ -111,7 +110,6 @@ export default async (): Promise
=> ({
Active,
Backlog,
Inbox,
- Issues,
MyIssues,
Projects,
Views,
diff --git a/plugins/tracker-resources/src/plugin.ts b/plugins/tracker-resources/src/plugin.ts
index 351022f917..94c4cf2617 100644
--- a/plugins/tracker-resources/src/plugin.ts
+++ b/plugins/tracker-resources/src/plugin.ts
@@ -171,7 +171,6 @@ export default mergeIds(trackerId, tracker, {
NopeComponent: '' as AnyComponent,
Inbox: '' as AnyComponent,
MyIssues: '' as AnyComponent,
- Issues: '' as AnyComponent,
Views: '' as AnyComponent,
Active: '' as AnyComponent,
Backlog: '' as AnyComponent,
diff --git a/plugins/tracker-resources/src/viewOptions.ts b/plugins/tracker-resources/src/viewOptions.ts
new file mode 100644
index 0000000000..658e4ecf75
--- /dev/null
+++ b/plugins/tracker-resources/src/viewOptions.ts
@@ -0,0 +1,7 @@
+import { ViewOptions } from '@anticrm/tracker'
+import { writable } from 'svelte/store'
+
+/**
+ * @public
+ */
+export const viewOptionsStore = writable()
diff --git a/plugins/view-resources/src/index.ts b/plugins/view-resources/src/index.ts
index 1cbd34e8e3..627442d871 100644
--- a/plugins/view-resources/src/index.ts
+++ b/plugins/view-resources/src/index.ts
@@ -82,7 +82,9 @@ export {
getObjectPresenter,
LoadingProps,
setActiveViewletId,
- getActiveViewletId
+ getActiveViewletId,
+ setViewOptions,
+ getViewOptions
} from './utils'
export {
HTMLPresenter,
diff --git a/plugins/view-resources/src/utils.ts b/plugins/view-resources/src/utils.ts
index 10cc438cbb..145253007d 100644
--- a/plugins/view-resources/src/utils.ts
+++ b/plugins/view-resources/src/utils.ts
@@ -422,3 +422,24 @@ export function getActiveViewletId (): Ref | null {
const key = makeViewletKey()
return localStorage.getItem(key) as Ref | null
}
+
+function makeViewOptionsKey (viewletId: Ref): string {
+ const loc = getCurrentLocation()
+ loc.fragment = undefined
+ loc.query = undefined
+ return `viewOptions:${viewletId}:${locationToUrl(loc)}`
+}
+
+export function setViewOptions (viewletId: Ref, options: string | null): void {
+ const key = makeViewOptionsKey(viewletId)
+ if (options !== null) {
+ localStorage.setItem(key, options)
+ } else {
+ localStorage.removeItem(key)
+ }
+}
+
+export function getViewOptions (viewletId: Ref): string | null {
+ const key = makeViewOptionsKey(viewletId)
+ return localStorage.getItem(key)
+}
diff --git a/tests/sanity/tests/tracker.spec.ts b/tests/sanity/tests/tracker.spec.ts
index f76fdba37c..ed376c2299 100644
--- a/tests/sanity/tests/tracker.spec.ts
+++ b/tests/sanity/tests/tracker.spec.ts
@@ -157,17 +157,24 @@ test('issues-status-display', async ({ page }) => {
}
})
-test('save-active-viewlet', async ({ page }) => {
+test('save-view-options', async ({ page }) => {
const panels = ['Issues', 'Active', 'Backlog']
await navigate(page)
for (const viewletSelector of [viewletSelectors.Board, viewletSelectors.Table]) {
for (const panel of panels) {
await page.click(`text="${panel}"`)
await page.click(viewletSelector)
+ await page.click('button:has-text("View")')
+ await page.click('.antiCard >> button >> nth=0')
+ await page.click('.menu-item:has-text("Assignee")')
+ await page.keyboard.press('Escape')
}
for (const panel of panels) {
await page.click(`text="${panel}"`)
await expect(page.locator(viewletSelector)).toHaveClass(/selected/)
+ await page.click('button:has-text("View")')
+ await expect(page.locator('.antiCard >> button >> nth=0')).toContainText('Assignee')
+ await page.keyboard.press('Escape')
}
}
})