-
Notifications
You must be signed in to change notification settings - Fork 8
Figma match & more #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 250 commits
Commits
Show all changes
316 commits
Select commit
Hold shift + click to select a range
cfbc2de
add basic sticky header
ken-zlai b79d56a
bulk out sticky header section
ken-zlai 054127d
add transition to sticky header
ken-zlai 3ff117f
proper bottom margin
ken-zlai d445826
add @internationalized/date
ken-zlai 73f9bfc
add shadcn Calendar, Popover, RangeCalendar
ken-zlai e9ad4a7
add ui for date range selector calendar (no functionality)
ken-zlai ec2368f
functional date range calendar (without error handling)
ken-zlai 09b614b
better variable name
ken-zlai ca7c47b
more robust checking to show sticky header
ken-zlai 4e449f2
create a function to get date range easier
ken-zlai 533f37d
open the calendar when custom is selected
ken-zlai 619945a
change var name
ken-zlai fe2d132
if they select custom, update url params after they choose a range
ken-zlai 63fa412
set the select value back to what it was if they dont choose a calend…
ken-zlai e5a820d
adjust some styles
ken-zlai 82ef796
change sidebar logic/ui to show overlapping points
ken-zlai 27cbeb8
functions to make code more readable
ken-zlai 9a62116
show correct series name
ken-zlai 6763906
basic implementation to click to specific series page after overlap
ken-zlai 4339986
v1 percentile chart w/ sample data (not finished)
ken-zlai 94fcbc2
ensure proper merge of data
ken-zlai b8ad26d
improve x axis formatting
ken-zlai 64e57b7
fix type issue
ken-zlai 5c93f5d
proper type for series
ken-zlai 6d64546
add FeatureResponse, create function to process data
ken-zlai ea13e9c
create a function to centralize date range related query paramaters
ken-zlai e379cb7
better logic/reuse in DateRangeSelector
ken-zlai 14e9d5b
align popover start
ken-zlai f9edc41
show percentile chart in sidebar
ken-zlai 421cb1b
rename variables
ken-zlai d2cd5ef
change max width
ken-zlai 007f712
rename variables
ken-zlai 6796706
change default metricType
ken-zlai 5d964ba
add RawComparedFeatureResponse type
ken-zlai c4f44bb
simple sample data for continuous data comparison
ken-zlai b956d6c
v1 chart for comparing numerical datasets
ken-zlai ec03687
change tooltip trigger type
ken-zlai 5bbffee
adjust sample data and y axis ranges
ken-zlai 3f45736
show a sample categorical chart option
ken-zlai 21f31e1
add titles
ken-zlai e6f3d98
ensure percentile chart data is reactive
ken-zlai d1bb207
style back button
ken-zlai e89f26e
text styles in sidebar
ken-zlai 45af58f
change x button top measurement
ken-zlai cf731af
confine tooltip in percentile chart
ken-zlai b1978b8
date picker size
ken-zlai 604a53b
icon in learn button
ken-zlai 8e0b23d
make sticky header show as soon as both button sections are off the s…
ken-zlai fc8054c
add shadcn input
ken-zlai 622f828
get labels dynamically for percentile data
ken-zlai 47bb26e
only show p5, p50, and p95 percentiles
ken-zlai 91f5bda
change TimeSeriesItem format
ken-zlai c4ab523
use undefined syntax instead of null for label
ken-zlai 9831202
if there is only one data point select it by default
ken-zlai ff1bc37
remove sample data point
ken-zlai b0c8d2e
remove old import stuff
ken-zlai 3a624e1
move height/width logic to EChart.svelte
ken-zlai 42262de
add a test for getFeatureTimeseries
ken-zlai 98c8345
Merge branch 'main' into frontend-8/18-milestone
ken-zlai de50ba0
define typography styles
ken-zlai 4e44a48
add d3
ken-zlai 7f5ffcd
add primary color palette
ken-zlai 2970881
use new colors in sidebar nav
ken-zlai 40a5697
create helper function to convert css color to hex
ken-zlai a9ff6a7
use primary color in echarts
ken-zlai 53cb3e7
adjust primary colors
ken-zlai c4234e9
add zipline icons
ken-zlai 228e3a6
match DriftSkewToggle to figma
ken-zlai 6953675
use correct monitoring icon
ken-zlai 003ca39
add neutral and warning colors
ken-zlai efc64f9
helper function to create a color scale
ken-zlai 9fe805b
use createColorScale function
ken-zlai 75aedf5
styles for tabs-trigger
ken-zlai cb07af8
make sure main content border doesnt show over separator borders
ken-zlai 9a53dd3
change default color scale options
ken-zlai 0d01d71
no longer need to pass default
ken-zlai d3ef1ec
different logic for active route
ken-zlai 4388709
outline button has transparent background
ken-zlai a06db55
date range picker range styles
ken-zlai 8209f0a
styles for left/right button in calendar
ken-zlai ec87280
use different neutral colors for elevation
ken-zlai 1466f7a
update colors
ken-zlai caba9c7
use css var
ken-zlai 7729bef
sidebar styling
ken-zlai 65eab78
let user open search dialog w/ shortcut
ken-zlai 81cc240
start styling search
ken-zlai d507936
update comment
ken-zlai 842f7b0
tailwind vars and sidebar styles
ken-zlai 6bdb19c
shared style for nav button
ken-zlai 9d620ce
reset command
ken-zlai 02d3a17
dont use button, use command item
ken-zlai 04634b6
first svg in command item gets mr-2
ken-zlai d81e44e
bulk out initial view section
ken-zlai 5b6cdf0
show what term they searched for
ken-zlai 1e88db4
styles for command elements
ken-zlai a017b20
border bottom to command items
ken-zlai 6089bed
show pointer on non disabled items
ken-zlai 849c210
better approach to handle leading/trailing icon case
ken-zlai b2dea1f
better logic to handle date ranges (more extensible)
ken-zlai 2c6f49e
use predefined past date ranges
ken-zlai 1aee64f
adjust size of left date range selector to content
ken-zlai 6f19561
dont make collabsibletrigger full width
ken-zlai 69fb457
adjust styling of daterangeselector
ken-zlai b244f8c
narrow weekday format
ken-zlai afdcfc2
make border-left transparent
ken-zlai 5524c51
create sizes of the collapsible section
ken-zlai 5d3f697
adjust padding left from title
ken-zlai 43fcbc8
adjust collapsible section spacing
ken-zlai ce836ab
remove divs to make content center
ken-zlai bfbdad8
adjust tooltip styles
ken-zlai 968f1c0
create reusable info tooltip
ken-zlai 8435bbb
make maxWidth optional
ken-zlai 09040da
remove border from success variant
ken-zlai 084a32e
create TrueFalseBadge
ken-zlai 6299309
use TrueFalseBadge
ken-zlai cfe1532
create a basic metadata table
ken-zlai 86554ae
only show table if there is a model
ken-zlai ab83a16
adjust sticky header stuff
ken-zlai b7b43d3
line styles
ken-zlai 739be87
enable zoom on categorical chart
ken-zlai c2c58c2
v1 of custom chart legend
ken-zlai 7ba9ef8
tighter styling
ken-zlai 1102182
more styles
ken-zlai ab9ad46
share styles
ken-zlai b42b394
for some reason we need !important on legend-btn styles
ken-zlai f363773
use flex instead of relative
ken-zlai 374342f
make buttons align vertically center
ken-zlai 0dbe994
show expand button only if there is overflow
ken-zlai 67017fd
adjust max h
ken-zlai fa9c09f
adjust legend dots to be of proper width
ken-zlai d1b440b
adjust top margin
ken-zlai 62817b1
better treatment if not shown
ken-zlai d0784c7
refactor for better code
ken-zlai 9ba241e
only show shortcut after detecting the user agent
ken-zlai 440fc92
use proper button in driftskew toggle
ken-zlai 857bca3
add nullcheck to color
ken-zlai 797b515
componentize action buttons
ken-zlai b0d615b
add cluster to action buttons
ken-zlai 6fe6b5e
add example to cluster by groupbys
ken-zlai 330df46
use action buttons in feature monitoring section
ken-zlai e178be0
more spacing
ken-zlai a033175
basic tooltip styles
ken-zlai 5d0b038
tooltip code to keep consistent styling across all charts
ken-zlai 2163503
move out the observability stuff
ken-zlai f19db74
chart line color
ken-zlai aa5245f
remove the / route content, and make /models the default
ken-zlai eb53b23
change breadcrumb stuff
ken-zlai 9128940
fix issue calling getCssColorAsHex
ken-zlai 0187051
ensure zoom is applied to charts after they are unhidden
ken-zlai 2f82646
move action buttons, let props specify class
ken-zlai b6a7c28
remove console.log
ken-zlai ab40686
navigation bar, logo
ken-zlai 956cba9
update typography styles
ken-zlai 19f247b
close ui match on models page
ken-zlai 76f4aa9
add font smoothing
ken-zlai 1722e7c
let user specify table density
ken-zlai efc4e95
Merge branch 'main' into figma-match
ken-zlai ba6bffc
upload full font files
ken-zlai 8453190
breadcrumb updates
ken-zlai cc05376
more style matching
ken-zlai a3cd651
adjust tooltip styles
ken-zlai 04f58a7
tabs
ken-zlai e970b52
collapsible margin
ken-zlai 408f7db
add animation to chart legend
ken-zlai 6635741
nicer animation on the text
ken-zlai ef7bf62
make sure button shows when expanding/collapsing
ken-zlai 37912e2
make sure groupSectionStates is correct
ken-zlai 5a08df5
fix weird css text override
ken-zlai b71b786
model performance tooltip text
ken-zlai 23719d4
custom colors for chart
ken-zlai 5bafe05
reset zoom button
ken-zlai 356bc17
correct z index
ken-zlai 9fb0e49
border on table items
ken-zlai ef25cd7
separator under table
ken-zlai f08fc28
custom tailwind merge w/ typography classes
ken-zlai 67ef416
table head to use regular font
ken-zlai 4bac870
move investigation charts to a dialog
ken-zlai 6d878ca
default height for charts
ken-zlai df6dbee
change header
ken-zlai 5ea79d1
put dialog content in their own sections
ken-zlai 4fb6188
add selected group by chart to the dialog
ken-zlai c21228c
autofocus the first button in list
ken-zlai e55fa5b
use on:click since it is more stable
ken-zlai ed4fb19
properly show/hide tooltips depending if sheet is open
ken-zlai 2bd9db6
message about overlapping points
ken-zlai 7de86a3
use info tooltip
ken-zlai 20daf42
remove back button
ken-zlai 2c80bda
remove unused import
ken-zlai 93dbb19
proper text in search bar
ken-zlai 2344795
add controls in dialog
ken-zlai cb071a6
connect percentile chart
ken-zlai 3f77bbf
new current vs baseline chart
ken-zlai cfa7a62
null ratio chart
ken-zlai 9fb2565
programmatically generate sample data
ken-zlai 2eb0eb6
reset current zoom state
ken-zlai c4bd73f
dont let user zoom null ratio chart
ken-zlai c2d1a29
let user zoom current vs baseline chart
ken-zlai 411aafd
fix scroll area padding
ken-zlai b782e51
adjust padding
ken-zlai 6f81e6e
x button styles
ken-zlai 61a38d1
fix zoom scroll issue
ken-zlai 4209214
fix typo
ken-zlai 1ce45f6
height of reset button
ken-zlai 79bfc57
change relative time options
ken-zlai c935c0a
change title
ken-zlai 3a6853e
double click to reset zoom
ken-zlai 671a5fb
create utility function to determine if mac
ken-zlai d9e9987
v1 custom tooltip
ken-zlai 8cfefab
add logic for better transition animation
ken-zlai 7925682
simpler logic
ken-zlai 63745dd
let user click on tooltip point
ken-zlai ca0799f
start styling tooltip
ken-zlai e4aaa5d
less height tooltip
ken-zlai c129030
better text styles
ken-zlai 8735541
justify between
ken-zlai 57f33ef
move height
ken-zlai d0fb968
separator
ken-zlai e492dc7
use badge
ken-zlai cde7996
let user specify if tooltip is clickable
ken-zlai 1be9f1d
optimize deps
ken-zlai dfdcd45
dialog close alignment
ken-zlai 14d3db2
more precise matching
ken-zlai 7b23dbd
encodeURIComponent
ken-zlai 3da7141
Merge branch 'main' into figma-match
ken-zlai 1d08a9e
better logic to pre-determine tooltip height
ken-zlai 6e6a198
no need to use create tooltip on charts where custom tooltip is used
ken-zlai 99c1ef9
handle window blur to close tooltip
ken-zlai 4646d6c
add color back to custom tooltip
ken-zlai 1e026f2
dont show color/series name if there is only one line
ken-zlai d3eda93
add support in custom tooltip for bar charts
ken-zlai e805abc
add line color to dialog title
ken-zlai 969a364
put series color in dialog picker
ken-zlai fe14b28
better null checks
ken-zlai bfb0821
use proper text color
ken-zlai 19b1160
actually use proper text style
ken-zlai b6aa7c2
create a key badge variant
ken-zlai 19e477c
create key-bg badge variant
ken-zlai 019bb48
share styles better
ken-zlai a985fd5
show date in title
ken-zlai 246b8e0
set markpoint on clicked chart point
ken-zlai 0403ef8
change to line w/ symbol for mark point
ken-zlai bf02c0a
line styles
ken-zlai 26bcdb0
add animation duration
ken-zlai 4acb0ae
use style tag for height
ken-zlai 295d92c
use proper color/dash style
ken-zlai 759baf5
Merge branch 'main' into figma-match
ken-zlai 0a3ca2c
clear timeout id
ken-zlai f27da59
Merge remote-tracking branch 'origin/figma-match' into figma-match
ken-zlai d0b40a7
Merge branch 'main' into figma-match
ken-zlai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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
46 changes: 46 additions & 0 deletions
46
frontend/src/lib/components/ActionButtons/ActionButtons.svelte
This file contains hidden or 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,46 @@ | ||
| <script lang="ts"> | ||
| import { Button } from '$lib/components/ui/button'; | ||
| import { cn } from '$lib/utils'; | ||
| import { Icon, Plus, ArrowsUpDown, Square3Stack3d, XMark } from 'svelte-hero-icons'; | ||
| let { showCluster = false, class: className }: { showCluster?: boolean; class?: string } = | ||
| $props(); | ||
| let activeCluster = showCluster ? 'GroupBys' : null; | ||
| </script> | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <div class={cn('flex flex-wrap gap-3', className)}> | ||
| <!-- Active Items Section --> | ||
| {#if activeCluster} | ||
| <div class="flex flex-wrap gap-[1px]"> | ||
| <Button variant="secondaryAlt" size="sm" icon="leading" disabled> | ||
| <Icon src={Square3Stack3d} micro size="16" /> | ||
| Cluster by | ||
| </Button> | ||
| <Button variant="secondaryAlt" size="sm" disabled> | ||
| {activeCluster} | ||
| </Button> | ||
| <Button variant="secondaryAlt" size="sm" class="p-2" disabled> | ||
| <Icon src={XMark} micro size="16" /> | ||
| </Button> | ||
| </div> | ||
| {/if} | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <!-- Action Buttons Section --> | ||
| <div class="flex gap-3"> | ||
| <Button variant="secondary" size="sm" icon="leading"> | ||
| <Icon src={Plus} micro size="16" /> | ||
| Filter | ||
| </Button> | ||
| <Button variant="secondary" size="sm" icon="leading"> | ||
| <Icon src={ArrowsUpDown} micro size="16" /> | ||
| Sort | ||
| </Button> | ||
| {#if showCluster} | ||
| <Button variant="secondary" size="sm" icon="leading"> | ||
| <Icon src={Square3Stack3d} micro size="16" /> | ||
| Cluster | ||
| </Button> | ||
| {/if} | ||
| </div> | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </div> | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
frontend/src/lib/components/ComingSoonPage/ComingSoonPage.svelte
This file contains hidden or 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,4 +1,4 @@ | ||
| <div class="text-center pt-16 px-4"> | ||
| <h1 class="text-5xl font-bold mb-4">Coming Soon</h1> | ||
| <h1 class="text-3xl font-bold mb-4">Coming Soon</h1> | ||
| <p class="text-xl">We're working on something exciting. Stay tuned!</p> | ||
| </div> |
121 changes: 121 additions & 0 deletions
121
frontend/src/lib/components/CustomEChartLegend/CustomEChartLegend.svelte
This file contains hidden or 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,121 @@ | ||
| <script lang="ts"> | ||
| import { Button } from '$lib/components/ui/button'; | ||
| import type { EChartsType } from 'echarts'; | ||
| import { Icon, ChevronDown, ChevronUp } from 'svelte-hero-icons'; | ||
| type LegendItem = { feature: string }; | ||
| type Props = { | ||
| groupName: string; | ||
| items: Array<LegendItem>; | ||
| chart: EChartsType; | ||
| }; | ||
| let { groupName, items, chart }: Props = $props(); | ||
| let hiddenSeries: { [key: string]: Set<string> } = $state({}); | ||
| let isExpanded = $state(false); | ||
| let itemsContainer: HTMLDivElement; | ||
| let containerHeight = $state(0); | ||
| let hasOverflow = $state(false); | ||
| let containerHeightLine = 24; | ||
| function toggleSeries(seriesName: string) { | ||
| const groupSet = hiddenSeries[groupName] || new Set(); | ||
| if (groupSet.has(seriesName)) { | ||
| groupSet.delete(seriesName); | ||
| } else { | ||
| groupSet.add(seriesName); | ||
| } | ||
| hiddenSeries = { | ||
| ...hiddenSeries, | ||
| [groupName]: groupSet | ||
| }; | ||
| chart.setOption({ legend: { show: false } }); | ||
| chart.dispatchAction({ | ||
| type: 'legendToggleSelect', | ||
| name: seriesName | ||
| }); | ||
| } | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| function getSeriesColor(index: number, colors: string[]): string { | ||
| return colors[index % colors.length] || '#000000'; | ||
| } | ||
| function checkOverflow() { | ||
| if (!itemsContainer) return; | ||
| const hasVerticalOverflow = itemsContainer.scrollHeight > itemsContainer.clientHeight; | ||
| const hasHorizontalOverflow = itemsContainer.scrollWidth > itemsContainer.clientWidth; | ||
| hasOverflow = hasVerticalOverflow || hasHorizontalOverflow; | ||
| } | ||
| $effect(() => { | ||
| if (!itemsContainer) return; | ||
| const resizeObserver = new ResizeObserver(() => { | ||
| checkOverflow(); | ||
| containerHeight = itemsContainer.scrollHeight; | ||
| }); | ||
| resizeObserver.observe(itemsContainer); | ||
| checkOverflow(); | ||
| containerHeight = itemsContainer.scrollHeight; | ||
| return () => resizeObserver.disconnect(); | ||
| }); | ||
| </script> | ||
|
|
||
| <div class="relative mt-5"> | ||
| <div class="flex"> | ||
| <div | ||
| bind:this={itemsContainer} | ||
| class={`flex flex-wrap gap-x-8 gap-y-2 flex-1 transition-all duration-150 ease-in-out ${!isExpanded ? 'overflow-hidden' : ''}`} | ||
| style="height: {isExpanded ? containerHeight + 'px' : containerHeightLine + 'px'};" | ||
| > | ||
| {#each items as { feature }, index} | ||
| {@const colors = chart?.getOption()?.color || []} | ||
| {@const color = getSeriesColor(index, colors)} | ||
| {@const isHidden = hiddenSeries[groupName]?.has(feature)} | ||
|
|
||
| <Button | ||
| class="legend-btn gap-x-2 max-w-[148px]" | ||
| variant="ghost" | ||
| on:click={() => toggleSeries(feature)} | ||
| title={feature} | ||
| > | ||
| <div | ||
| class="w-2 h-2 rounded-full flex-shrink-0" | ||
| style="background-color: {isHidden ? 'hsl(var(--neutral-700))' : color}" | ||
| ></div> | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <div | ||
| class="{isHidden | ||
| ? 'text-neutral-700' | ||
| : ''} overflow-hidden text-ellipsis whitespace-nowrap" | ||
| > | ||
| <span>{feature}</span> | ||
| </div> | ||
| </Button> | ||
| {/each} | ||
| </div> | ||
|
|
||
| {#if hasOverflow || isExpanded || containerHeight > containerHeightLine} | ||
| <Button variant="ghost" class="legend-btn" on:click={() => (isExpanded = !isExpanded)}> | ||
| <div class="transition-opacity duration-150" class:opacity-0={isExpanded}> | ||
| view all ({items.length}) | ||
| </div> | ||
| <div class="transition-opacity duration-150 absolute" class:opacity-0={!isExpanded}> | ||
| collapse | ||
| </div> | ||
| <Icon src={isExpanded ? ChevronUp : ChevronDown} micro size="16" class="ml-2" /> | ||
| </Button> | ||
| {/if} | ||
| </div> | ||
| </div> | ||
|
|
||
| <style lang="postcss"> | ||
| :global(.legend-btn) { | ||
| @apply flex items-center hover:bg-transparent font-normal h-6 p-0 text-sm !important; | ||
| } | ||
| </style> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love that we are parameterizing!