Skip to content
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

Merged
merged 89 commits into from
Jan 27, 2025
Merged

Navigation and Bottomsheet #247

merged 89 commits into from
Jan 27, 2025

Conversation

ernstmul
Copy link
Contributor

What does this PR do?

Adds new navigation:
image

And bottom sheet:
image

Have you read the Contributing Guidelines on issues?

Yes

Copy link
Member

@ItzNotABug ItzNotABug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@ArmanNik ArmanNik left a 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 👍

v2/pink-sb/src/lib/action-menu/Anchor.svelte Show resolved Hide resolved
v2/pink-sb/src/lib/action-menu/Anchor.svelte Outdated Show resolved Hide resolved
Comment on lines 67 to 104
@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;
}
}
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Comment on lines 55 to 56
width: 100vw;
height: 100vh;
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense yes! Adjusted!

Copy link
Member

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

Copy link
Contributor Author

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.

v2/pink-sb/src/lib/navbar/Pink.svelte Show resolved Hide resolved
v2/pink-sb/src/lib/navbar/Pink.svelte Outdated Show resolved Hide resolved
v2/pink-sb/src/lib/sidebar/Base.svelte Show resolved Hide resolved
v2/pink-sb/src/lib/sidebar/Base.svelte Show resolved Hide resolved
v2/pink-sb/src/lib/sidebar/Base.svelte Show resolved Hide resolved
</Input.Text>
</div>
{/if}
<img src={avatar} alt={'Avatar'} class="avatar" />
Copy link
Member

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?

Copy link
Contributor Author

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 :)

Comment on lines +10 to +32
{#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}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still seeing the scroll bars
image

Copy link
Contributor Author

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 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not sure if this should be in Pink... how do we plan to support these states?
image

Copy link
Contributor Author

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

@ernstmul ernstmul merged commit 8c36e8c into v2 Jan 27, 2025
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants