Merge branch 'dev-experience' of github.com:Budibase/budibase into dev-experience
This commit is contained in:
commit
0d0c2cde32
|
@ -48,11 +48,11 @@ export default function positionDropdown(element, { anchor, align }) {
|
||||||
element.style.left = `${calcLeftPosition(dimensions).toFixed(0)}px`
|
element.style.left = `${calcLeftPosition(dimensions).toFixed(0)}px`
|
||||||
|
|
||||||
const resizeObserver = new ResizeObserver(entries => {
|
const resizeObserver = new ResizeObserver(entries => {
|
||||||
for (let entry of entries) {
|
entries.forEach(() => {
|
||||||
dimensions = getDimensions()
|
dimensions = getDimensions()
|
||||||
element.style[positionSide] = `${dimensions[positionSide]}px`
|
element.style[positionSide] = `${dimensions[positionSide]}px`
|
||||||
element.style.left = `${calcLeftPosition(dimensions).toFixed(0)}px`
|
element.style.left = `${calcLeftPosition(dimensions).toFixed(0)}px`
|
||||||
}
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
resizeObserver.observe(anchor)
|
resizeObserver.observe(anchor)
|
||||||
|
|
|
@ -11,8 +11,6 @@ const createNotificationStore = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let timers = []
|
|
||||||
|
|
||||||
const notifications = derived(_notifications, ($_notifications, set) => {
|
const notifications = derived(_notifications, ($_notifications, set) => {
|
||||||
set($_notifications)
|
set($_notifications)
|
||||||
if ($_notifications.length > 0) {
|
if ($_notifications.length > 0) {
|
||||||
|
|
|
@ -109,7 +109,8 @@ context("Create a View", () => {
|
||||||
.find(".ag-cell")
|
.find(".ag-cell")
|
||||||
.then($values => {
|
.then($values => {
|
||||||
const values = Array.from($values).map(value => value.textContent)
|
const values = Array.from($values).map(value => value.textContent)
|
||||||
expect(values.sort()).to.deep.eq([
|
expect(values.sort()).to.deep.eq(
|
||||||
|
[
|
||||||
"Students",
|
"Students",
|
||||||
"23.333333333333332",
|
"23.333333333333332",
|
||||||
"1650",
|
"1650",
|
||||||
|
@ -117,7 +118,8 @@ context("Create a View", () => {
|
||||||
"25",
|
"25",
|
||||||
"20",
|
"20",
|
||||||
"70",
|
"70",
|
||||||
].sort())
|
].sort()
|
||||||
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ Cypress.Commands.add("createApp", name => {
|
||||||
|
|
||||||
Cypress.Commands.add("deleteApp", name => {
|
Cypress.Commands.add("deleteApp", name => {
|
||||||
cy.visit(`localhost:${Cypress.env("PORT")}/builder`)
|
cy.visit(`localhost:${Cypress.env("PORT")}/builder`)
|
||||||
cy.get("body").then($body => {
|
cy.get(".apps").then($apps => {
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
if ($body.find(`[data-cy="app-${name}"]`).length) {
|
if ($apps.find(`[data-cy="app-${name}"]`).length) {
|
||||||
cy.get(`[data-cy="app-${name}"] a`).click()
|
cy.get(`[data-cy="app-${name}"] a`).click()
|
||||||
cy.get("[data-cy=settings-icon]").click()
|
cy.get("[data-cy=settings-icon]").click()
|
||||||
cy.get(".modal-content").within(() => {
|
cy.get(".modal-content").within(() => {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
notifier.success(`View ${name} created`)
|
notifier.success(`View ${name} created`)
|
||||||
onClosed()
|
onClosed()
|
||||||
analytics.captureEvent("View Created", { name })
|
analytics.captureEvent("View Created", { name })
|
||||||
$goto(`../../../view/${name}`)
|
$goto(`../../view/${name}`)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,10 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#await promise}
|
||||||
|
<!-- This should probably be some kind of loading state? -->
|
||||||
|
<div class="loading" />
|
||||||
|
{:then _}
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
<div class="topleftnav">
|
<div class="topleftnav">
|
||||||
|
@ -92,18 +96,20 @@
|
||||||
Request feature
|
Request feature
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#await promise}
|
|
||||||
<!-- This should probably be some kind of loading state? -->
|
|
||||||
<div />
|
|
||||||
{:then _}
|
|
||||||
<slot />
|
<slot />
|
||||||
|
</div>
|
||||||
{:catch error}
|
{:catch error}
|
||||||
<p>Something went wrong: {error.message}</p>
|
<p>Something went wrong: {error.message}</p>
|
||||||
{/await}
|
{/await}
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.loading {
|
||||||
|
min-height: 100%;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background: var(--background);
|
||||||
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
let previousType
|
let previousType
|
||||||
let previousAsset
|
let previousAsset
|
||||||
let previousComponentId
|
let previousComponentId
|
||||||
|
let hydrationComplete = false
|
||||||
|
|
||||||
// Hydrate state from URL params
|
// Hydrate state from URL params
|
||||||
$: hydrateStateFromURL($params, $leftover)
|
$: hydrateStateFromURL($params, $leftover)
|
||||||
|
@ -30,6 +31,12 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
const hydrateStateFromURL = (params, leftover) => {
|
const hydrateStateFromURL = (params, leftover) => {
|
||||||
|
if (hydrationComplete) {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
hydrationComplete = true
|
||||||
|
}
|
||||||
|
|
||||||
// Do nothing if no asset type, as that means we've left the page
|
// Do nothing if no asset type, as that means we've left the page
|
||||||
if (!params.assetType) {
|
if (!params.assetType) {
|
||||||
return
|
return
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default ({ mode }) => {
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
include: ['ag-grid-community'],
|
include: ["ag-grid-community"],
|
||||||
exclude: ["@roxi/routify"],
|
exclude: ["@roxi/routify"],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|
Loading…
Reference in New Issue