-
Notifications
You must be signed in to change notification settings - Fork 186
Aligns all the database and nested routes #2330
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
Open
ItzNotABug
wants to merge
14
commits into
main
Choose a base branch
from
layout-header-alignment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6b5dd7b
updates: misc.
ItzNotABug af1d7ac
update: database layouts.
ItzNotABug 055d8b7
update: database layouts.
ItzNotABug 872bdfa
fix: footer going brrrr.
ItzNotABug b653a9e
fix: empty state jumpy animation.
ItzNotABug cb02ef5
fix: edge case on different viewports.
ItzNotABug 220556f
lint.
ItzNotABug f6e7f00
update: more alignment fixes.
ItzNotABug 7a37ca4
update: allow slide transition on small devices.
ItzNotABug eb53d79
Merge branch 'main' into 'layout-header-alignment'.
ItzNotABug 3bb46ec
update: sidebar top alignment on tablet and small viewports.
ItzNotABug 7aced4a
update: align the buttons with tabs.
ItzNotABug eb62fc7
update: more alignment fixes.
ItzNotABug db121ae
Merge branch 'main' into layout-header-alignment
ItzNotABug 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
<script lang="ts"> | ||
import { isSmallViewport } from '$lib/stores/viewport'; | ||
import { isSmallViewport, isTabletViewport } from '$lib/stores/viewport'; | ||
import { IconChevronLeft } from '@appwrite.io/pink-icons-svelte'; | ||
import { Button, Icon, Layout } from '@appwrite.io/pink-svelte'; | ||
import type { Snippet } from 'svelte'; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
|
||
let { | ||
href = null, | ||
children = null, | ||
collapsed = false, | ||
children, | ||
backOnlyDesktop = false, | ||
...restProps | ||
}: { | ||
href?: string | null; | ||
collapsed?: boolean; | ||
children: Snippet; | ||
children?: Snippet; | ||
backOnlyDesktop?: boolean; | ||
} & HTMLAttributes<HTMLDivElement> = $props(); | ||
|
||
const buttonSize = $derived(collapsed ? 'xs' : 's'); | ||
const currentLineHeight = $derived(collapsed ? '130%' : '140%'); | ||
const currentLetterSpacing = $derived(collapsed ? '0' : '-0.144px'); | ||
const currentFontSize = $derived(collapsed ? 'var(--font-size-l)' : 'var(--font-size-xxl)'); | ||
const currentFontSize = $derived( | ||
collapsed | ||
? 'var(--font-size-l)' | ||
: $isSmallViewport | ||
? 'var(--font-size-xl)' | ||
: 'var(--font-size-xxl)' | ||
); | ||
</script> | ||
|
||
<Layout.Stack | ||
|
@@ -28,20 +34,24 @@ | |
direction="row" | ||
alignItems="center" | ||
justifyContent="center" | ||
style={backOnlyDesktop && $isTabletViewport ? 'margin-inline-start: -2.5rem;' : ''} | ||
{...restProps}> | ||
{#if href && !$isSmallViewport} | ||
{#if href} | ||
<span style:position="relative"> | ||
<Button.Anchor size={buttonSize} icon variant="text" {href} aria-label="page back"> | ||
<Button.Anchor | ||
{href} | ||
icon | ||
variant="text" | ||
size={buttonSize} | ||
aria-label="page back" | ||
disabled={$isTabletViewport} | ||
style={$isTabletViewport ? 'visibility: hidden' : ''}> | ||
<Icon icon={IconChevronLeft} /> | ||
</Button.Anchor> | ||
</span> | ||
{/if} | ||
<h1 | ||
class="animated-title" | ||
style:font-size={currentFontSize} | ||
style:line-height={currentLineHeight} | ||
style:letter-spacing={currentLetterSpacing}> | ||
{@render children()} | ||
<h1 class="animated-title" style:font-size={currentFontSize}> | ||
{@render children?.()} | ||
</h1> | ||
Comment on lines
+53
to
55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Avoid empty when no children provided.Render the heading only if - <h1 class="animated-title" style:font-size={currentFontSize}>
- {@render children?.()}
- </h1>
+ {#if children}
+ <h1 class="animated-title" style:font-size={currentFontSize}>
+ {@render children()}
+ </h1>
+ {/if} 🤖 Prompt for AI Agents
|
||
</Layout.Stack> | ||
|
||
|
@@ -62,5 +72,6 @@ | |
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
max-width: 100%; | ||
line-height: 130%; | ||
} | ||
</style> |
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
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
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.
💡 Verification agent
🧩 Analysis chain
Fix: respect backOnlyDesktop when hiding/disabling back button on tablet
Currently the back button is disabled/hidden on all tablets, ignoring backOnlyDesktop. This breaks navigation in contexts where the back button should remain visible on tablet. Align with coverTitle.svelte behavior.
Run to confirm there are no other unconditional tablet hides:
🏁 Script executed:
Length of output: 431
Respect
backOnlyDesktop
when hiding/disabling back button on tabletIn src/lib/layout/animatedTitle.svelte (lines 47–48), wrap both
disabled
andstyle
inbackOnlyDesktop && $isTabletViewport
so the back button remains active unless explicitly restricted:📝 Committable suggestion
🤖 Prompt for AI Agents