-
Notifications
You must be signed in to change notification settings - Fork 41
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
Navigation and Bottomsheet #247
Conversation
# Conflicts: # pnpm-lock.yaml
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.
LGTM!
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.
As discussed in our sync, let's see what logic should stay in pink and which logic we can move to the console 👍
@keyframes fadeIn { | ||
from { | ||
background-color: transparent; | ||
} | ||
to { | ||
background-color: var(--color-overlay-scrim-weak, rgba(25, 25, 28, 40%)); | ||
} | ||
} | ||
@keyframes fadeOut { | ||
from { | ||
background-color: var(--color-overlay-scrim-weak, rgba(25, 25, 28, 40%)); | ||
} | ||
to { | ||
background-color: transparent; | ||
} | ||
} | ||
|
||
@keyframes slideIn { | ||
from { | ||
bottom: calc(-1 * var(--base-36)); | ||
opacity: 0; | ||
} | ||
to { | ||
bottom: var(--base-36); | ||
opacity: 1; | ||
} | ||
} | ||
|
||
@keyframes slideOut { | ||
from { | ||
bottom: var(--base-36); | ||
opacity: 1; | ||
} | ||
to { | ||
bottom: calc(-1 * var(--base-36)); | ||
opacity: 0; | ||
} | ||
} |
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.
We might be able to simplify some of the CSS by using svelte transitions 🤔
https://v4.svelte.dev/docs/svelte-transition
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.
done!
width: 100vw; | ||
height: 100vh; |
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.
Might be worth using dvh
and dvw
to account for mobile browsers
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.
Done
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.
I think it might make sense to use the native html dialog
element right?
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.
makes sense yes! Adjusted!
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.
@ernstmul we can also replace the overlay, the native dialog
element has the a pseudo-element that you can target with ::backdrop
https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop
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.
This has more work to it than anticipated. In order to get the dialog backdrop, the showModal
function needs to be used. This has more effect on the look and animations than just replacing a backdrop div. Discussed to keep this for now.
</Input.Text> | ||
</div> | ||
{/if} | ||
<img src={avatar} alt={'Avatar'} class="avatar" /> |
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.
The avatar is not going to be clickable, is that the intended behaviour?
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.
There is no click defined in the design for this one. So at this point there is no action behind it :)
{#if resizable} | ||
<button | ||
class="collapse" | ||
class:icons={state === 'icons'} | ||
on:click={() => { | ||
state = state === 'icons' ? 'open' : 'icons'; | ||
}} | ||
> | ||
<div class="lines-container"> | ||
<div class="icon icon-idle minus-icon"><Icon icon={IconMinus} /></div> | ||
<div class="icon icon-hover"> | ||
<Icon icon={state === 'icons' ? IconChevronRight : IconChevronLeft} /> | ||
</div> | ||
</div> | ||
<div class="badge"> | ||
<Badge | ||
size="xs" | ||
variant="primary" | ||
content={state === 'icons' ? 'Expand' : 'Collapse'} | ||
/> | ||
</div> | ||
</button> | ||
{/if} |
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.
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.
In none of my browsers on MacOS I get this behaviour. I think i've spotted what is causing it. Added a fix, but need you to confirm it actually works 😅
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.
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.
Agreed to discuss with Caio and Sara
What does this PR do?
Adds new navigation:
And bottom sheet:
Have you read the Contributing Guidelines on issues?
Yes