-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: tag display, search improvements, tag tooltips (#146)
* chore: extract component: TagDisplay * chore: replace ambiguous tag-button with Filter button, more translation keys * fix: size of Filter... button * feat: tag description fancy tooltips, show tag description when adding tags to a mod
- Loading branch information
Showing
3 changed files
with
40 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script lang="ts"> | ||
import { type Tag } from '$lib/generated'; | ||
import { popup, type PopupSettings } from '@skeletonlabs/skeleton'; | ||
export let tag: Tag; | ||
export let popupTriggerEvent: PopupSettings['event'] | null = 'click'; | ||
$: popupHover = { | ||
event: popupTriggerEvent, | ||
target: `popupHoverFor${tag.name}`, | ||
placement: 'bottom-start' | ||
} satisfies PopupSettings; | ||
</script> | ||
|
||
<div | ||
class="lowercase text-neutral-300 [&>*]:pointer-events-none" | ||
use:popup={popupHover} | ||
title="Click for tag information"> | ||
<span class="text-orange-500">#</span>{tag.name} | ||
</div> | ||
|
||
<!-- Must use high z-index to ensure it draws on top of things like striped compatibility overlays in mod cards --> | ||
<!-- https://floating-ui.com/docs/misc#z-index-stacking --> | ||
<div class="card variant-filled-surface p-4" data-popup={`popupHoverFor${tag.name}`} style="z-index: 1000"> | ||
<p>TODO Tag information will appear here.</p> | ||
<br /> | ||
<p>Use Mod Tags to filter your searches and quickly find similar mods.</p> | ||
<div class="variant-filled-surface arrow" /> | ||
</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