mattermost / mattermost-plugin-playbooks

Mattermost Playbooks enable reliable and repeatable processes for your teams using checklists, automation, and retrospectives.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clean feature flag

trilopin opened this issue · comments

var / selector to be cleaned

isLinkRunToExistingChannelEnabled / useLinkRunToExistingChannelEnabled

old modal should be removed (and make the new one to use this name)

webapp/src/components/modals/run_playbook_modal
webapp/src/components/modals/new_run_playbook_modal

remove old actions, rename new to old name at webapp/src/actions.ts

export function openPlaybookRunModal(playbookId: string, defaultOwnerId: string | null, description: string, teamId: string, teamName: string, refreshLHS?: () => void) {
    return modals.openModal(makePlaybookRunModalDefinition(
        playbookId,
        defaultOwnerId,
        description,
        teamId,
        teamName,
        refreshLHS
    ));
}

export function openPlaybookRunNewModal(playbookId: string | null, triggerChannelId: string | null, teamId: string, refreshLHS?: () => void) {
    return modals.openModal(makePlaybookRunNewModalDefinition(
        playbookId,
        triggerChannelId,
        teamId,
        refreshLHS
    ));
}

components/backstage/playbook_edit/automation/channel_acccess.tsx

            {linkRunToExistingChannelEnabled && <AutomationHeader id={'link-existing-channel'}>
                <AutomationTitle
                    css={{alignSelf: 'flex-start'}}
                >
                    <ChannelModeRadio
                        type='radio'
                        disabled={archived}
                        checked={playbook.channel_mode === 'link_existing_channel'}
                        onChange={() => handleChannelModeChange('link_existing_channel')}
                    />
                    <div>{formatMessage({defaultMessage: 'Link to an existing channel'})}</div>
                </AutomationTitle>
                 ...

PR approved but waiting for release cut to merge it