-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add absolute change option in context column (#2957)
* add enum variant for DELTA_ABSOLUTE * fix arrow flipping on SearchableFilterButton * change leaderboard context column controls * slightly tighten spacing on SelectButton * remove deprecated component * add absolute change to menu and leaderboard header * move context column value to own component, render with color and "no data" * update DELTA_CHANGE to DELTA_PERCENT * merge cleanups * remove logging * adjustment to leaderboard column widths * fix dimension table sort arrow * cleanup * cleanups * cleanups * remove redeclaration * add default prop * add plus to abs change in leaderboard * code review cleanups
- Loading branch information
Showing
13 changed files
with
164 additions
and
71 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
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
25 changes: 25 additions & 0 deletions
25
web-common/src/features/dashboards/leaderboard/ContextColumnValue.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,25 @@ | ||
<script lang="ts"> | ||
import { LeaderboardContextColumn } from "@rilldata/web-common/features/dashboards/leaderboard-context-column"; | ||
import PercentageChange from "../../../components/data-types/PercentageChange.svelte"; | ||
import { FormattedDataType } from "@rilldata/web-common/components/data-types"; | ||
export let formattedValue: string; | ||
export let showContext: LeaderboardContextColumn; | ||
$: neg = formattedValue[0] === "-"; | ||
$: noData = formattedValue === "" || !formattedValue; | ||
$: customStyle = neg ? "text-red-500" : noData ? "opacity-50 italic" : ""; | ||
</script> | ||
|
||
{#if showContext === LeaderboardContextColumn.DELTA_PERCENT || showContext === LeaderboardContextColumn.PERCENT} | ||
<div style:width="44px"> | ||
<PercentageChange value={formattedValue} /> | ||
</div> | ||
{:else if showContext === LeaderboardContextColumn.DELTA_ABSOLUTE} | ||
<div style:width="54px"> | ||
{#if noData} | ||
<span class="opacity-50 italic" style:font-size=".925em">no data</span> | ||
{:else} | ||
<FormattedDataType type="INTEGER" value={formattedValue} {customStyle} /> | ||
{/if} | ||
</div> | ||
{/if} |
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
Oops, something went wrong.
4f22baf
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.
🎉 Published on https://ui.rilldata.io as production
🚀 Deployed on https://6500ae906be5962383715678--rill-ui-stage.netlify.app