Skip to content

Commit

Permalink
Tag patches (#148)
Browse files Browse the repository at this point in the history
* fix: add spacing at the bottom of the tags collapse section to avoid paginator drawing over tooltips
(z index isn't helping for some reason)

* fix: remove forced period at end of tag descriptions

* chore: switch tag data binding to use tag id

* chore: fix hover-tags saying you should click on them in browser title-tooltip
  • Loading branch information
budak7273 authored Jan 6, 2024
1 parent dc0efbc commit 7dd73ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/mods/ModGrid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
</div>
</div>
{#if tagsOpen}
<div class="flex flex-grow flex-row flex-wrap items-center justify-center gap-1">
<div class="flex flex-grow flex-row flex-wrap items-center justify-center gap-1 pb-10">
{#if $allTags.error}
<p>Oh no... {$allTags.error.message}</p>
{:else if !$allTags.fetching}
Expand Down
9 changes: 5 additions & 4 deletions src/lib/components/utils/TagDisplay.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@
$: popupHover = {
event: popupTriggerEvent,
target: `popupHoverFor${tag.name}`,
target: `popupHoverFor${tag.id}`,
placement: 'bottom-start'
} satisfies PopupSettings;
</script>

<div
class="lowercase text-neutral-300 [&>*]:pointer-events-none"
use:popup={popupHover}
title="Click for tag information">
title={popupTriggerEvent === 'click' ? '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 -->
<!-- For some reason this still isn't able to draw over the ModGrid paginator-->
<!-- 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>{tag.description}.</p>
<div class="card variant-filled-surface p-4" data-popup={`popupHoverFor${tag.id}`} style="z-index: 1000">
<p>{tag.description}</p>
</div>

0 comments on commit 7dd73ec

Please sign in to comment.