Browse Source
Merge pull request #238 from Budibase/fix-reload-performance-issue
fix builder component library loading issue
pull/239/head
Martin McKeaveney
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
4 additions and
18 deletions
-
packages/builder/src/builderStore/store/index.js
-
packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte
-
packages/builder/src/components/userInterface/ComponentsHierarchy.svelte
-
packages/builder/src/components/userInterface/PageLayout.svelte
-
packages/builder/src/components/userInterface/StateBindingControl.svelte
-
packages/server/src/api/index.js
|
|
|
@ -11,10 +11,7 @@ import { |
|
|
|
makePropsSafe, |
|
|
|
getBuiltin, |
|
|
|
} from "components/userInterface/pagesParsing/createProps" |
|
|
|
import { |
|
|
|
fetchComponentLibModules, |
|
|
|
fetchComponentLibDefinitions, |
|
|
|
} from "../loadComponentLibraries" |
|
|
|
import { fetchComponentLibDefinitions } from "../loadComponentLibraries" |
|
|
|
import { buildCodeForScreens } from "../buildCodeForScreens" |
|
|
|
import { generate_screen_css } from "../generate_css" |
|
|
|
import { insertCodeMetadata } from "../insertCodeMetadata" |
|
|
|
@ -93,7 +90,7 @@ const setPackage = (store, initial) => async pkg => { |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
initial.libraries = await fetchComponentLibModules(pkg.application) |
|
|
|
initial.libraries = pkg.application.componentLibraries |
|
|
|
initial.components = await fetchComponentLibDefinitions(pkg.application._id) |
|
|
|
initial.appname = pkg.application.name |
|
|
|
initial.appId = pkg.application._id |
|
|
|
|
|
|
|
@ -46,7 +46,7 @@ |
|
|
|
|
|
|
|
$: frontendDefinition = { |
|
|
|
appId: $store.appId, |
|
|
|
libraries: Object.keys($store.libraries), |
|
|
|
libraries: $store.libraries, |
|
|
|
page: $store.currentPreviewItem, |
|
|
|
screens: screensExist |
|
|
|
? $store.currentPreviewItem._screens |
|
|
|
|
|
|
|
@ -36,11 +36,6 @@ |
|
|
|
sortBy("title"), |
|
|
|
]) |
|
|
|
|
|
|
|
const isScreenSelected = component => |
|
|
|
component.component && |
|
|
|
$store.currentPreviewItem && |
|
|
|
component.component.name === $store.currentPreviewItem.name |
|
|
|
|
|
|
|
const confirmDeleteComponent = component => { |
|
|
|
componentToDelete = component |
|
|
|
confirmDeleteDialog.show() |
|
|
|
|
|
|
|
@ -34,11 +34,6 @@ |
|
|
|
title: lastPartOfName(layout), |
|
|
|
} |
|
|
|
|
|
|
|
const isScreenSelected = component => |
|
|
|
component.component && |
|
|
|
$store.currentPreviewItem && |
|
|
|
component.component.name === $store.currentPreviewItem.name |
|
|
|
|
|
|
|
const confirmDeleteComponent = async component => { |
|
|
|
componentToDelete = component |
|
|
|
confirmDeleteDialog.show() |
|
|
|
|
|
|
|
@ -49,8 +49,6 @@ |
|
|
|
{/if} |
|
|
|
{/each} |
|
|
|
</select> |
|
|
|
{:else if type === 'colour'} |
|
|
|
<Colorpicker {onChanged} {value} /> |
|
|
|
{:else} |
|
|
|
<PropertyCascader {onChanged} {value} /> |
|
|
|
{/if} |
|
|
|
|
|
|
|
@ -30,6 +30,7 @@ router |
|
|
|
deflate: { |
|
|
|
flush: zlib.Z_SYNC_FLUSH, |
|
|
|
}, |
|
|
|
br: false, |
|
|
|
}) |
|
|
|
) |
|
|
|
.use(async (ctx, next) => { |
|
|
|
|