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 #11

Merged
merged 1 commit into from
Jul 18, 2024
Merged
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 webapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ const MainApp = (props: Props) => {
<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 @@ -160,7 +160,7 @@ const MainApp = (props: Props) => {
const HeaderComponent = () => {
return (
<ErrorBoundary>
<GlobalHeader history={browserHistory}/>
<GlobalHeader history={browserHistory} />
</ErrorBoundary>
)
}
Expand Down Expand Up @@ -218,7 +218,7 @@ export default class Plugin {
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 @@ -287,20 +287,20 @@ export default class Plugin {
(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 @@ -313,17 +313,6 @@ export default class Plugin {
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 @@ -361,7 +350,7 @@ export default class Plugin {
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 @@ -385,7 +374,7 @@ export default class Plugin {
this.boardSelectorId = this.registry.registerRootComponent((props: {webSocketClient: MMWebSocketClient}) => (
<ReduxProvider store={store}>
<WithWebSockets manifest={manifest} webSocketClient={props.webSocketClient}>
<BoardSelector/>
<BoardSelector />
</WithWebSockets>
</ReduxProvider>
))
Expand All @@ -406,7 +395,7 @@ export default class Plugin {
try {
rudderCfg.setCookieDomain = new URL(siteURL).hostname
// eslint-disable-next-line no-empty
} catch (_) {}
} catch (_) { }
}
rudderAnalytics.load(rudderKey, rudderUrl, rudderCfg)

Expand Down
Loading