chore: Query Editor full width option (#37138)
This commit is contained in:
parent
38c9bc0afc
commit
ee02c0f17e
|
|
@ -211,7 +211,7 @@ const FormRender = (props: Props) => {
|
|||
|
||||
switch (section.controlType) {
|
||||
case "SECTION_V2":
|
||||
return <Section>{children}</Section>;
|
||||
return <Section isFullWidth={section.isFullWidth}>{children}</Section>;
|
||||
|
||||
case "SINGLE_COLUMN_ZONE":
|
||||
case "DOUBLE_COLUMN_ZONE": {
|
||||
|
|
|
|||
|
|
@ -21,10 +21,14 @@ import { actionPathFromName } from "components/formControls/utils";
|
|||
import type { EvaluationSubstitutionType } from "entities/DataTree/dataTreeFactory";
|
||||
import { getSqlEditorModeFromPluginName } from "components/editorComponents/CodeEditor/sql/config";
|
||||
import { selectFeatureFlags } from "ee/selectors/featureFlagsSelectors";
|
||||
import { Flex } from "@appsmith/ads";
|
||||
|
||||
const Wrapper = styled.div<{ fullWidth: boolean }>`
|
||||
const Wrapper = styled.div`
|
||||
min-width: 380px;
|
||||
max-width: ${({ fullWidth }) => (fullWidth ? "100%" : "872px;")};
|
||||
width: 100%;
|
||||
min-height: 200px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
`;
|
||||
|
||||
interface DynamicTextControlState {
|
||||
|
|
@ -64,25 +68,24 @@ class DynamicTextControl extends BaseControl<
|
|||
: EditorModes.JSON_WITH_BINDING;
|
||||
|
||||
return (
|
||||
<Wrapper
|
||||
className={`t--${configProperty} dynamic-text-field-control`}
|
||||
fullWidth={isActionRedesignEnabled}
|
||||
>
|
||||
<DynamicTextField
|
||||
dataTreePath={dataTreePath}
|
||||
disabled={this.props.disabled}
|
||||
evaluatedPopUpLabel={this?.props?.label}
|
||||
evaluationSubstitutionType={evaluationSubstitutionType}
|
||||
height="200px"
|
||||
mode={mode}
|
||||
name={this.props.configProperty}
|
||||
placeholder={placeholderText}
|
||||
showLineNumbers={
|
||||
isActionRedesignEnabled || this.props.showLineNumbers
|
||||
}
|
||||
size={EditorSize.EXTENDED}
|
||||
tabBehaviour={TabBehaviour.INDENT}
|
||||
/>
|
||||
<Wrapper className={`t--${configProperty} dynamic-text-field-control`}>
|
||||
<Flex flex="1">
|
||||
<DynamicTextField
|
||||
dataTreePath={dataTreePath}
|
||||
disabled={this.props.disabled}
|
||||
evaluatedPopUpLabel={this?.props?.label}
|
||||
evaluationSubstitutionType={evaluationSubstitutionType}
|
||||
height="100%"
|
||||
mode={mode}
|
||||
name={this.props.configProperty}
|
||||
placeholder={placeholderText}
|
||||
showLineNumbers={
|
||||
isActionRedesignEnabled || this.props.showLineNumbers
|
||||
}
|
||||
size={EditorSize.EXTENDED}
|
||||
tabBehaviour={TabBehaviour.INDENT}
|
||||
/>
|
||||
</Flex>
|
||||
</Wrapper>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"controlType": "SECTION_V2",
|
||||
"identifier": "SECTION-ONE",
|
||||
"isFullWidth": true,
|
||||
"children": [
|
||||
{
|
||||
"controlType": "SINGLE_COLUMN_ZONE",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user