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

Gasless voting UI #2692

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from
Open

Gasless voting UI #2692

wants to merge 27 commits into from

Conversation

DarksightKellar
Copy link
Contributor

@DarksightKellar DarksightKellar commented Jan 27, 2025

Closes ENG-25
Closes ENG-153

DAO settings:

Screenshot 2025-01-27 at 15 25 19 PS: @decentdao/design In DAO settings above, the "propose" button now sits very weirdly.

Create DAO flow

Design (implemented in a previous commit):
Screenshot 2025-01-27 at 15 24 46

Implemented currently:
Screenshot 2025-01-29 at 12 22 48

See this comment


See issue for testing instructions

Copy link

linear bot commented Jan 27, 2025

Copy link

cloudflare-workers-and-pages bot commented Jan 27, 2025

Deploying decent-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: efd973f
Status: ✅  Deploy successful!
Preview URL: https://d22099e8.decent-interface.pages.dev
Branch Preview URL: https://eng-25-gassless-voting-ui.decent-interface.pages.dev

View logs

@DarksightKellar DarksightKellar requested review from mudrila, Da-Colon, adamgall, johnqh and a team and removed request for mudrila and Da-Colon January 27, 2025 15:39
src/components/DaoCreator/constants.ts Outdated Show resolved Hide resolved
src/components/DaoCreator/formComponents/Multisig.tsx Outdated Show resolved Hide resolved
src/components/ui/GasslessVotingToggle.tsx Outdated Show resolved Hide resolved
src/components/ui/GasslessVotingToggle.tsx Outdated Show resolved Hide resolved
src/i18n/locales/en/daoCreate.json Outdated Show resolved Hide resolved
src/i18n/locales/en/daoCreate.json Outdated Show resolved Hide resolved
src/pages/dao/settings/general/SafeGeneralSettingsPage.tsx Outdated Show resolved Hide resolved
@DarksightKellar DarksightKellar changed the title [Eng-25] Gassless voting UI Gassless voting UI Jan 29, 2025
Copy link
Contributor

@Da-Colon Da-Colon left a comment

Choose a reason for hiding this comment

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

I take it screenshots are not accurate anymore in the description. as DAOCreate doesn't have the address anymore?

src/components/DaoCreator/constants.ts Show resolved Hide resolved
src/components/ui/GaslessVotingToggle.tsx Outdated Show resolved Hide resolved
src/hooks/useNativeToken.ts Outdated Show resolved Hide resolved
@DarksightKellar DarksightKellar marked this pull request as draft January 29, 2025 14:44
@DarksightKellar
Copy link
Contributor Author

DarksightKellar commented Jan 29, 2025

Gonna mark this as draft since there's a number of unresolved points pending input

@DarksightKellar DarksightKellar changed the title Gassless voting UI Gasless voting UI Jan 29, 2025
@DarksightKellar DarksightKellar marked this pull request as ready for review January 31, 2025 13:39
@xanaramoss
Copy link

@DarksightKellar The button seems very small and looks weird bellow the divider.
Do we need a button there to propose the changes? I though there was a general button like "save all changes". But I did not work on this screens so I'm a bit lost.

@nicolaus-sherrill will be able to give you more input.

Copy link

@nicolaus-sherrill nicolaus-sherrill left a comment

Choose a reason for hiding this comment

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

The "Propose" button in Settings is a global button for the settings experience and should be anchored to the bottom of the UI. It is pressed when the user finishes a session and pushes their settings and governance updates to a proposal.

@DarksightKellar
Copy link
Contributor Author

The "Propose" button in Settings is a global button for the settings experience and should be anchored to the bottom of the UI. It is pressed when the user finishes a session and pushes their settings and governance updates to a proposal.

Screenshot 2025-02-04 at 18 44 11 @nicolaus-sherrill

Copy link

@nicolaus-sherrill nicolaus-sherrill left a comment

Choose a reason for hiding this comment

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

@DarksightKellar this looks great for setup. High-fidelity UI is incoming today.

src/components/DaoCreator/formComponents/Multisig.tsx Outdated Show resolved Hide resolved
src/components/ui/GaslessVotingToggle.tsx Outdated Show resolved Hide resolved
Comment on lines +183 to +199
<Button
variant="secondary"
leftIcon={<Icon as={GasPump} />}
onClick={() => {
console.log(
'addGas. Add this action to the proposal, to be submitted via propose changes button.',
);

// @todo: Add UI to set the amount, then call onGasTankTopupAmountChange.
props.onGasTankTopupAmountChange({
value: '1',
bigintValue: 1n,
});
}}
>
{t('addGas')}
</Button>
Copy link
Contributor

Choose a reason for hiding this comment

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

So this button is so that a proposal is created to fund the gas tank via a proposal?

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 way I see it, the end result of this button is a prepared transaction to fund the tank. The "Propose" button will have to be clicked at the bottom for the proposal to be prepared and submitted

if (gaslessVotingChanged) {
changeTitles.push(t('enableGaslessVoting', { ns: 'proposalMetadata' }));

// @todo Is KV pairs the place we're storing this flag?
Copy link
Contributor

Choose a reason for hiding this comment

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

Thats a good question? Probably right?

src/types/fractal.ts Outdated Show resolved Hide resolved
src/types/fractal.ts Show resolved Hide resolved
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.

5 participants