Skip to content

Add Embed Faucet route and update related components#891

Closed
ultraviolet10 wants to merge 3 commits intomasterfrom
aritra/faucet-page
Closed

Add Embed Faucet route and update related components#891
ultraviolet10 wants to merge 3 commits intomasterfrom
aritra/faucet-page

Conversation

@ultraviolet10
Copy link
Contributor

@ultraviolet10 ultraviolet10 commented Jun 10, 2025

Linked Issues

closes https://linear.app/happychain/issue/HAPPY-509/faucet-available-via-top-button-instead-of-a-popup

Description

This PR moves the faucet functionality from a tab in the wallet interface to its own dedicated route at /embed/faucet. The change improves the user experience by making the faucet accessible via a "Top Up" action button in the main interface.

Key changes:

  • Created a new route /embed/faucet that hosts the faucet functionality
  • Removed the faucet tab from the wallet content tabs
  • Added a "Top Up" action button that links to the new faucet route
  • Improved the faucet UI with better status messaging and styling
  • Fixed a typo in the UseTurnstileArgs type name
  • Updated the SwapIcon import to use the correct naming convention
Toggle Checklist

Checklist

Basics

  • B1. I have applied the proper label & proper branch name (e.g. norswap/build-system-caching).
  • B2. This PR is not so big that it should be split & addresses only one concern.
  • B3. The PR targets the lowest branch it can (ideally master).

Reminder: PR review guidelines

Correctness

  • C1. Builds and passes tests.

  • C2. The code is properly parameterized & compatible with different environments (e.g. local,
    testnet, mainnet, standalone wallet, ...).

  • C3. I have manually tested my changes & connected features.

  • C4. I have performed a thorough self-review of my code after submitting the PR,
    and have updated the code & comments accordingly.

Architecture & Documentation

  • D1. I made it easy to reason locally about the code, by (1) using proper abstraction boundaries,
    (2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
  • D2. All public-facing APIs are documented in the docs.
    Public APIS and meaningful (non-local) internal APIs are properly documented in code comments.
  • D3. If appropriate, the general architecture of the code is documented in a code comment or
    in a Markdown document.
  • D4. An appropriate Changeset has been generated (and committed) with make changeset for
    breaking and meaningful changes in packages (not required for cleanups & refactors).

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ultraviolet10 ultraviolet10 self-assigned this Jun 10, 2025
@ultraviolet10 ultraviolet10 added reviewing-1 Ready for, or undergoing first-line review Not Urgent testnet-release labels Jun 10, 2025 — with Graphite App
@linear
Copy link

linear bot commented Jun 10, 2025

@ultraviolet10 ultraviolet10 marked this pull request as ready for review June 10, 2025 10:54
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 10, 2025

Deploying happychain with  Cloudflare Pages  Cloudflare Pages

Latest commit: ed4033c
Status: ✅  Deploy successful!
Preview URL: https://a54e673e.happychain.pages.dev
Branch Preview URL: https://aritra-faucet-page.happychain.pages.dev

View logs

key: "topup",
to: "/embed/faucet",
label: "Top Up",
icon: CreditCardIcon,
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a faucet icon 👀

Copy link
Collaborator

Choose a reason for hiding this comment

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

Text should say "Faucet" too

Copy link
Contributor

Choose a reason for hiding this comment

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

topup should stay I think (and stay disabled) faucet is separate and exclusive feature to testnet

@norswap
Copy link
Collaborator

norswap commented Jun 11, 2025

  • There's a lil graphical glitch when the cloufdlare thing goes up, a horizontal scrollbar appears at the bottom.
  • I like the spinner on the button, but it'd be better if it retained its original size.

But besides that, I'm of two minds on this. It look kinda better as a tab (feels very empty otherwise). Also, it's kinda cool if we can get the balance show up top to refresh when the faucet hits. Let's discuss.

@norswap norswap added question Something has to be cleared up after review and removed reviewing-1 Ready for, or undergoing first-line review Not Urgent labels Jun 11, 2025
@not-reed not-reed self-requested a review June 16, 2025 14:52
@not-reed
Copy link
Contributor

it's kinda cool if we can get the balance show up top to refresh when the faucet hits

I think it does this on master now (so assuming it works here, but i'm rate limited now 😓 )

I think i like it as a tab better

but with that said, our tabs could be good to be routes: https://ark-ui.com/docs/components/tabs#router-controlled-tabs

@norswap
Copy link
Collaborator

norswap commented Jun 19, 2025

Aight, let's keep as a tab for now!

@norswap norswap closed this Jun 19, 2025
@norswap norswap deleted the aritra/faucet-page branch July 24, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Something has to be cleared up after review testnet-release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants