Skip to content

Commit

Permalink
Merge pull request #3128 from github/koesie10/feature-flags-1.11.0
Browse files Browse the repository at this point in the history
Remove feature flags for release v1.11.0
  • Loading branch information
koesie10 authored Dec 13, 2023
2 parents 9cb4d23 + ce84fed commit a2f3f5f
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 392 deletions.
2 changes: 2 additions & 0 deletions extensions/ql-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [UNRELEASED]

- Add a new method modeling panel to classify methods as sources/sinks/summaries while in the context of the source code. [#3128](https://github.com/github/vscode-codeql/pull/3128)
- Adds the ability to add multiple classifications per method in the CodeQL Model Editor. [#3128](https://github.com/github/vscode-codeql/pull/3128)
- Add a prompt to the "Quick query" command to encourage users in single-folder workspaces to use "Create query" instead. [#3082](https://github.com/github/vscode-codeql/pull/3082)
- Remove support for CodeQL CLI versions older than 2.11.6. [#3087](https://github.com/github/vscode-codeql/pull/3087)
- Preserve focus on results viewer when showing a location in a file. [#3088](https://github.com/github/vscode-codeql/pull/3088)
Expand Down
3 changes: 1 addition & 2 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1840,8 +1840,7 @@
{
"id": "codeQLMethodModeling",
"type": "webview",
"name": "CodeQL Method Modeling",
"when": "config.codeQL.canary"
"name": "CodeQL Method Modeling"
}
],
"codeql-methods-usage": [
Expand Down
5 changes: 0 additions & 5 deletions extensions/ql-vscode/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,6 @@ export interface ModelConfig {
flowGeneration: boolean;
llmGeneration: boolean;
getExtensionsDirectory(languageId: string): string | undefined;
showMultipleModels: boolean;
enableRuby: boolean;
}

Expand Down Expand Up @@ -765,10 +764,6 @@ export class ModelConfigListener extends ConfigListener implements ModelConfig {
});
}

public get showMultipleModels(): boolean {
return isCanary();
}

public get enableRuby(): boolean {
return !!ENABLE_RUBY.getValue<boolean>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class MethodModelingViewProvider extends AbstractWebviewViewProvider<
t: "setMethodModelingPanelViewState",
viewState: {
language: this.language,
showMultipleModels: this.modelConfig.showMultipleModels,
},
});
}
Expand Down
1 change: 0 additions & 1 deletion extensions/ql-vscode/src/model-editor/model-editor-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ export class ModelEditorView extends AbstractWebview<
language: this.language,
showGenerateButton,
showLlmButton,
showMultipleModels: this.modelConfig.showMultipleModels,
mode: this.modelingStore.getMode(this.databaseItem),
showModeSwitchButton,
sourceArchiveAvailable,
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions extensions/ql-vscode/src/model-editor/shared/view-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ export interface ModelEditorViewState {
language: QueryLanguage;
showGenerateButton: boolean;
showLlmButton: boolean;
showMultipleModels: boolean;
mode: Mode;
showModeSwitchButton: boolean;
sourceArchiveAvailable: boolean;
}

export interface MethodModelingPanelViewState {
language: QueryLanguage | undefined;
showMultipleModels: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,16 @@ MethodSaved.args = {
modelingStatus: "saved",
};

export const MultipleModelingsUnmodeled = Template.bind({});
MultipleModelingsUnmodeled.args = {
language,
method,
modeledMethods: [],
modelingStatus: "saved",
showMultipleModels: true,
};

export const MultipleModelingsModeledSingle = Template.bind({});
MultipleModelingsModeledSingle.args = {
export const ModeledSingle = Template.bind({});
ModeledSingle.args = {
language,
method,
modeledMethods: [createSinkModeledMethod(method)],
modelingStatus: "saved",
showMultipleModels: true,
};

export const MultipleModelingsModeledMultiple = Template.bind({});
MultipleModelingsModeledMultiple.args = {
export const ModeledMultiple = Template.bind({});
ModeledMultiple.args = {
language,
method,
modeledMethods: [
Expand All @@ -79,23 +69,21 @@ MultipleModelingsModeledMultiple.args = {
}),
],
modelingStatus: "saved",
showMultipleModels: true,
};

export const MultipleModelingsValidationFailedNeutral = Template.bind({});
MultipleModelingsValidationFailedNeutral.args = {
export const ValidationFailedNeutral = Template.bind({});
ValidationFailedNeutral.args = {
language,
method,
modeledMethods: [
createSinkModeledMethod(method),
createNeutralModeledMethod(method),
],
modelingStatus: "unsaved",
showMultipleModels: true,
};

export const MultipleModelingsValidationFailedDuplicate = Template.bind({});
MultipleModelingsValidationFailedDuplicate.args = {
export const ValidationFailedDuplicate = Template.bind({});
ValidationFailedDuplicate.args = {
language,
method,
modeledMethods: [
Expand All @@ -108,5 +96,4 @@ MultipleModelingsValidationFailedDuplicate.args = {
createSinkModeledMethod(method),
],
modelingStatus: "unsaved",
showMultipleModels: true,
};
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ LibraryRow.args = {
viewState: createMockModelEditorViewState({
showGenerateButton: true,
showLlmButton: true,
showMultipleModels: true,
}),
hideModeledMethods: false,
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { Meta, StoryFn } from "@storybook/react";
import { MethodRow as MethodRowComponent } from "../../view/model-editor/MethodRow";
import { CallClassification, Method } from "../../model-editor/method";
import { ModeledMethod } from "../../model-editor/modeled-method";
import {
MULTIPLE_MODELS_GRID_TEMPLATE_COLUMNS,
SINGLE_MODEL_GRID_TEMPLATE_COLUMNS,
} from "../../view/model-editor/ModeledMethodDataGrid";
import { MULTIPLE_MODELS_GRID_TEMPLATE_COLUMNS } from "../../view/model-editor/ModeledMethodDataGrid";
import { DataGrid } from "../../view/common/DataGrid";
import { createMockModelEditorViewState } from "../../../test/factories/model-editor/view-state";

Expand All @@ -35,12 +32,8 @@ const Template: StoryFn<typeof MethodRowComponent> = (args) => {
[args],
);

const gridTemplateColumns = args.viewState?.showMultipleModels
? MULTIPLE_MODELS_GRID_TEMPLATE_COLUMNS
: SINGLE_MODEL_GRID_TEMPLATE_COLUMNS;

return (
<DataGrid gridTemplateColumns={gridTemplateColumns}>
<DataGrid gridTemplateColumns={MULTIPLE_MODELS_GRID_TEMPLATE_COLUMNS}>
<MethodRowComponent
{...args}
modeledMethods={modeledMethods}
Expand Down Expand Up @@ -100,7 +93,6 @@ const modeledMethod: ModeledMethod = {
const viewState = createMockModelEditorViewState({
showGenerateButton: true,
showLlmButton: true,
showMultipleModels: true,
});

export const Unmodeled = Template.bind({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ModelEditor.args = {
},
showGenerateButton: true,
showLlmButton: true,
showMultipleModels: true,
}),
initialMethods: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MethodName } from "../model-editor/MethodName";
import { ModeledMethod } from "../../model-editor/modeled-method";
import { VSCodeTag } from "@vscode/webview-ui-toolkit/react";
import { ReviewInEditorButton } from "./ReviewInEditorButton";
import { ModeledMethodsPanel } from "./ModeledMethodsPanel";
import { MultipleModeledMethodsPanel } from "./MultipleModeledMethodsPanel";
import { QueryLanguage } from "../../common/query-language";

const Container = styled.div`
Expand Down Expand Up @@ -55,7 +55,6 @@ export type MethodModelingProps = {
method: Method;
modeledMethods: ModeledMethod[];
isModelingInProgress: boolean;
showMultipleModels?: boolean;
onChange: (methodSignature: string, modeledMethods: ModeledMethod[]) => void;
};

Expand All @@ -65,7 +64,6 @@ export const MethodModeling = ({
modeledMethods,
method,
isModelingInProgress,
showMultipleModels = false,
onChange,
}: MethodModelingProps): JSX.Element => {
return (
Expand All @@ -79,11 +77,10 @@ export const MethodModeling = ({
<ModelingStatusIndicator status={modelingStatus} />
<MethodName {...method} />
</DependencyContainer>
<ModeledMethodsPanel
<MultipleModeledMethodsPanel
language={language}
method={method}
modeledMethods={modeledMethods}
showMultipleModels={showMultipleModels}
isModelingInProgress={isModelingInProgress}
modelingStatus={modelingStatus}
onChange={onChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export function MethodModelingView({ initialViewState }: Props): JSX.Element {
method={method}
modeledMethods={modeledMethods}
isModelingInProgress={isModelingInProgress}
showMultipleModels={viewState?.showMultipleModels}
onChange={onChange}
/>
);
Expand Down

This file was deleted.

Loading

0 comments on commit a2f3f5f

Please sign in to comment.