forked from windmill-labs/windmill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): add quick access menu in flow editor (windmill-labs#4415
) * (frontend) add quick access menu in flow editor * (frontend) add quick access menu in flow editor * improve UI * make design prettier * add scroll effects * improve loading preview * change no items found * prevent scroll using menu * change user folder button * set default integration icon * reduce column width * ajust font * add defaults script button * add shadow divider * fix scroll * add chevron * Change toogle bar * Add preprocessor menu * add handler * simplify scroll * fix display * fix minor issues * delete useless log * revert node tree changes * merge main * fix z-index issues * iterate * fix: improve allowed domains setting for sso * chore(main): release 1.402.3 (windmill-labs#4458) * chore(main): release 1.402.3 * Apply automatic changes --------- Co-authored-by: rubenfiszel <[email protected]> * improve allowed domains change handling * send stats when renewing key if last >24h (windmill-labs#4430) * feat: send stats when renewing key if last >24h * nits * fix: sqlx * nit * renewal reason * stats reason * update ee ref * Update ee-repo-ref.txt --------- Co-authored-by: Ruben Fiszel <[email protected]> * fix: skip one migration to avoid using md5 for azure support * all * all * Apply automatic changes * all * done? * nit * nit * nit * nit * nit noAi if prefilter is not all * fix shadow * fix error handler * fix error handler * Polishing default script settings * all * all * full * all * add deno_core as features * all * remove warnings * all * npm check * npm check * new script script * nits * nits item 0 * nits item 0 --------- Co-authored-by: Guilhem Le Mouel <[email protected]> Co-authored-by: Ruben Fiszel <[email protected]> Co-authored-by: Ruben Fiszel <[email protected]> Co-authored-by: rubenfiszel <[email protected]> Co-authored-by: HugoCasa <[email protected]> Co-authored-by: Guilhem <[email protected]>
- Loading branch information
1 parent
48a85e1
commit 45ccd45
Showing
39 changed files
with
1,995 additions
and
341 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
backend/migrations/20240930183601_add_preprocessor_kind.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- Add down migration script here |
2 changes: 2 additions & 0 deletions
2
backend/migrations/20240930183601_add_preprocessor_kind.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- Add up migration script here | ||
ALTER TYPE SCRIPT_KIND ADD VALUE IF NOT EXISTS 'preprocessor'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<script lang="ts"> | ||
import { onMount, onDestroy } from 'svelte' | ||
import { twMerge } from 'tailwind-merge' | ||
let isAtBottom: boolean = false | ||
let isScrollable = false | ||
export let scrollableClass: string = '' | ||
export let shiftedShadow: boolean = false | ||
let mutationObserver: MutationObserver | ||
let el: HTMLDivElement | ||
function handleScroll(event) { | ||
const scrollableElement = event.target | ||
isAtBottom = | ||
scrollableElement.scrollTop + scrollableElement.offsetHeight >= | ||
scrollableElement.scrollHeight - 2 | ||
} | ||
function checkIfScrollable(el) { | ||
return el.scrollHeight > el.clientHeight | ||
} | ||
function observeScrollability(el) { | ||
isScrollable = checkIfScrollable(el) | ||
mutationObserver = new MutationObserver(() => { | ||
isScrollable = checkIfScrollable(el) | ||
}) | ||
mutationObserver?.observe(el, { childList: true, subtree: true, characterData: true }) | ||
} | ||
export function scrollIntoView(top: number) { | ||
el.scrollTo({ top, behavior: 'smooth' }) | ||
} | ||
onMount(() => { | ||
observeScrollability(el) | ||
}) | ||
onDestroy(() => { | ||
mutationObserver?.disconnect() | ||
}) | ||
</script> | ||
|
||
<div class={twMerge('relative pb-1', scrollableClass)}> | ||
<div bind:this={el} on:scroll={handleScroll} class="w-full h-full overflow-y-auto"> | ||
<slot /> | ||
</div> | ||
{#if !isAtBottom && isScrollable} | ||
<div | ||
class="pointer-events-none absolute bottom-0 {shiftedShadow | ||
? 'left-2' | ||
: 'right-0'} h-14 w-full bg-gradient-to-t from-surface to-transparent" | ||
/> | ||
{/if} | ||
</div> |
15 changes: 15 additions & 0 deletions
15
frontend/src/lib/components/ToggleHubWorkspaceQuick.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script lang="ts"> | ||
import { WindmillIcon2 } from './icons' | ||
import ToggleButtonGroup from './common/toggleButton-v2/ToggleButtonGroup.svelte' | ||
import ToggleButton from './common/toggleButton-v2/ToggleButton.svelte' | ||
import { Building } from 'lucide-svelte' | ||
export let selected: 'all' | 'hub' | 'workspace' = 'all' | ||
</script> | ||
|
||
<div class="max-w-min"> | ||
<ToggleButtonGroup bind:selected> | ||
<ToggleButton value="all" label="All" light small /> | ||
<ToggleButton value="hub" icon={WindmillIcon2} label="Hub" light small /> | ||
<ToggleButton value="workspace" icon={Building} label="Workspace" light small /> | ||
</ToggleButtonGroup> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<script lang="ts"> | ||
import Portal from '$lib/components/Portal.svelte' | ||
import { clickOutside } from '$lib/utils' | ||
import { createFloatingActions, type ComputeConfig } from 'svelte-floating-ui' | ||
export let floatingConfig: ComputeConfig = { | ||
strategy: 'absolute', | ||
//@ts-ignore | ||
placement: 'bottom-center' | ||
} | ||
export let open = false | ||
export let target: string | undefined = undefined | ||
// export let containerClasses: string = 'rounded-lg shadow-md border p-4 bg-surface' | ||
// export let floatingClasses: string = '' | ||
const [floatingRef, floatingContent] = createFloatingActions(floatingConfig) | ||
function close(div: Element | null) { | ||
open = false | ||
} | ||
let acceptClickoutside = false | ||
function pointerup() { | ||
setTimeout(() => { | ||
acceptClickoutside = true | ||
}, 100) | ||
} | ||
function pointerdown() { | ||
if (acceptClickoutside && open) { | ||
open = false | ||
} else { | ||
acceptClickoutside = false | ||
open = true | ||
} | ||
} | ||
</script> | ||
|
||
<div use:floatingRef> | ||
<slot {pointerup} {pointerdown} name="button" /> | ||
</div> | ||
|
||
<Portal {target}> | ||
{#if open} | ||
<div | ||
class="border rounded-lg shadow-lg bg-surface z5000" | ||
style="position:absolute" | ||
use:floatingContent | ||
> | ||
<div | ||
use:clickOutside | ||
on:click_outside={() => { | ||
if (acceptClickoutside) { | ||
acceptClickoutside = false | ||
open = false | ||
} | ||
}} | ||
> | ||
<slot {close} /> | ||
</div> | ||
</div> | ||
{/if} | ||
</Portal> |
Oops, something went wrong.