Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MM-58570 - Removing create a board button #5026

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions mattermost-plugin/webapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import FocalboardIcon from '../../../webapp/src/widgets/icons/logo'
import {setMattermostTheme} from '../../../webapp/src/theme'

import TelemetryClient, {TelemetryCategory, TelemetryActions} from '../../../webapp/src/telemetry/telemetryClient'

Check failure on line 35 in mattermost-plugin/webapp/src/index.tsx

View workflow job for this annotation

GitHub Actions / ci-ubuntu-webapp

'TelemetryCategory' is defined but never used

Check failure on line 35 in mattermost-plugin/webapp/src/index.tsx

View workflow job for this annotation

GitHub Actions / ci-ubuntu-webapp

'TelemetryActions' is defined but never used

import '../../../webapp/src/styles/focalboard-variables.scss'
import '../../../webapp/src/styles/main.scss'
Expand Down Expand Up @@ -158,9 +158,9 @@
<ReduxProvider store={store}>
<WithWebSockets manifest={manifest} webSocketClient={props.webSocketClient}>
<div id='focalboard-app'>
<App history={browserHistory}/>
<App history={browserHistory} />
</div>
<div id='focalboard-root-portal'/>
<div id='focalboard-root-portal' />
</WithWebSockets>
</ReduxProvider>
</ErrorBoundary>
Expand All @@ -170,7 +170,7 @@
const HeaderComponent = () => {
return (
<ErrorBoundary>
<GlobalHeader history={browserHistory}/>
<GlobalHeader history={browserHistory} />
</ErrorBoundary>
)
}
Expand Down Expand Up @@ -228,7 +228,7 @@
setMattermostTheme(JSON.parse(preference.value))
theme = preference.value
}
if(preference.category === 'display_settings' && preference.name === 'name_format'){
if (preference.category === 'display_settings' && preference.name === 'name_format') {
UserSettings.nameFormat = preference.value
}
}
Expand Down Expand Up @@ -297,20 +297,20 @@
(props: {webSocketClient: MMWebSocketClient}) => (
<ReduxProvider store={store}>
<WithWebSockets manifest={manifest} webSocketClient={props.webSocketClient}>
<RHSChannelBoards/>
<RHSChannelBoards />
</WithWebSockets>
</ReduxProvider>
),
<ErrorBoundary>
<ReduxProvider store={store}>
<RHSChannelBoardsHeader/>
<RHSChannelBoardsHeader />
</ReduxProvider>
</ErrorBoundary>
,
)
this.rhsId = rhsId

this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon/>, () => mmStore.dispatch(toggleRHSPlugin), 'Boards', 'Boards')
this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon />, () => mmStore.dispatch(toggleRHSPlugin), 'Boards', 'Boards')

this.registry.registerProduct(
'/boards',
Expand All @@ -323,17 +323,6 @@
true,
)

const goToFocalboardTemplate = () => {
const currentTeam = mmStore.getState().entities.teams.currentTeamId
const currentChannel = mmStore.getState().entities.channels.currentChannelId
TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.ClickChannelIntro, {teamID: currentTeam})
window.open(`${windowAny.frontendBaseURL}/team/${currentTeam}/new/${currentChannel}`, '_blank', 'noopener')
}

if (registry.registerChannelIntroButtonAction) {
this.channelHeaderButtonId = registry.registerChannelIntroButtonAction(<FocalboardIcon/>, goToFocalboardTemplate, intl.formatMessage({id: 'ChannelIntro.CreateBoard', defaultMessage: 'Create a board'}))
}

if (this.registry.registerAppBarComponent) {
this.registry.registerAppBarComponent(Utils.buildURL(appBarIcon, true), () => mmStore.dispatch(toggleRHSPlugin), intl.formatMessage({id: 'AppBar.Tooltip', defaultMessage: 'Toggle Linked Boards'}))
}
Expand Down Expand Up @@ -371,7 +360,7 @@
if (registry.registerSiteStatisticsHandler) {
registry.registerSiteStatisticsHandler(async () => {
const siteStats = await octoClient.getSiteStatistics()
if(siteStats){
if (siteStats) {
return {
boards_count: {
name: intl.formatMessage({id: 'SiteStats.total_boards', defaultMessage: 'Total Boards'}),
Expand All @@ -395,7 +384,7 @@
this.boardSelectorId = this.registry.registerRootComponent((props: {webSocketClient: MMWebSocketClient}) => (
<ReduxProvider store={store}>
<WithWebSockets manifest={manifest} webSocketClient={props.webSocketClient}>
<BoardSelector/>
<BoardSelector />
</WithWebSockets>
</ReduxProvider>
))
Expand All @@ -416,7 +405,7 @@
try {
rudderCfg.setCookieDomain = new URL(siteURL).hostname
// eslint-disable-next-line no-empty
} catch (_) {}
} catch (_) { }
}
rudderAnalytics.load(rudderKey, rudderUrl, rudderCfg)

Expand Down
Loading