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

feat(minifront, ui): #1732: v2 header #1734

Merged
merged 23 commits into from
Aug 31, 2024
Merged

feat(minifront, ui): #1732: v2 header #1734

merged 23 commits into from
Aug 31, 2024

Conversation

VanishMax
Copy link
Contributor

@VanishMax VanishMax commented Aug 27, 2024

Closes #1732
Closes #1730

Implements the header of the minifront v2:

  • Updated sync bar
  • New navigation link styles
  • New mobile navbar
  • Sync info popover
  • Wallet (not only Prax) info popover

Read more in the changeset.

This PR got huge because many UI components were not ready for it, so I had to create or modify it here.

kap.mp4

@VanishMax VanishMax self-assigned this Aug 27, 2024
Copy link

changeset-bot bot commented Aug 27, 2024

⚠️ No Changeset found

Latest commit: 9f9081e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Aug 27, 2024

Visit the preview URL for this PR (updated for commit 15acfb0):

https://penumbra-ui-preview--pr1734-feat-1732-v2-header-j3nb23wg.web.app

(expires Sat, 07 Sep 2024 07:06:51 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 709d729610ef7a6369b23f1cb2b820a60cc685b1

@VanishMax VanishMax requested a review from a team August 28, 2024 14:40
@VanishMax VanishMax marked this pull request as ready for review August 28, 2024 14:40
Copy link
Contributor

@turbocrime turbocrime left a comment

Choose a reason for hiding this comment

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

a couple minor todos and one issue i consider blocking

apps/minifront/package.json Outdated Show resolved Hide resolved
apps/minifront/src/components/v2/header/prax-popover.tsx Outdated Show resolved Hide resolved
apps/minifront/src/components/v2/header/prax-popover.tsx Outdated Show resolved Hide resolved
apps/minifront/src/components/v2/header/prax-popover.tsx Outdated Show resolved Hide resolved
apps/minifront/src/components/v2/header/prax-popover.tsx Outdated Show resolved Hide resolved
apps/minifront/src/components/v2/header/prax.svg Outdated Show resolved Hide resolved
packages/ui/vite.config.ts Outdated Show resolved Hide resolved
import type { PagePath } from '../metadata/paths.ts';

/** @todo: Remove this function and its uses after we switch to v2 layout */
export const getV2Link = (path: PagePath) => `/v2${path}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: maybe instead of manipulating strings to create paths, we should rely on utilities provided by the router https://reactrouter.com/en/main/hooks/use-resolved-path

not a task for this PR

apps/minifront/src/components/v2/header/prax-popover.tsx Outdated Show resolved Hide resolved
apps/minifront/src/components/v2/header/status-popover.tsx Outdated Show resolved Hide resolved
@TalDerei TalDerei self-requested a review August 29, 2024 06:32
Copy link
Contributor

@TalDerei TalDerei left a comment

Choose a reason for hiding this comment

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

suggestion: a general note about segmented pickers — when applied to text, they can create what feels like a jagged transition between tabs. for instance, reference "Asset Balances" and "Transfer Assets" sections between the dashboard and transfer tabs. I believe Jesse intended this as a feature, but it doesn't feel smooth to me. I'm curious if others experience this as well.

Screen.Recording.2024-08-28.at.11.59.08.PM.mov

import { SyncAnimation } from './sync-animation';
import { Text } from '@penumbra-zone/ui/Text';
import { useEffect, useState } from 'react';
import { useSyncProgress } from '@penumbra-zone/ui/components/ui/block-sync-status';

type StatusSelector =
Copy link
Contributor

@TalDerei TalDerei Aug 29, 2024

Choose a reason for hiding this comment

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

thought: The old sync bar subtly provided useful information about whether the blocks were synced and the latest block height. We should consider whether this is something we want to retain.

Screenshot 2024-08-28 at 11 41 27 PM Screenshot 2024-08-28 at 11 42 05 PM

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 info is now in its own popover and in the syncing dialog. Sam continues working on different states of this popover (e.g. if there's an error, colorize the popover trigger in red), so we will see more information about the syncing process later.

i'd appreciate if you could send your notes about what info about the sync should or should not be displayed to Sam

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.

as for the text transitions, i am personally ok about it, or maybe i got used to it. We make a poll from this question and ask the team for opinions

Copy link
Contributor

@JasonMHasperhoven JasonMHasperhoven Aug 29, 2024

Choose a reason for hiding this comment

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

My 2 cents:

  • The transition for the texts doesn't look good imo, but it's a subjective thing.
  • It's true that we lost the block information that's now hidden, but at the same time the most relevant thing to the user is the progress bar.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is sufficient for now, but we should revisit the segmented pickers for text in a future iteration of the V2 header.

@VanishMax VanishMax force-pushed the feat/#1732-v2-header branch from 91cbffd to 0874073 Compare August 29, 2024 14:06
This was referenced Aug 29, 2024
@VanishMax
Copy link
Contributor Author

@turbocrime @TalDerei @JasonMHasperhoven a reminder that this is ready for re-review

Copy link
Contributor

@turbocrime turbocrime left a comment

Choose a reason for hiding this comment

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

approving

reviewing the icon component again i noticed that the manifest type is strange (some fields require index access, some fields require dot notation, optionality is incorrect) so i filed #1751 to improve it.

@VanishMax VanishMax merged commit 74e89e0 into main Aug 31, 2024
8 checks passed
@VanishMax VanishMax deleted the feat/#1732-v2-header branch August 31, 2024 07:13
@TalDerei TalDerei mentioned this pull request Aug 31, 2024
40 tasks
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.

UIv2 Navigation bar UIv2 Pill updates
4 participants