Skip to content

Commit

Permalink
describe where the New Project action is being disabled
Browse files Browse the repository at this point in the history
This also includes disabling the New Project action in the app action
bar within the File menu.
  • Loading branch information
sharon-wang committed Apr 2, 2024
1 parent e25a952 commit 53c4715
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/vs/workbench/browser/actions/positronActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ export class PositronNewProjectAction extends Action2 {
category: workspacesCategory,
f1: true,
// TODO: [New Project] Remove feature flag when New Project action is ready for release
// This disables (greys out) the action in the New menu, the application bar File menu, and the command palette when not in a development context
precondition: ContextKeyExpr.and(EnterMultiRootWorkspaceSupportContext, IsDevelopmentContext.isEqualTo(true)),
menu: {
id: MenuId.MenubarFileMenu,
group: '1_newfolder',
order: 3,
// TODO: [New Project] Remove feature flag when New Project action is ready for release
// This removes the action from the application bar File menu when not in a development context
when: IsDevelopmentContext.isEqualTo(true)
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const TopActionBarNewMenu = () => {
});
actions.push(new Separator());
// TODO: [New Project] Remove feature flag when New Project action is ready for release
// This removes the action from the New menu in the action bar when not in a development context
if (IsDevelopmentContext.getValue(positronActionBarContext.contextKeyService) === true) {
positronActionBarContext.appendCommandAction(actions, {
id: PositronNewProjectAction.ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ export const CustomFolderMenuItems = (props: CustomFolderMenuItemsProps) => {
);
};

// TODO: [New Project] Remove feature flag when New Project action is ready for release
const isDevContext = IsDevelopmentContext.getValue(props.contextKeyService) === true;

// Render.
return (
<div className='custom-folder-menu-items'>
{/* TODO: [New Project] Remove feature flag when New Project action is ready for release */}
{/* This removes the action from the custom folder menu in the action bar when when not in a development context */}
{isDevContext ?
<CommandActionCustomFolderMenuItem id={PositronNewProjectAction.ID} />
: null
Expand Down

0 comments on commit 53c4715

Please sign in to comment.