Skip to content

Conversation

@sudo-shashank
Copy link
Contributor

@sudo-shashank sudo-shashank commented May 23, 2025

Summary of changes

Changes introduced in this pull request:

  • Refactored the codebase by restructuring and decomposing large components into smaller, modular, and maintainable code.
  • All css now lives inside style/tailwind.css.
  • Replaced To faucet list and Back to faucet list with just Faucet List.
  • Added a Home button to navigate to landing page.
  • Update e2e script with new button names.
  • Added license check.
  • Added a components diagram(docs/components.md)

Reference issue to close (if applicable)

Closes #207

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code
    adheres to the team's
    documentation standards,
  • I have added tests that prove my fix is effective or that my feature works
    (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes
    should be reflected in this document.

@codecov-commenter
Copy link

codecov-commenter commented May 23, 2025

Codecov Report

Attention: Patch coverage is 6.77711% with 619 lines in your changes missing coverage. Please review.

Project coverage is 9.89%. Comparing base (77dc43f) to head (a36aa00).

Files with missing lines Patch % Lines
src/faucet/views/faucets/mod.rs 0.00% 131 Missing ⚠️
src/faucet/views/home.rs 0.00% 118 Missing ⚠️
src/faucet/views/components/alert.rs 0.00% 62 Missing ⚠️
src/faucet/views/components/transaction.rs 0.00% 62 Missing ⚠️
src/faucet/views/components/balance.rs 0.00% 43 Missing ⚠️
src/utils/lotus_json/signed_message.rs 0.00% 36 Missing ⚠️
src/faucet/views/components/layout.rs 0.00% 30 Missing ⚠️
src/faucet/views/faucets/calibnet.rs 0.00% 23 Missing ⚠️
src/lib.rs 0.00% 23 Missing ⚠️
src/faucet/views/components/icons.rs 0.00% 20 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #231      +/-   ##
=========================================
- Coverage   10.07%   9.89%   -0.19%     
=========================================
  Files          27      35       +8     
  Lines        1568    1597      +29     
=========================================
  Hits          158     158              
- Misses       1410    1439      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sudo-shashank sudo-shashank marked this pull request as ready for review May 26, 2025 13:27
@sudo-shashank sudo-shashank requested a review from a team as a code owner May 26, 2025 13:27
@sudo-shashank sudo-shashank added Status: Do not merge Added to PRs that are not allowed to be merged. and removed Status: Do not merge Added to PRs that are not allowed to be merged. labels May 26, 2025
@sudo-shashank
Copy link
Contributor Author

@sudo-shashank sudo-shashank marked this pull request as draft May 27, 2025 07:33
@LesnyRumcajs
Copy link
Member

Good starting point! It'd make sense to add a mermaid graph showing roughly how the design looks like, so that that it's easy to review and follow.

@sudo-shashank
Copy link
Contributor Author

@sudo-shashank
Copy link
Contributor Author

Good starting point! It'd make sense to add a mermaid graph showing roughly how the design looks like, so that that it's easy to review and follow.

Added docs/components.md

graph TD
    subgraph src["Forest Explorer"]
        subgraph utils["Utils"]
            message["Message transfer<br/>message.rs"]
            format["Formatting balance & URL<br/>format.rs"]
            key["KeyPair<br/>key.rs"]
            error["Error handler<br/>error.rs"]
            address["Address utils<br/>address.rs"]
            rpc_context["Supported RPC's<br/>rpc_context.rs"]
            lotus_json["Lotus JSON<br/>lotus_json/"]
        end
        subgraph faucet["Faucet"]
            model["Faucet Model<br/>model.rs"]
            rate_limiter["Rate Limiter<br/>rate_limiter.rs"]
            calibnet["Calibnet Faucet Specific<br/>/faucet/calibnet/"]
            mainnet["Mainnet Faucet Specific<br/>/faucet/mainnet/"]
            subgraph views["UI Components"]
                home["Home page view<br/>home.rs"]
                layout["Page layouts view<br/>layout.rs"]
                faucet_view["Faucet page view<br/>faucet.rs"]
                transaction["Transactions view<br/>transaction.rs"]
                balance["Balance view<br/>balance.rs"]
                alert["Error view<br/>alert.rs"]
                nav["Navigation view<br/>nav.rs"]
                icons["Icons<br/>icons.rs"]
            end
        end
    end
Loading

@sudo-shashank sudo-shashank marked this pull request as ready for review May 28, 2025 07:05
@sudo-shashank
Copy link
Contributor Author

Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

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

LGTM

@sudo-shashank sudo-shashank enabled auto-merge May 28, 2025 12:36
@sudo-shashank sudo-shashank disabled auto-merge May 28, 2025 12:36
@sudo-shashank sudo-shashank enabled auto-merge May 28, 2025 12:42
@sudo-shashank sudo-shashank added this pull request to the merge queue May 28, 2025
Merged via the queue into main with commit dea70a4 May 28, 2025
4 checks passed
@sudo-shashank sudo-shashank deleted the restructure branch May 28, 2025 12:47
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.

Split Faucet component into smaller components

4 participants