Skip to content

Serve a page on / for payjoin-directory#824

Merged
spacebear21 merged 3 commits intopayjoin:masterfrom
zealsham:directory-homepage
Jul 1, 2025
Merged

Serve a page on / for payjoin-directory#824
spacebear21 merged 3 commits intopayjoin:masterfrom
zealsham:directory-homepage

Conversation

@zealsham
Copy link
Collaborator

This commit addresses #818 .

Comment on lines 276 to 307

let html = r#"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Payjoin Directory</title>
<style>
body {
background-color: #0f0f0f;
color: #eaeaea;
font-family: 'Courier New', Courier, monospace;
padding: 2rem;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background: #1a1a1a;
border: 1px solid #333;
border-radius: 8px;
padding: 2rem;
box-shadow: 0 0 10px rgba(0, 170, 255, 0.2);
text-align: center;
}
h1 {
color: #00aaff;
margin-bottom: 1rem;
}
p {
color: #ccc;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mixing html with code is bad practice , However since this is just a minimal page i think those rules can be relaxed here

Copy link
Collaborator

Choose a reason for hiding this comment

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

agreed, the directory is not going to have any kind of frontend that doesn't make much sense long term either so IMO it's a good idea to keep it simple, this is a bad practice is more for web development in general but doesn't apply here

@coveralls
Copy link
Collaborator

coveralls commented Jun 30, 2025

Pull Request Test Coverage Report for Build 16002894193

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 59 (0.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 84.896%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin-directory/src/lib.rs 0 59 0.0%
Files with Coverage Reduction New Missed Lines %
payjoin-directory/src/lib.rs 1 63.57%
Totals Coverage Status
Change from base Build 15949315495: -0.6%
Covered Lines: 7251
Relevant Lines: 8541

💛 - Coveralls

Copy link
Collaborator

@nothingmuch nothingmuch left a comment

Choose a reason for hiding this comment

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

it looks nice and clean, exactly what i was hoping for

i have some suggestions but I don't feel i'm the right person to make a call about...

this should probably use the color theme on pdk and payjoin sites, so pink instead of blue, @thebrandonlucas wdyt?

i also like the look of the monospace font but also not sure that's very consistent with existing style

Comment on lines 313 to 314
<h1>Payjoin Directory</h1>
<p>this is a directory used to facilitate asynchronous payments between supporting Bitcoin wallets.</p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should link to payjoin.org or https://payjoin.org/docs/how-it-works/payjoin-v2-bip-77

maybe also explain briefly that the directory is a mailbox service? idk...

@nothingmuch
Copy link
Collaborator

Here's a screenshot to save time for other reviewers

image

@zealsham
Copy link
Collaborator Author

updated look for reviewers
Screenshot 2025-06-30 at 6 16 39 PM

@thebrandonlucas
Copy link
Collaborator

utACK. Simple and straightforward.

@nothingmuch Frankly I don't think we should worry too much about the design of this other than maybe consistent color scheme (yet) as we'd really like to reevaluate and overhaul our branding at some point once that becomes a greater priority. What we have now was really just an initial attempt that never got a more serious, dedicated effort. In which case whatever we put here would then change as well.

<body>
<div class="container">
<h1>Payjoin Directory</h1>
<p>This is a mailbox for payjoin transactions, which is used to facilitate asynchronous payments between supporting Bitcoin wallets.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p>This is a mailbox for payjoin transactions, which is used to facilitate asynchronous payments between supporting Bitcoin wallets.</p>
<p>The Payjoin Directory provides a rendezvous point for sender and receiver to meet. The directory stores Payjoin payloads to support asynchronous communication.</p>

Facilitate payments is pretty loaded language I'm not the most comfortable with. I'd like to borrow from the BIP with as plain language as is possible https://github.com/DanGould/bips/blob/pjv2-bak/bip-0077.mediawiki#directory-interactions

The directory has mailboxes, it isn't itself a mailbox according to BIP 77 as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

"facilitate communication" is not only less loaded, it's also more accurate FWIW

@zealsham
Copy link
Collaborator Author

zealsham commented Jul 1, 2025

Screenshot 2025-07-01 at 8 32 32 PM

Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

ACK 3e34f45

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

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

I agree the theme could be overhauled but this can be a follow-up for when we produce better design guidelines.

@spacebear21 spacebear21 merged commit ba27ae5 into payjoin:master Jul 1, 2025
7 checks passed
@DanGould
Copy link
Contributor

DanGould commented Jul 1, 2025

@spacebear21 I imagine you considered #840 before merging this, but I want to bring it up for others to see. we're in a precarious spot adding new code while 0.24.0 has been released before all of the others, but I know this change just changes the index response and won't cause a problem.

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.

6 participants