Skip to content

Conversation

@renanvalentin
Copy link
Contributor

@renanvalentin renanvalentin commented Nov 15, 2023

Checklist


Proposed solution

This is a partial implementation of the personal dropdown from Lace UI's toolkit. Below is a possible API for the final implementation, which will allow users to compose the component as they see fit:

<PersonalDropdown.Root>
   <PersonalDropdown.Trigger />
   <PersonalDropdown.Popup>
        <PersonalDropdown.WalletOption />
        <PersonalDropdown.Divider />
        <PersonalDropdown.Option />
   </PersonalDropdown.Popup>
</PersonalDropdown.Root>

Currently, only these components are implemented and can be used on the main application:

<PersonalDropdown.Trigger />
<PersonalDropdown.WalletOption />

Screenshots

capture-41701a94
capture-bd4afb55
capture-c8d03858

@github-actions
Copy link

github-actions bot commented Nov 15, 2023

Allure report

allure-report-publisher generated test report!

smokeTests: ✅ test report for 30389036

passed failed skipped flaky total result
Total 31 0 0 0 31

export const WalletOption = ({
id,
disabled,
open = false,

Choose a reason for hiding this comment

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

open is unused.

};
};

export const WalletOption = ({
Copy link
Member

Choose a reason for hiding this comment

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

this components seem to be very specific for a single use case in Lace, maybe lets move it into the Lace app repository and setup Storybook there? And also it seems to be a near duplicate to the Trigger component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The items mentioned actually belong to the UI Toolkit. The UX team is currently updating the Navigation & Toolbars section to include the latest specifications.

From these specs, you can create a LinkOption or ToggleOption. It might be a good idea to rename WalletOption to ProfileDetailOption to make it more general. However, I personally believe that we should stick to something that conveys the true purpose, which is a wallet.

Screenshot 2023-11-16 at 08 53 17

Copy link
Member

@DominikGuzei DominikGuzei Nov 16, 2023

Choose a reason for hiding this comment

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

Got it 👍 Yeah, i still think that a ui framework shouldn't suggest the final app component being built from framework parts. We had this discussion many times in relation to react-polymorph in Daedalus and that's why we kept app specific components which could not be generalized (or didn't have to be re-used) in Daedalus Storybook.

I'm OK with picking more general purpose names (LinkOption or ToggleOption) like you suggested. Otherwise it becomes confusing because we could start moving any ui component from Lace into @lace/ui which would defeat the purpose of creating a foundational ui library used by many apps (like Dex, DApps store etc. potential more in the future)

Probably we need to bring this up with the design team to be on the same page

@DominikGuzei
Copy link
Member

@renanvalentin can you explain the difference between the Trigger component and the WalletOption as they look identical on the screenshots?

@renanvalentin renanvalentin marked this pull request as draft November 16, 2023 19:59
@renanvalentin renanvalentin force-pushed the lw-9028-wallet-menu-ui-components branch from bb14e88 to a317df8 Compare November 17, 2023 14:03
@renanvalentin renanvalentin force-pushed the lw-9028-wallet-menu-ui-components branch from b1b7b7e to bb9ef09 Compare November 20, 2023 12:19
@renanvalentin renanvalentin force-pushed the lw-9028-wallet-menu-ui-components branch from bb9ef09 to cad43c4 Compare November 20, 2023 14:36
@renanvalentin renanvalentin marked this pull request as ready for review November 20, 2023 16:25
@renanvalentin
Copy link
Contributor Author

@lucas-barros @DominikGuzei ready for review

import type { ComponentStory, Meta } from '@storybook/react';
import { within, userEvent } from '@storybook/testing-library';

import { ThemeColorScheme, ThemeProvider } from '../../design-tokens';

Choose a reason for hiding this comment

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

ThemeProvider and ThemeColorScheme are not used.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@DominikGuzei DominikGuzei left a comment

Choose a reason for hiding this comment

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

great work 🎉

@renanvalentin renanvalentin merged commit 508f3a3 into main Nov 23, 2023
@renanvalentin renanvalentin deleted the lw-9028-wallet-menu-ui-components branch November 23, 2023 14:41
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.

4 participants