1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-06 22:08:52 +00:00

Use small/dense style for Element Panel's Fields

This commit is contained in:
Tsering Paljor 2024-07-12 08:06:25 +00:00
parent ad55157f53
commit 10fec15531
22 changed files with 24 additions and 29 deletions

View file

@ -0,0 +1,7 @@
{
"type": "refactor",
"message": "[Builder] Ensure the Element Panel's Dropdown and Input fields use the dense style.",
"issue_number": 2705,
"bullet_points": [],
"created_at": "2024-07-11"
}

View file

@ -13,6 +13,7 @@
...applicationContextAdditions, ...applicationContextAdditions,
} }
" "
:small="small"
v-on="$listeners" v-on="$listeners"
> >
<template #after-input> <template #after-input>
@ -54,6 +55,11 @@ export default {
required: false, required: false,
default: () => {}, default: () => {},
}, },
small: {
type: Boolean,
required: false,
default: true,
},
}, },
computed: { computed: {
dataSourceLoading() { dataSourceLoading() {

View file

@ -1,7 +1,6 @@
<template> <template>
<div class="padding-selector"> <div class="padding-selector">
<FormInput <FormInput
small
:value="value.horizontal" :value="value.horizontal"
type="number" type="number"
remove-number-input-controls remove-number-input-controls
@ -12,7 +11,6 @@
@blur="$emit('blur')" @blur="$emit('blur')"
/> />
<FormInput <FormInput
small
:value="value.vertical" :value="value.vertical"
type="number" type="number"
remove-number-input-controls remove-number-input-controls

View file

@ -1,6 +1,5 @@
<template> <template>
<FormInput <FormInput
small
:value="value" :value="value"
type="number" type="number"
remove-number-input-controls remove-number-input-controls

View file

@ -2,7 +2,6 @@
<form @submit.prevent @keydown.enter.prevent> <form @submit.prevent @keydown.enter.prevent>
<ApplicationBuilderFormulaInputGroup <ApplicationBuilderFormulaInputGroup
v-model="values.value" v-model="values.value"
small
:label="$t('textFieldForm.fieldValueLabel')" :label="$t('textFieldForm.fieldValueLabel')"
:placeholder="$t('textFieldForm.fieldValuePlaceholder')" :placeholder="$t('textFieldForm.fieldValuePlaceholder')"
:data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS" :data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS"

View file

@ -2,7 +2,6 @@
<form @submit.prevent @keydown.enter.prevent> <form @submit.prevent @keydown.enter.prevent>
<ApplicationBuilderFormulaInputGroup <ApplicationBuilderFormulaInputGroup
v-model="values.label" v-model="values.label"
small
:label="$t('generalForm.labelTitle')" :label="$t('generalForm.labelTitle')"
:placeholder="$t('buttonFieldForm.labelPlaceholder')" :placeholder="$t('buttonFieldForm.labelPlaceholder')"
:data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS" :data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS"

View file

@ -2,7 +2,6 @@
<form @submit.prevent @keydown.enter.prevent> <form @submit.prevent @keydown.enter.prevent>
<ApplicationBuilderFormulaInputGroup <ApplicationBuilderFormulaInputGroup
v-model="values.link_name" v-model="values.link_name"
small
:label="$t('linkFieldForm.fieldLinkNameLabel')" :label="$t('linkFieldForm.fieldLinkNameLabel')"
:placeholder="$t('linkFieldForm.fieldLinkNamePlaceholder')" :placeholder="$t('linkFieldForm.fieldLinkNamePlaceholder')"
:data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS" :data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS"

View file

@ -2,7 +2,6 @@
<form @submit.prevent @keydown.enter.prevent> <form @submit.prevent @keydown.enter.prevent>
<ApplicationBuilderFormulaInputGroup <ApplicationBuilderFormulaInputGroup
v-model="values.values" v-model="values.values"
small
:label="$t('tagsFieldForm.fieldValuesLabel')" :label="$t('tagsFieldForm.fieldValuesLabel')"
:placeholder="$t('tagsFieldForm.fieldValuesPlaceholder')" :placeholder="$t('tagsFieldForm.fieldValuesPlaceholder')"
:data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS" :data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS"
@ -12,7 +11,6 @@
<ApplicationBuilderFormulaInputGroup <ApplicationBuilderFormulaInputGroup
v-if="values.colors_is_formula" v-if="values.colors_is_formula"
v-model="values.colors" v-model="values.colors"
small
:label="$t('tagsFieldForm.fieldColorsLabel')" :label="$t('tagsFieldForm.fieldColorsLabel')"
:placeholder="$t('tagsFieldForm.fieldColorsPlaceholder')" :placeholder="$t('tagsFieldForm.fieldColorsPlaceholder')"
:data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS" :data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS"

View file

@ -2,7 +2,6 @@
<form @submit.prevent @keydown.enter.prevent> <form @submit.prevent @keydown.enter.prevent>
<ApplicationBuilderFormulaInputGroup <ApplicationBuilderFormulaInputGroup
v-model="values.value" v-model="values.value"
small
:label="$t('textFieldForm.fieldValueLabel')" :label="$t('textFieldForm.fieldValueLabel')"
:placeholder="$t('textFieldForm.fieldValuePlaceholder')" :placeholder="$t('textFieldForm.fieldValuePlaceholder')"
:data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS" :data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS"

View file

@ -19,6 +19,7 @@
<Dropdown <Dropdown
v-model="selectedRoleType" v-model="selectedRoleType"
:placeholder="$t('visibilityForm.roleTypesHint')" :placeholder="$t('visibilityForm.roleTypesHint')"
small
> >
<DropdownItem <DropdownItem
v-for="(value, key) in roleTypeOptions" v-for="(value, key) in roleTypeOptions"

View file

@ -6,7 +6,7 @@
small-label small-label
:label="$t('columnElementForm.columnAmountTitle')" :label="$t('columnElementForm.columnAmountTitle')"
> >
<Dropdown v-model="values.column_amount" :show-search="false"> <Dropdown v-model="values.column_amount" :show-search="false" small>
<DropdownItem <DropdownItem
v-for="columnAmount in columnAmounts" v-for="columnAmount in columnAmounts"
:key="columnAmount.value" :key="columnAmount.value"
@ -27,7 +27,6 @@
> >
<FormInput <FormInput
v-model="values.column_gap" v-model="values.column_gap"
size="large"
:label="$t('columnElementForm.columnGapTitle')" :label="$t('columnElementForm.columnGapTitle')"
:placeholder="$t('columnElementForm.columnGapPlaceholder')" :placeholder="$t('columnElementForm.columnGapPlaceholder')"
type="number" type="number"

View file

@ -14,7 +14,7 @@
:label="$t('headingElementForm.levelTitle')" :label="$t('headingElementForm.levelTitle')"
class="margin-bottom-2" class="margin-bottom-2"
> >
<Dropdown v-model="values.level" :show-search="false"> <Dropdown v-model="values.level" :show-search="false" small>
<DropdownItem <DropdownItem
v-for="level in levels" v-for="level in levels"
:key="level.value" :key="level.value"

View file

@ -53,7 +53,6 @@
> >
<FormInput <FormInput
v-model="values.height" v-model="values.height"
size="large"
type="number" type="number"
:placeholder="$t('iframeElementForm.heightPlaceholder')" :placeholder="$t('iframeElementForm.heightPlaceholder')"
:to-value="(value) => parseInt(value)" :to-value="(value) => parseInt(value)"

View file

@ -37,7 +37,7 @@
required required
class="margin-bottom-2" class="margin-bottom-2"
> >
<Dropdown v-model="values.validation_type" :show-search="true"> <Dropdown v-model="values.validation_type" :show-search="true" small>
<DropdownItem <DropdownItem
v-for="validationType in validationTypes" v-for="validationType in validationTypes"
:key="validationType.name" :key="validationType.name"
@ -78,7 +78,6 @@
<FormInput <FormInput
v-model="values.rows" v-model="values.rows"
type="number" type="number"
size="large"
:label="$t('inputTextElementForm.rowsTitle')" :label="$t('inputTextElementForm.rowsTitle')"
:placeholder="$t('inputTextElementForm.rowsPlaceholder')" :placeholder="$t('inputTextElementForm.rowsPlaceholder')"
:to-value="(value) => parseInt(value)" :to-value="(value) => parseInt(value)"
@ -97,7 +96,7 @@
required required
class="margin-bottom-2" class="margin-bottom-2"
> >
<Dropdown v-model="values.input_type" :show-search="false"> <Dropdown v-model="values.input_type" :show-search="false" small>
<DropdownItem <DropdownItem
v-for="inputType in inputTypes" v-for="inputType in inputTypes"
:key="inputType.name" :key="inputType.name"

View file

@ -23,7 +23,6 @@
:placeholder="$t('linkElementForm.textPlaceholder')" :placeholder="$t('linkElementForm.textPlaceholder')"
:data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS" :data-providers-allowed="DATA_PROVIDERS_ALLOWED_ELEMENTS"
/> />
<LinkNavigationSelectionForm <LinkNavigationSelectionForm
:default-values="defaultValues" :default-values="defaultValues"
@values-changed="emitChange($event)" @values-changed="emitChange($event)"

View file

@ -46,7 +46,6 @@
:label="$t('linkNavigationSelection.url')" :label="$t('linkNavigationSelection.url')"
:placeholder="$t('linkNavigationSelection.urlPlaceholder')" :placeholder="$t('linkNavigationSelection.urlPlaceholder')"
:data-providers-allowed="dataProvidersAllowed" :data-providers-allowed="dataProvidersAllowed"
small
/> />
</FormGroup> </FormGroup>
<FormGroup v-if="destinationPage" class="margin-bottom-2" required> <FormGroup v-if="destinationPage" class="margin-bottom-2" required>
@ -74,7 +73,6 @@
horizontal horizontal
:placeholder="$t('linkNavigationSelection.paramPlaceholder')" :placeholder="$t('linkNavigationSelection.paramPlaceholder')"
:data-providers-allowed="dataProvidersAllowed" :data-providers-allowed="dataProvidersAllowed"
small
/> />
</div> </div>
</div> </div>

View file

@ -6,7 +6,7 @@
required required
class="margin-bottom-2" class="margin-bottom-2"
> >
<Dropdown v-model="values.data_source_id" :show-search="false"> <Dropdown v-model="values.data_source_id" :show-search="false" small>
<DropdownItem <DropdownItem
v-for="dataSource in availableDataSources" v-for="dataSource in availableDataSources"
:key="dataSource.id" :key="dataSource.id"
@ -35,7 +35,6 @@
> >
<FormInput <FormInput
v-model="values.items_per_page" v-model="values.items_per_page"
size="large"
:placeholder="$t('repeatElementForm.itemsPerPagePlaceholder')" :placeholder="$t('repeatElementForm.itemsPerPagePlaceholder')"
:to-value="(value) => parseInt(value)" :to-value="(value) => parseInt(value)"
class="margin-bottom-2" class="margin-bottom-2"

View file

@ -7,7 +7,7 @@
:label="$t('tableElementForm.dataSource')" :label="$t('tableElementForm.dataSource')"
> >
<div @click="userHasChangedDataSource = true"> <div @click="userHasChangedDataSource = true">
<Dropdown v-model="values.data_source_id" :show-search="false"> <Dropdown v-model="values.data_source_id" :show-search="false" small>
<DropdownItem <DropdownItem
v-for="dataSource in availableDataSources" v-for="dataSource in availableDataSources"
:key="dataSource.id" :key="dataSource.id"
@ -27,7 +27,6 @@
> >
<FormInput <FormInput
v-model="values.items_per_page" v-model="values.items_per_page"
size="large"
:placeholder="$t('tableElementForm.itemsPerPagePlaceholder')" :placeholder="$t('tableElementForm.itemsPerPagePlaceholder')"
:to-value="(value) => parseInt(value)" :to-value="(value) => parseInt(value)"
type="number" type="number"
@ -132,9 +131,9 @@
:label="$t('tableElementForm.fieldType')" :label="$t('tableElementForm.fieldType')"
> >
<Dropdown <Dropdown
small
:value="field.type" :value="field.type"
:show-search="false" :show-search="false"
small
@input="changeFieldType(field, $event)" @input="changeFieldType(field, $event)"
> >
<DropdownItem <DropdownItem

View file

@ -61,7 +61,7 @@
required required
class="margin-bottom-1" class="margin-bottom-1"
> >
<Dropdown v-model="values.style_width"> <Dropdown v-model="values.style_width" small>
<DropdownItem <DropdownItem
v-for="type in Object.values(WIDTH_TYPES)" v-for="type in Object.values(WIDTH_TYPES)"
:key="type.value" :key="type.value"

View file

@ -39,7 +39,6 @@
> >
<FormInput <FormInput
v-model="values.image_max_width" v-model="values.image_max_width"
small
type="number" type="number"
:min="0" :min="0"
:max="100" :max="100"
@ -78,7 +77,6 @@
> >
<FormInput <FormInput
v-model="imageMaxHeight" v-model="imageMaxHeight"
small
type="number" type="number"
remove-number-input-controls remove-number-input-controls
:placeholder="$t('imageThemeConfigBlock.maxHeightPlaceholder')" :placeholder="$t('imageThemeConfigBlock.maxHeightPlaceholder')"

View file

@ -2,7 +2,7 @@
<form @submit.prevent> <form @submit.prevent>
<FormGroup :label="$t('tableElementForm.dataSource')" small-label required> <FormGroup :label="$t('tableElementForm.dataSource')" small-label required>
<div class="control__elements"> <div class="control__elements">
<Dropdown v-model="values.data_source_id" :show-search="false"> <Dropdown v-model="values.data_source_id" :show-search="false" small>
<DropdownItem <DropdownItem
v-for="dataSource in dataSources" v-for="dataSource in dataSources"
:key="dataSource.id" :key="dataSource.id"

View file

@ -2,7 +2,7 @@
<Dropdown <Dropdown
:value="value" :value="value"
fixed-items fixed-items
:small="small" small
class="integration-dropdown" class="integration-dropdown"
:disabled="disabled || !integrationType" :disabled="disabled || !integrationType"
:placeholder=" :placeholder="