Skip to content

Conversation

@oluwatobiss
Copy link
Member

Web Dev Path
295
closes #295

Have you updated the CHANGELOG.md file? If not, please do it.

Yes

What is this change?

  • Replace mailto:[email protected] button links with /contact.
  • Prevent full-page reloads on clicking internal links to enhance user experience.

Were there any complications while making this change?

No

How to replicate the issue?

Clicking the main branch’s “Join us” (navbar) or “Ping us” (about page) buttons would navigate to mailto:[email protected].

Image Image

If necessary, please describe how to test the new feature or fix.

Clicking the PR branch’s “Join us” (navbar) or “Ping us” (about page) buttons would navigate to /contact without a full-page reload.

navbar-join-us-btn-wdp about-page-ping-us-btn-wdp

When should this be merged?

After three approved reviews.

@oluwatobiss oluwatobiss requested a review from a team September 29, 2025 13:49
@oluwatobiss oluwatobiss self-assigned this Sep 29, 2025
@netlify
Copy link

netlify bot commented Sep 29, 2025

Deploy Preview for webdevpathstage ready!

Name Link
🔨 Latest commit 60ab75c
🔍 Latest deploy log https://app.netlify.com/projects/webdevpathstage/deploys/68e983ded72853000741aca1
😎 Deploy Preview https://deploy-preview-296--webdevpathstage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@oluwatobiss
Copy link
Member Author

oluwatobiss commented Sep 29, 2025

🤔 It seems a bit strange to have two navlinks navigating to the same page (/contact on “Contact” and “Join us”). However, no good alternative for the issue this PR aims to solve comes to mind. Any opinion on this❔

@Satoshi-Sh
Copy link
Member

I'm not too sure if we want subject auto fill on this PR. Let's see what other members say about it.

🤔 It seems a bit strange to have two navlinks navigating to the same page (/contact on “Contact” and “Join us”). However, no good alternative for the issue this PR aims to solve comes to mind. Any opinion on this❔

How about add anchor tag to the contact form for the Ping Us and also Join Us

@cherylli
Copy link
Member

cherylli commented Oct 1, 2025

🤔 It seems a bit strange to have two navlinks navigating to the same page (/contact on “Contact” and “Join us”). However, no good alternative for the issue this PR aims to solve comes to mind. Any opinion on this❔

Yeah we can discuss it with the UI/UX team and see if there's any suggestions. @briangesteban

I'm not too sure if we want subject auto fill on this PR. Let's see what other members say about it.

I don't like the auto subject population. I think people should be writing their own subject. It doesn't seem to work consistently anyway, I saw it once but then I can never trigger it again

Name: '',
Email: '',
Subject: '',
Subject: subject || '',
Copy link
Member

Choose a reason for hiding this comment

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

What is the goal of adding the subject parameter here @oluwatobiss ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The subject parameter ensures that clicking the Join us button auto-fills the form’s subject field with ‘Project collaborator application.’ This makes the ‘Join us’ button distinct for collaboration requests, while the ‘Contact’ button serves general inquiries.

Copy link
Member

@mariana-caldas mariana-caldas left a comment

Choose a reason for hiding this comment

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

Such a thoughtful PR, @oluwatobiss ! Can you please just explain why you are adding the subject parameter? Thanks so much!

>
{children}
</a>
) : (
Copy link
Member

Choose a reason for hiding this comment

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

Nice touch! 🥷 🏅

return (
<li className={styles.item} key={id}>
<a
<Link
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for your attention to detail! 🥷

@mariana-caldas
Copy link
Member

Another way to handle this refactor, @cherylli, @oluwatobiss, and @Satoshi-Sh, would be to transform the Join Us and Ping Us buttons into toolkits with JavaScript code, so that when the user clicks on them, the hello email is copied. You can see this effect here:

https://www.enhanceme.io/contact/

Screenshot 2025-10-05 at 12 42 03 PM

Since we are probably refactoring the Join Us btn with the Services structure, I decided to suggest the easiest patch to make the UX a little bit better.

@mariana-caldas mariana-caldas requested a review from a team October 5, 2025 20:01
@oluwatobiss
Copy link
Member Author

I don't like the auto subject population. I think people should be writing their own subject. It doesn't seem to work consistently anyway, I saw it once but then I can never trigger it again

Switching between “Contact” and “Join us” may cause inconsistent behavior because react-hook-form caches default values. I can find a solution to improve the experience if we choose the auto-subject population. My main concern was how to avoid having two nav buttons with precisely the same functionality.

@oluwatobiss
Copy link
Member Author

Since we are probably refactoring the Join Us btn with the Services structure, I decided to suggest the easiest patch to make the UX a little bit better.

In this case, may I suggest two temporary options:

  1. Leave the mailto link as-is until we finalize the new design.
  2. Set the “Join Us” button to auto-populate the subject field. This keeps the nav UIs distinct. Moreover, users can still edit the subject as they wish.

@mariana-caldas
Copy link
Member

Since we are probably refactoring the Join Us btn with the Services structure, I decided to suggest the easiest patch to make the UX a little bit better.

In this case, may I suggest two temporary options:

  1. Leave the mailto link as-is until we finalize the new design.
  2. Set the “Join Us” button to auto-populate the subject field. This keeps the nav UIs distinct. Moreover, users can still edit the subject as they wish.

We can't leave this as is because it appears broken to users. But I understand now your idea of trying to differentiate two navbar buttons that do the same thing, @oluwatobiss.
I wonder if it's possible to set the subject message "Application: I want to join the project" when users click on "Join Us" or "Ping Us', since the message is editable. Thoughts, @cherylli ?

Copy link
Member

@mtkksk1780 mtkksk1780 left a comment

Choose a reason for hiding this comment

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

@oluwatobiss
Thank you for the refactoring!

Since we are probably refactoring the Join Us btn with the Services structure, I decided to suggest the easiest patch to make the UX a little bit better.

In this case, may I suggest two temporary options:

  1. Leave the mailto link as-is until we finalize the new design.
  2. Set the “Join Us” button to auto-populate the subject field. This keeps the nav UIs distinct. Moreover, users can still edit the subject as they wish.

If option 2 above is chosen, the following change in pages/contact.js would help automatically update the subject field:

[pages/contact.js (Updated version)]

export default function ContactUs() {
  const searchParams = useSearchParams();
  const subject = searchParams.get("subject");
  const [param, setParam] = useState(subject);    // ----- Add useState to store the URL parameter
  const [message, setMessage] = useState([]);

  useEffect(() => {
    setParam(subject);
  }, [subject]);  // ----- Add useEffect to update parameter when the URL query changes

  return (
    <>
      <div className={styles.contactUsContainer}>
        <div className={styles.formWrapper}>
          <div className={styles.formAndDecorations}>
            <Bracket className={bracketStyles.yellowBracket} />
            <ContactUsFormSubscribe
              key={param}  // ----- Add key to reset form when parameter changes
              subject={param}
              setMsg={setMessage}
            />
            <img
              className={styles.yellowColon}
              src='/images/svg/yellow-colon.svg'
              alt=''
            />
            <div className={styles.responseMessage}>
              {message?.map((m, i) => (
                <span key={i}>
                  {m}
                  <br />
                </span>
              ))}
            </div>
          </div>
        </div>
      </div>
      <ContactUsCards />
    </>
  );
}

[Demonstration]
The contact form’s subject can change automatically based on the button clicked.
https://github.com/user-attachments/assets/e0acb49b-75cf-44bd-98d9-f648cc63988e

@oluwatobiss
Copy link
Member Author

If option 2 above is chosen, the following change in pages/contact.js would help automatically update the subject field:

Fantastic suggestion, @mtkksk1780! To further optimize the implementation, it would be best to avoid the useEffect hook, as it does not synchronize the component with any external system.

@oluwatobiss
Copy link
Member Author

@cherylli The subject auto-population should now work consistently with the latest commit. @mtkksk1780, Thanks for your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Redirect "Join us" and "Ping us" buttons to Contact page

6 participants