forked from motis-project/motis
-
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: improve QueryBatchOverview style # Conflicts: # visual-debugger/src/lib/components/ui/QueryBatchOverview.svelte # visual-debugger/src/routes/+page.svelte * feat: improve general layout Co-Authored-By: MoPhliFra <[email protected]> * feat: introduce scrollarea, further style improvements Co-Authored-By: Dominik Kuckeburg <[email protected]> * feat: add new debugger style with new URL * chore: Query Batch Overview name correction * chore: remove gap-2 from main content div * feat: reimplement functionality to new layout * feat: Layout size fix, header improvement, footer removal --------- Co-authored-by: Dominik Kuckeburg <[email protected]> Co-authored-by: Dominik Kuckeburg <[email protected]> Co-authored-by: Kvnstrck <[email protected]>
- Loading branch information
1 parent
ec90f4a
commit a800bab
Showing
19 changed files
with
495 additions
and
72 deletions.
There are no files selected for viewing
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,29 @@ | ||
import Root from "./input.svelte"; | ||
|
||
export type FormInputEvent<T extends Event = Event> = T & { | ||
currentTarget: EventTarget & HTMLInputElement; | ||
}; | ||
export type InputEvents = { | ||
blur: FormInputEvent<FocusEvent>; | ||
change: FormInputEvent<Event>; | ||
click: FormInputEvent<MouseEvent>; | ||
focus: FormInputEvent<FocusEvent>; | ||
focusin: FormInputEvent<FocusEvent>; | ||
focusout: FormInputEvent<FocusEvent>; | ||
keydown: FormInputEvent<KeyboardEvent>; | ||
keypress: FormInputEvent<KeyboardEvent>; | ||
keyup: FormInputEvent<KeyboardEvent>; | ||
mouseover: FormInputEvent<MouseEvent>; | ||
mouseenter: FormInputEvent<MouseEvent>; | ||
mouseleave: FormInputEvent<MouseEvent>; | ||
mousemove: FormInputEvent<MouseEvent>; | ||
paste: FormInputEvent<ClipboardEvent>; | ||
input: FormInputEvent<InputEvent>; | ||
wheel: FormInputEvent<WheelEvent>; | ||
}; | ||
|
||
export { | ||
Root, | ||
// | ||
Root as Input, | ||
}; |
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,42 @@ | ||
<script lang="ts"> | ||
import type { HTMLInputAttributes } from "svelte/elements"; | ||
import type { InputEvents } from "./index.js"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLInputAttributes; | ||
type $$Events = InputEvents; | ||
let className: $$Props["class"] = undefined; | ||
export let value: $$Props["value"] = undefined; | ||
export { className as class }; | ||
// Workaround for https://github.com/sveltejs/svelte/issues/9305 | ||
// Fixed in Svelte 5, but not backported to 4.x. | ||
export let readonly: $$Props["readonly"] = undefined; | ||
</script> | ||
|
||
<input | ||
class={cn( | ||
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", | ||
className | ||
)} | ||
bind:value | ||
{readonly} | ||
on:blur | ||
on:change | ||
on:click | ||
on:focus | ||
on:focusin | ||
on:focusout | ||
on:keydown | ||
on:keypress | ||
on:keyup | ||
on:mouseover | ||
on:mouseenter | ||
on:mouseleave | ||
on:mousemove | ||
on:paste | ||
on:input | ||
on:wheel|passive | ||
{...$$restProps} | ||
/> |
10 changes: 10 additions & 0 deletions
10
visual-debugger/src/lib/components/ui/scroll-area/index.ts
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,10 @@ | ||
import Scrollbar from "./scroll-area-scrollbar.svelte"; | ||
import Root from "./scroll-area.svelte"; | ||
|
||
export { | ||
Root, | ||
Scrollbar, | ||
//, | ||
Root as ScrollArea, | ||
Scrollbar as ScrollAreaScrollbar, | ||
}; |
27 changes: 27 additions & 0 deletions
27
visual-debugger/src/lib/components/ui/scroll-area/scroll-area-scrollbar.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,27 @@ | ||
<script lang="ts"> | ||
import { ScrollArea as ScrollAreaPrimitive } from "bits-ui"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = ScrollAreaPrimitive.ScrollbarProps & { | ||
orientation?: "vertical" | "horizontal"; | ||
}; | ||
let className: $$Props["class"] = undefined; | ||
export let orientation: $$Props["orientation"] = "vertical"; | ||
export { className as class }; | ||
</script> | ||
|
||
<ScrollAreaPrimitive.Scrollbar | ||
{orientation} | ||
class={cn( | ||
"flex touch-none select-none transition-colors", | ||
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px", | ||
orientation === "horizontal" && "h-2.5 w-full border-t border-t-transparent p-px", | ||
className | ||
)} | ||
> | ||
<slot /> | ||
<ScrollAreaPrimitive.Thumb | ||
class={cn("bg-border relative rounded-full", orientation === "vertical" && "flex-1")} | ||
/> | ||
</ScrollAreaPrimitive.Scrollbar> |
32 changes: 32 additions & 0 deletions
32
visual-debugger/src/lib/components/ui/scroll-area/scroll-area.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,32 @@ | ||
<script lang="ts"> | ||
import { ScrollArea as ScrollAreaPrimitive } from "bits-ui"; | ||
import { Scrollbar } from "./index.js"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = ScrollAreaPrimitive.Props & { | ||
orientation?: "vertical" | "horizontal" | "both"; | ||
scrollbarXClasses?: string; | ||
scrollbarYClasses?: string; | ||
}; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
export let orientation = "vertical"; | ||
export let scrollbarXClasses: string = ""; | ||
export let scrollbarYClasses: string = ""; | ||
</script> | ||
|
||
<ScrollAreaPrimitive.Root {...$$restProps} class={cn("relative overflow-hidden", className)}> | ||
<ScrollAreaPrimitive.Viewport class="h-full w-full rounded-[inherit]"> | ||
<ScrollAreaPrimitive.Content> | ||
<slot /> | ||
</ScrollAreaPrimitive.Content> | ||
</ScrollAreaPrimitive.Viewport> | ||
{#if orientation === "vertical" || orientation === "both"} | ||
<Scrollbar orientation="vertical" class={scrollbarYClasses} /> | ||
{/if} | ||
{#if orientation === "horizontal" || orientation === "both"} | ||
<Scrollbar orientation="horizontal" class={scrollbarXClasses} /> | ||
{/if} | ||
<ScrollAreaPrimitive.Corner /> | ||
</ScrollAreaPrimitive.Root> |
10 changes: 7 additions & 3 deletions
10
visual-debugger/src/lib/components/ui/subcomponents/PlanEntry.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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
<script lang="ts"> | ||
import {Button} from "@/components/ui/button"; | ||
export let startTime: String; | ||
export let endTime: String; | ||
export let duration: String; | ||
export let transfers: String; | ||
</script> | ||
|
||
<div> | ||
<p> StartTime:{startTime}, EndTime:{endTime}, Duration: {duration}, Number of Transfers: {transfers}</p> | ||
</div> | ||
<div class="text-2xl"> | ||
<Button variant="outline" class="w-full my-2 border-green-500 bg-green-200"> | ||
<span class="text-left w-full">StartTime:{startTime}, EndTime:{endTime}</span> | ||
</Button> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Root from "./switch.svelte"; | ||
|
||
export { | ||
Root, | ||
// | ||
Root as Switch, | ||
}; |
28 changes: 28 additions & 0 deletions
28
visual-debugger/src/lib/components/ui/switch/switch.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,28 @@ | ||
<script lang="ts"> | ||
import { Switch as SwitchPrimitive } from "bits-ui"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = SwitchPrimitive.Props; | ||
type $$Events = SwitchPrimitive.Events; | ||
let className: $$Props["class"] = undefined; | ||
export let checked: $$Props["checked"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<SwitchPrimitive.Root | ||
bind:checked | ||
class={cn( | ||
"focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", | ||
className | ||
)} | ||
{...$$restProps} | ||
on:click | ||
on:keydown | ||
> | ||
<SwitchPrimitive.Thumb | ||
class={cn( | ||
"bg-background pointer-events-none block h-5 w-5 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0" | ||
)} | ||
/> | ||
</SwitchPrimitive.Root> |
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
Oops, something went wrong.