Skip to content

Update Transfer Flow and UI Styling - #406

Merged
domw30 merged 6 commits into
developfrom
feat/dom/transfer-flow-update
Mar 10, 2022
Merged

Update Transfer Flow and UI Styling#406
domw30 merged 6 commits into
developfrom
feat/dom/transfer-flow-update

Conversation

@domw30

@domw30 domw30 commented Mar 9, 2022

Copy link
Copy Markdown
Collaborator

Associated Notion Card


1. Pull request checklist

  • Notion card has been moved to the Code Review column
  • Notion card has a link to this PR
  • A reviewer has been assigned to the Notion card

2. PR type

  • Feature

3. What is the old behaviour?

Hard code in transfer flow. In addition, the transfer flow required styling updates following figma designs - as well as a refactor of the existing code.

4. What is the new behaviour?

Revamp of the transfer flow behaviour steps and styling.

Screenshot 2022-03-09 at 14 29 36

Screenshot 2022-03-09 at 14 29 53

Screenshot 2022-03-09 at 14 30 13

@netlify

netlify Bot commented Mar 9, 2022

Copy link
Copy Markdown

✔️ Deploy Preview for wilderworld-app ready!

🔨 Explore the source changes: 9ed8f7e

🔍 Inspect the deploy log: https://app.netlify.com/sites/wilderworld-app/deploys/622a6f0d93b12b0008263a9e

😎 Browse the preview: https://deploy-preview-406--wilderworld-app.netlify.app/

@domw30 domw30 changed the title Update Transfer UI styling Update Transfer Flow and UI Styling Mar 9, 2022
@domw30
domw30 marked this pull request as ready for review March 9, 2022 14:24

@eric-zero-dev eric-zero-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. I just left a few recommendations. Nice work!

Comment on lines +15 to +20
{props.subtext && (
<>
<br />
<p>{props.subtext}</p>
</>
)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@domw30 Can we prevent <p>, <br /> in JSX? I think we can use <div /> and classNames.

Comment thread src/components/TooltipLegacy/Tooltip.module.css Outdated
Comment on lines +8 to +10
const URLS = {
ACCOUNT_ETHERSCAN: 'https://etherscan.io/address/',
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. But we have constatns/urls.ts which has global URL constants. I think its good to move to there.

Comment on lines -29 to +36
<Link style={{ color: 'white' }} to={`${nft.domainName}`}>
{nft.domainName.substring(1)}
<Link className={styles.Link} to={`${nft.domainName}`}>
0://{nft.domainName.substring(1)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for removing inline styles :)

Comment on lines 64 to 66
<div
className={`${styles.TransferPreview} border-primary border-rounded blur`}
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please check if it works border-rounded blur on firefox. In my experience it did not work on firefox.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have opened a new project card to fix any of these issues as requested. I have added background-primary to this PR for this review too. Thanks for spotting.

onClose,
}: CancelBidContainerProps) => {
const { bid, bidData, refetch, isLoading } = useBidData(domainId, auctionId);
console.log(auctionId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I believe it was for debugging purpose

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ah yes thanks good spot!

Comment on lines +43 to +50
const exports = {
TITLES,
BUTTONS,
CURRENCY,
MESSAGES,
INPUT,
};
export default exports;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How about to use with single line

export default {
	TITLES,
	BUTTONS,
	CURRENCY,
	MESSAGES,
	INPUT,
};

But I recommend to export each constant and import them individually. Otherwise we have to use constants.**.**. It is just my recommendation. Its up to you.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah nice suggestion I prefer this too, less noise! 😄

Comment on lines +46 to +50
const [error, setError] = useState<string | undefined>();
const [currentStep, setCurrentStep] = useState<Step>(Step.Details);
const [stepTitle, setStepTitle] = useState<string>(
constants.TITLES[Step.Details].PRIMARY,
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

Comment on lines +85 to +113
const steps = {
[Step.Details]: (
<NFTDetails
creatorId={creatorId}
domainName={domainName}
title={name}
image={image}
valid={valid}
walletAddress={walletAddress}
setWalletAddress={setWalletAddress}
onNext={() => valid && onAccept()}
/>
),
[Step.Confirmation]: isLoading ? (
<Wizard.Loading
message={constants.MESSAGES.TEXT_CONFIRMATION}
subtext={constants.MESSAGES.TEXT_ACCEPT_PROMPT}
/>
) : (
<Wizard.Confirmation
error={error}
message={constants.MESSAGES.TEXT_CONFIRMATION}
primaryButtonText={constants.BUTTONS[Step.Confirmation].PRIMARY}
onClickPrimaryButton={submitTransfer}
secondaryButtonText={constants.BUTTONS[Step.Confirmation].SECONDARY}
onClickSecondaryButton={onClose}
/>
),
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, but I prefer to use useMemo to memoize

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I followed Bretts cancelBid Wizard for this. No preference myself, maybe we could discuss

<EtherInput
ethlogo
text={walletAddress}
onChange={(text: string) => setWalletAddress(text)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It will be equivalent onChange={setWalletAddress}?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

nice thanks

@domw30

domw30 commented Mar 10, 2022

Copy link
Copy Markdown
Collaborator Author

@ericlowturing, please could you have a quick look and re-review the changes before I merge please 🙏 Thanks!

@eric-zero-dev

Copy link
Copy Markdown
Contributor

@domw30 Looks good to me. Thanks

@domw30
domw30 merged commit 8e8b02e into develop Mar 10, 2022
@domw30
domw30 deleted the feat/dom/transfer-flow-update branch March 10, 2022 21:43
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.

2 participants