Skip to content

Conversation

@NanoMil
Copy link
Contributor

@NanoMil NanoMil commented Dec 8, 2025

No description provided.

@NanoMil NanoMil requested a review from Copilot December 8, 2025 20:53
@NanoMil NanoMil marked this pull request as draft December 8, 2025 20:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds contact form functionality to the Munich Maker Lab website by integrating Tailwind CSS v4 and implementing two Web3Forms-based contact forms. The changes enable users to contact the organization through form submissions instead of email links.

  • Adds Tailwind CSS v4 dependencies and configuration
  • Creates two contact form components (VorstandContactForm for board contact, InfoContactForm for general inquiries)
  • Updates contact, imprint, and about pages to use the new contact forms

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
package.json Bumps version to 0.0.2, adds Tailwind CSS v4 and @tailwindcss/vite dependencies
package-lock.json Updates lockfile with Tailwind CSS v4 dependencies and related packages
tailwind.config.js Adds Tailwind CSS v4 configuration file with content paths
astro.config.mjs Integrates Tailwind CSS Vite plugin into Astro build
src/styles/contact-form.css Defines custom CSS for form validation feedback display
src/components/VorstandContactForm.astro Implements contact form for board communication with Web3Forms integration
src/components/InfoContactForm.astro Implements contact form for general inquiries with Web3Forms integration
src/pages/imprint.mdx Replaces email link with VorstandContactForm component
src/pages/contact.mdx Adds InfoContactForm component and restructures content headings
src/pages/about.mdx Updates donation receipt request to reference contact form
src/layouts/Layout.astro Adds empty frontmatter section (no functional change)
src/layouts/Content.astro Adds blank line (formatting only)
src/components/Footer.astro Refactors footer layout with improved styling for social media links and former channels section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +2
---
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The frontmatter section (---) is empty and serves no purpose. This should be removed to avoid confusion.

Suggested change
---

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +51
<textarea
name="message"
required
placeholder="Your Message"
class="w-full px-4 py-3 border placeholder:text-slate-400 rounded-md outline-none h-36 focus:ring-4 border-slate-300 focus:border-slate-600 ring-slate-100"
></textarea>
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The message textarea is missing an accessible label. While there's a placeholder, screen readers need an explicit label. Consider adding a <label for="message"> with class sr-only, or add an aria-label attribute.

Copilot uses AI. Check for mistakes.
Comment on lines +95 to +99
result.innerHTML = responseData.message;
} else {
console.log(response);
result.classList.add("text-red-500");
result.innerHTML = responseData.message;
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Using innerHTML to display the API response message creates a potential XSS vulnerability if the API returns malicious HTML/JavaScript. Use textContent instead to safely display the message, or sanitize the response before rendering.

Suggested change
result.innerHTML = responseData.message;
} else {
console.log(response);
result.classList.add("text-red-500");
result.innerHTML = responseData.message;
result.textContent = responseData.message;
} else {
console.log(response);
result.classList.add("text-red-500");
result.textContent = responseData.message;

Copilot uses AI. Check for mistakes.
import ClientRouter from 'astro/components/ClientRouter.astro'
import Navbar from '../components/Navbar.vue'
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Unnecessary blank line added. This change adds no value and increases file length without improving readability.

Suggested change

Copilot uses AI. Check for mistakes.
})
.then(async (response) => {
let responseData = await response.json();
if (response.status == 200) {
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Use strict equality operator === instead of loose equality == for status code comparison to avoid type coercion issues.

Suggested change
if (response.status == 200) {
if (response.status === 200) {

Copilot uses AI. Check for mistakes.
e.preventDefault();
form.classList.add("was-validated");
if (!form.checkValidity()) {
form.querySelectorAll(":invalid")[0].focus();
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

If there are no invalid fields (e.g., the form passes basic HTML5 validation but fails for other reasons), querySelectorAll(":invalid")[0] could be undefined, causing a runtime error when calling .focus(). Add a null check before calling focus.

Suggested change
form.querySelectorAll(":invalid")[0].focus();
const invalidFields = form.querySelectorAll(":invalid");
if (invalidFields.length > 0) {
invalidFields[0].focus();
}

Copilot uses AI. Check for mistakes.
} else {
console.log(response);
result.classList.add("text-red-500");
result.innerHTML = responseData.message;
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Using innerHTML to display the API error message creates a potential XSS vulnerability if the API returns malicious HTML/JavaScript. Use textContent instead to safely display the message, or sanitize the response before rendering.

Suggested change
result.innerHTML = responseData.message;
result.textContent = responseData.message;

Copilot uses AI. Check for mistakes.
} else {
console.log(response);
result.classList.add("text-red-500");
result.innerHTML = responseData.message;
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Using innerHTML to display the API error message creates a potential XSS vulnerability if the API returns malicious HTML/JavaScript. Use textContent instead to safely display the message, or sanitize the response before rendering.

Copilot uses AI. Check for mistakes.
})
.catch((error) => {
console.log(error);
result.innerHTML = "Something went wrong!";
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The generic error message "Something went wrong!" doesn't provide users with actionable information. Consider providing more specific guidance, such as "Unable to send message. Please check your connection and try again, or contact us directly at [email]."

Suggested change
result.innerHTML = "Something went wrong!";
result.innerHTML = 'Unable to send message. Please check your internet connection and try again, or contact us directly at <a href="mailto:vorstand@chaostreff-flensburg.de">vorstand@chaostreff-flensburg.de</a>.';

Copilot uses AI. Check for mistakes.
let responseData = await response.json();
if (response.status == 200) {
result.classList.add("text-green-500");
result.innerHTML = responseData.message;
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Using innerHTML to display the API response message creates a potential XSS vulnerability if the API returns malicious HTML/JavaScript. Use textContent instead to safely display the message, or sanitize the response before rendering.

Copilot uses AI. Check for mistakes.
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