Skip to content

Commit ca72db9

Browse files
jrmijonadeline
andauthored
Nuxt3 builder fixes and cleanup (baserow#4657)
* Fix preview error with page parameter * Fix OIDC form support * Fix input border color * Fix some builder inputs * Clear some TODO MIGs * Clean comments * Update snapshot * Fix page title * Fix reactivity issue * refactor: replace individual RadioButtons with a RadioGroup component for choice option type selection. * Fix domain --------- Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
1 parent 039ed8a commit ca72db9

41 files changed

Lines changed: 65 additions & 756 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

enterprise/web-frontend/modules/baserow_enterprise/integrations/common/components/CommonOIDCSettingForm.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export default {
123123
this.$emit('values-changed', values)
124124
},
125125
checkValidity() {
126-
if (!this.$refs.form.isFormValid() && this.$refs.form.v$.$anyDirty) {
126+
if (
127+
this.$refs.form &&
128+
!this.$refs.form.isFormValid() &&
129+
this.$refs.form.v$.$anyDirty
130+
) {
127131
this.inError = true
128132
} else {
129133
this.inError = false

enterprise/web-frontend/modules/baserow_enterprise/plugin.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ import {
2020
} from '@baserow_enterprise/authProviderTypes'
2121
import { TeamsWorkspaceSettingsPageType } from '@baserow_enterprise/workspaceSettingsPageTypes'
2222
import { EnterpriseMembersPagePluginType } from '@baserow_enterprise/membersPagePluginTypes'
23-
import en from '@baserow_enterprise/locales/en.json'
24-
import fr from '@baserow_enterprise/locales/fr.json'
25-
import nl from '@baserow_enterprise/locales/nl.json'
26-
import de from '@baserow_enterprise/locales/de.json'
27-
import es from '@baserow_enterprise/locales/es.json'
28-
import it from '@baserow_enterprise/locales/it.json'
29-
import ko from '@baserow_enterprise/locales/ko.json'
3023
import {
3124
AdvancedLicenseType,
3225
EnterpriseLicenseType,
@@ -100,18 +93,6 @@ export default defineNuxtPlugin({
10093

10194
const context = { app: nuxtApp }
10295

103-
// Allow locale file hot reloading
104-
/*if (isDev && app.i18n) {
105-
const { i18n } = app
106-
i18n.mergeLocaleMessage('en', en)
107-
i18n.mergeLocaleMessage('fr', fr)
108-
i18n.mergeLocaleMessage('nl', nl)
109-
i18n.mergeLocaleMessage('de', de)
110-
i18n.mergeLocaleMessage('es', es)
111-
i18n.mergeLocaleMessage('it', it)
112-
i18n.mergeLocaleMessage('ko', ko)
113-
}*/
114-
11596
$registry.register('plugin', new EnterprisePlugin(context))
11697

11798
$registry.register(

web-frontend/modules/automation/locales/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"automationWorkflow": {
3+
"title": "Worflow"
4+
},
25
"automationWelcomeGuidedTourStep": {
36
"title": "Welcome to Baserow Automations!",
47
"content": "Let's take a quick tour. You'll see how to set up triggers, add actions, test your workflow, and publish it — no coding required."

web-frontend/modules/automation/pages/automationWorkflow.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ definePageMeta({
6363
],
6464
})
6565
66+
const { t } = useI18n()
67+
68+
useHead(() => ({
69+
title: t('automationWorkflow.title'),
70+
}))
71+
6672
const route = useRoute()
6773
const { $store, $registry } = useNuxtApp()
6874

web-frontend/modules/builder/components/domain/CustomDomainForm.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default {
2727
mixins: [domainForm],
2828
emits: ['error'],
2929
setup() {
30-
return { v$: useVuelidate() }
30+
return { v$: useVuelidate({ $lazy: true }) }
3131
},
3232
data() {
3333
return {
@@ -47,9 +47,6 @@ export default {
4747
: ''
4848
},
4949
},
50-
mounted() {
51-
this.$refs.domainName.focus()
52-
},
5350
methods: {
5451
handleInput() {
5552
this.serverErrors.domain_name = null

web-frontend/modules/builder/components/elements/baseComponents/ABRadio.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="ab-radio" @click="toggle">
33
<input
44
type="radio"
5-
:checked="value"
5+
:checked="modelValue"
66
:required="required"
77
class="ab-radio__input"
88
:disabled="disabled"
@@ -25,7 +25,7 @@ export default {
2525
/**
2626
* The state of the radio.
2727
*/
28-
value: {
28+
modelValue: {
2929
type: Boolean,
3030
required: false,
3131
default: false,
@@ -63,7 +63,7 @@ export default {
6363
default: false,
6464
},
6565
},
66-
emits: ['input'],
66+
emits: ['update:modelValue'],
6767
computed: {
6868
hasSlot() {
6969
return !!this.$slots.default
@@ -72,7 +72,7 @@ export default {
7272
methods: {
7373
toggle() {
7474
if (this.disabled || this.readOnly) return
75-
this.$emit('input', !this.value)
75+
this.$emit('update:modelValue', !this.value)
7676
},
7777
},
7878
}

web-frontend/modules/builder/components/elements/components/ChoiceElement.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
:key="option.id"
3232
:read-only="isEditMode"
3333
:error="displayFormDataError"
34-
:value="inputValue.includes(option.value)"
35-
@input="onOptionChange(option, $event)"
34+
:model-value="inputValue.includes(option.value)"
35+
@update:model-value="onOptionChange(option, $event)"
3636
>
3737
{{ option.name || option.value }}
3838
</ABCheckbox>
@@ -43,8 +43,8 @@
4343
:key="option.id"
4444
:read-only="isEditMode"
4545
:error="displayFormDataError"
46-
:value="option.value === inputValue"
47-
@input="onOptionChange(option, $event)"
46+
:model-value="option.value === inputValue"
47+
@update:model-value="onOptionChange(option, $event)"
4848
>
4949
{{ option.name || option.value }}
5050
</ABRadio>

web-frontend/modules/builder/components/elements/components/forms/general/ChoiceElementForm.vue

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,11 @@
7676
required
7777
class="margin-bottom-2"
7878
>
79-
<RadioButton
80-
v-model="values.option_type"
81-
:value="CHOICE_OPTION_TYPES.MANUAL"
82-
icon="iconoir-open-select-hand-gesture"
83-
>
84-
{{ $t('choiceOptionSelector.manual') }}
85-
</RadioButton>
86-
<RadioButton
79+
<RadioGroup
8780
v-model="values.option_type"
88-
:value="CHOICE_OPTION_TYPES.FORMULAS"
89-
icon="iconoir-sigma-function"
90-
>
91-
{{ $t('choiceOptionSelector.formulas') }}
92-
</RadioButton>
81+
:options="optionTypeOptions"
82+
type="button"
83+
/>
9384
</FormGroup>
9485
<template v-if="values.option_type === CHOICE_OPTION_TYPES.MANUAL">
9586
<template v-if="values.options.length">
@@ -252,6 +243,20 @@ export default {
252243
},
253244
]
254245
},
246+
optionTypeOptions() {
247+
return [
248+
{
249+
label: this.$t('choiceOptionSelector.manual'),
250+
value: CHOICE_OPTION_TYPES.MANUAL,
251+
icon: 'iconoir-open-select-hand-gesture',
252+
},
253+
{
254+
label: this.$t('choiceOptionSelector.formulas'),
255+
value: CHOICE_OPTION_TYPES.FORMULAS,
256+
icon: 'iconoir-sigma-function',
257+
},
258+
]
259+
},
255260
},
256261
watch: {
257262
'element.options'(options) {

web-frontend/modules/builder/components/userSource/UpdateUserSourceForm.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
/>
3030
</FormGroup>
3131
</FormRow>
32-
3332
<component
3433
:is="userSourceType.formComponent"
3534
v-if="integration"
@@ -104,11 +103,11 @@
104103
import { useVuelidate } from '@vuelidate/core'
105104
import form from '@baserow/modules/core/mixins/form'
106105
import IntegrationDropdown from '@baserow/modules/core/components/integrations/IntegrationDropdown'
107-
import AuthProviderWithModal from '@baserow/modules/builder/components/userSource/AuthProviderWithModal'
108106
import { required, maxLength, helpers } from '@vuelidate/validators'
107+
import _ from 'lodash'
109108
110109
export default {
111-
components: { IntegrationDropdown, AuthProviderWithModal },
110+
components: { IntegrationDropdown },
112111
mixins: [form],
113112
props: {
114113
builder: {

web-frontend/modules/builder/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@
494494
"numericName": "Numeric"
495495
},
496496
"pageEditor": {
497-
"title": "Baserow | Application Builder",
497+
"title": "Application Builder",
498498
"pageNotFound": "Page not found"
499499
},
500500
"publicPage": {

0 commit comments

Comments
 (0)