aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Markandan R <rmarkandan@yahoo.com>2021-06-13 19:57:23 +0530
committerLibravatar GitHub <noreply@github.com>2021-06-13 19:57:23 +0530
commitd7b2ea8ce137afe0540307e59a3f13c658df8a0b (patch)
tree9980e9de0c0dd9bf97242061fff6f1163ad69dc0
parentPass --publish never for PR builds (#1521) (diff)
downloadferdi-d7b2ea8ce137afe0540307e59a3f13c658df8a0b.tar.gz
ferdi-d7b2ea8ce137afe0540307e59a3f13c658df8a0b.tar.zst
ferdi-d7b2ea8ce137afe0540307e59a3f13c658df8a0b.zip
Removed the cyclical dependency in workspaces and announcement (Partial fix for: #1519) (#1522)
-rw-r--r--src/config.js3
-rw-r--r--src/containers/settings/EditSettingsScreen.js2
-rw-r--r--src/features/announcements/constants.js5
-rw-r--r--src/features/announcements/index.js3
-rw-r--r--src/features/announcements/store.js2
-rw-r--r--src/features/workspaces/constants.js6
-rw-r--r--src/features/workspaces/index.js8
-rw-r--r--src/features/workspaces/store.js2
-rw-r--r--src/routes.js4
9 files changed, 19 insertions, 16 deletions
diff --git a/src/config.js b/src/config.js
index 3a728b55..c85228d0 100644
--- a/src/config.js
+++ b/src/config.js
@@ -283,3 +283,6 @@ export const PLANS_MAPPING = {
283 'franz-supporter-license-year-2019': PLANS.LEGACY, 283 'franz-supporter-license-year-2019': PLANS.LEGACY,
284 free: PLANS.FREE, 284 free: PLANS.FREE,
285}; 285};
286
287
288export const DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED = false;
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index 245fd8a6..a5dc427b 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -11,6 +11,7 @@ import Form from '../../lib/Form';
11import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; 11import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages';
12import { 12import {
13 DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, SEARCH_ENGINE_NAMES, TODO_APPS, 13 DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, SEARCH_ENGINE_NAMES, TODO_APPS,
14 DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED,
14} from '../../config'; 15} from '../../config';
15import { isMac } from '../../environment'; 16import { isMac } from '../../environment';
16import { config as spellcheckerConfig } from '../../features/spellchecker'; 17import { config as spellcheckerConfig } from '../../features/spellchecker';
@@ -24,7 +25,6 @@ import ErrorBoundary from '../../components/util/ErrorBoundary';
24import globalMessages from '../../i18n/globalMessages'; 25import globalMessages from '../../i18n/globalMessages';
25import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos'; 26import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos';
26import WorkspacesStore from '../../features/workspaces/store'; 27import WorkspacesStore from '../../features/workspaces/store';
27import { DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED } from '../../features/workspaces';
28import ServicesStore from '../../stores/ServicesStore'; 28import ServicesStore from '../../stores/ServicesStore';
29 29
30const messages = defineMessages({ 30const messages = defineMessages({
diff --git a/src/features/announcements/constants.js b/src/features/announcements/constants.js
new file mode 100644
index 00000000..284226fd
--- /dev/null
+++ b/src/features/announcements/constants.js
@@ -0,0 +1,5 @@
1export const ANNOUNCEMENTS_ROUTES = {
2 TARGET: '/announcements/:id',
3};
4
5export const GA_CATEGORY_ANNOUNCEMENTS = 'Announcements';
diff --git a/src/features/announcements/index.js b/src/features/announcements/index.js
index 10f081bb..369ded1b 100644
--- a/src/features/announcements/index.js
+++ b/src/features/announcements/index.js
@@ -7,9 +7,6 @@ export const GA_CATEGORY_ANNOUNCEMENTS = 'Announcements';
7 7
8export const announcementsStore = new AnnouncementsStore(); 8export const announcementsStore = new AnnouncementsStore();
9 9
10export const ANNOUNCEMENTS_ROUTES = {
11 TARGET: '/announcements/:id',
12};
13 10
14export default function initAnnouncements(stores, actions) { 11export default function initAnnouncements(stores, actions) {
15 const { features } = stores; 12 const { features } = stores;
diff --git a/src/features/announcements/store.js b/src/features/announcements/store.js
index 9ec5f67d..4e465286 100644
--- a/src/features/announcements/store.js
+++ b/src/features/announcements/store.js
@@ -7,7 +7,7 @@ import semver from 'semver';
7import localStorage from 'mobx-localstorage'; 7import localStorage from 'mobx-localstorage';
8 8
9import { FeatureStore } from '../utils/FeatureStore'; 9import { FeatureStore } from '../utils/FeatureStore';
10import { ANNOUNCEMENTS_ROUTES } from '.'; 10import { ANNOUNCEMENTS_ROUTES } from './constants';
11import { getAnnouncementRequest, getChangelogRequest, getCurrentVersionRequest } from './api'; 11import { getAnnouncementRequest, getChangelogRequest, getCurrentVersionRequest } from './api';
12import { announcementActions } from './actions'; 12import { announcementActions } from './actions';
13import { createActionBindings } from '../utils/ActionBinding'; 13import { createActionBindings } from '../utils/ActionBinding';
diff --git a/src/features/workspaces/constants.js b/src/features/workspaces/constants.js
new file mode 100644
index 00000000..413afa1e
--- /dev/null
+++ b/src/features/workspaces/constants.js
@@ -0,0 +1,6 @@
1export const WORKSPACES_ROUTES = {
2 ROOT: '/settings/workspaces',
3 EDIT: '/settings/workspaces/:action/:id',
4};
5
6export const GA_CATEGORY_WORKSPACES = 'Workspaces';
diff --git a/src/features/workspaces/index.js b/src/features/workspaces/index.js
index 560b732a..3db6de5b 100644
--- a/src/features/workspaces/index.js
+++ b/src/features/workspaces/index.js
@@ -4,9 +4,6 @@ import { resetApiRequests } from './api';
4 4
5const debug = require('debug')('Ferdi:feature:workspaces'); 5const debug = require('debug')('Ferdi:feature:workspaces');
6 6
7export const GA_CATEGORY_WORKSPACES = 'Workspaces';
8export const DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED = false;
9
10export const workspaceStore = new WorkspacesStore(); 7export const workspaceStore = new WorkspacesStore();
11 8
12export default function initWorkspaces(stores, actions) { 9export default function initWorkspaces(stores, actions) {
@@ -31,8 +28,3 @@ export default function initWorkspaces(stores, actions) {
31 }, 28 },
32 ); 29 );
33} 30}
34
35export const WORKSPACES_ROUTES = {
36 ROOT: '/settings/workspaces',
37 EDIT: '/settings/workspaces/:action/:id',
38};
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js
index 5c90ff18..bddcb6eb 100644
--- a/src/features/workspaces/store.js
+++ b/src/features/workspaces/store.js
@@ -13,7 +13,7 @@ import {
13 getUserWorkspacesRequest, 13 getUserWorkspacesRequest,
14 updateWorkspaceRequest, 14 updateWorkspaceRequest,
15} from './api'; 15} from './api';
16import { WORKSPACES_ROUTES } from './index'; 16import { WORKSPACES_ROUTES } from './constants';
17import { createReactions } from '../../stores/lib/Reaction'; 17import { createReactions } from '../../stores/lib/Reaction';
18import { createActionBindings } from '../utils/ActionBinding'; 18import { createActionBindings } from '../utils/ActionBinding';
19 19
diff --git a/src/routes.js b/src/routes.js
index 046e60cb..5017ed83 100644
--- a/src/routes.js
+++ b/src/routes.js
@@ -30,9 +30,9 @@ import AuthLayoutContainer from './containers/auth/AuthLayoutContainer';
30import SubscriptionPopupScreen from './containers/subscription/SubscriptionPopupScreen'; 30import SubscriptionPopupScreen from './containers/subscription/SubscriptionPopupScreen';
31import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen'; 31import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen';
32import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen'; 32import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen';
33import { WORKSPACES_ROUTES } from './features/workspaces'; 33import { WORKSPACES_ROUTES } from './features/workspaces/constants';
34import AnnouncementScreen from './features/announcements/components/AnnouncementScreen'; 34import AnnouncementScreen from './features/announcements/components/AnnouncementScreen';
35import { ANNOUNCEMENTS_ROUTES } from './features/announcements'; 35import { ANNOUNCEMENTS_ROUTES } from './features/announcements/constants';
36 36
37import SettingsStore from './stores/SettingsStore'; 37import SettingsStore from './stores/SettingsStore';
38 38