Prevent boards product from being included automatically (#23539)
* Prevent boards product from being included automatically * Fix config diff test * Update prepackaged plugin version Co-authored-by: Scott Bishel <scott.bishel@mattermost.com> * Readd boards/dist to the gitignore * Does not enable the focalboard plugin by default * Update plugin version to v7.10.3 --------- Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d8cb5f3a6e
Коммит
1215584665
@@ -1,44 +0,0 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
|
||||
import testConfigureStore from 'tests/test_store';
|
||||
|
||||
import {initializeProducts} from './products';
|
||||
|
||||
(window as any).REMOTE_CONTAINERS = {};
|
||||
|
||||
describe('initializeProducts', () => {
|
||||
test('should set Client4 to use the correct Boards URL for product mode', async () => {
|
||||
const store = testConfigureStore({
|
||||
entities: {
|
||||
general: {
|
||||
config: {
|
||||
FeatureFlagBoardsProduct: 'true',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await store.dispatch(initializeProducts());
|
||||
|
||||
expect(Client4.getBoardsRoute().startsWith('/plugins/boards')).toBe(true);
|
||||
});
|
||||
|
||||
test('should set Client4 to use the correct Boards URL for plugin mode', async () => {
|
||||
const store = testConfigureStore({
|
||||
entities: {
|
||||
general: {
|
||||
config: {
|
||||
FeatureFlagBoardsProduct: 'false',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await store.dispatch(initializeProducts());
|
||||
|
||||
expect(Client4.getBoardsRoute().startsWith('/plugins/focalboard')).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
import {Store} from 'redux';
|
||||
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import {getConfig} from 'mattermost-redux/selectors/entities/general';
|
||||
import {DispatchFunc, GetStateFunc} from 'mattermost-redux/types/actions';
|
||||
|
||||
@@ -26,11 +25,8 @@ export function initializeProducts() {
|
||||
}
|
||||
|
||||
function configureClient() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
return (dispatch: DispatchFunc, getState: GetStateFunc) => {
|
||||
const config = getConfig(getState());
|
||||
|
||||
Client4.setUseBoardsProduct(config.FeatureFlagBoardsProduct === 'true');
|
||||
|
||||
return Promise.resolve({data: true});
|
||||
};
|
||||
}
|
||||
@@ -48,20 +44,10 @@ function loadRemoteModules() {
|
||||
* can't be constructed based on the name of a product at runtime.
|
||||
*/
|
||||
let products = [
|
||||
{
|
||||
id: 'boards',
|
||||
load: () => ({
|
||||
index: import('boards'),
|
||||
|
||||
// manifest: import('boards/manifest'),
|
||||
}),
|
||||
},
|
||||
{
|
||||
id: 'playbooks',
|
||||
load: () => ({
|
||||
index: import('playbooks'),
|
||||
|
||||
// manifest: import('boards/manifest'),
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
||||
Ссылка в новой задаче
Block a user