From 6c092ab982e67a30b34044ad437ccffdaf5bb806 Mon Sep 17 00:00:00 2001 From: Isha Bamel Date: Wed, 1 Jan 2025 20:55:18 +0530 Subject: [PATCH 01/17] Added hover effect on testimonials cards --- src/Pages/Testimonial.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Pages/Testimonial.css b/src/Pages/Testimonial.css index ac89ae0..c556b31 100644 --- a/src/Pages/Testimonial.css +++ b/src/Pages/Testimonial.css @@ -15,6 +15,7 @@ h1{ .container{ margin-top: 5%; + margin-bottom: 20px; } .image-text{ @@ -28,8 +29,10 @@ h1{ border-radius: 15px; box-shadow: 0px 2px 6px 3px rgba(0, 0, 0, 0.1); animation: fadeInUp 1s ease-in-out; /* Added animation */ + transition: transform 0.3s ease, box-shadow 0.3s ease; } + .image-text h2{ font-size: 25px; text-transform: uppercase; @@ -43,6 +46,13 @@ h1{ .single{ position: relative; margin-bottom: 50px; + +} + +.single:hover { + transform: scale(1.05); + box-shadow: 0px 4px 12px 6px rgba(0, 0, 0, 0.2); + transition: all 0.3s ease-in-out; } .image{ @@ -61,6 +71,9 @@ h1{ width: 100%; object-fit: cover; } +.row{ + margin-bottom: 20px; +} .carousel-indicators{ left: 0; From 3c57dc4cc57631650094e8a5aae6091cb73b211c Mon Sep 17 00:00:00 2001 From: Isha Bamel Date: Wed, 1 Jan 2025 21:07:12 +0530 Subject: [PATCH 02/17] Added hover effect on testimonials cards --- src/Pages/Testimonial.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/Testimonial.css b/src/Pages/Testimonial.css index c556b31..5fa8213 100644 --- a/src/Pages/Testimonial.css +++ b/src/Pages/Testimonial.css @@ -64,7 +64,7 @@ h1{ top:15px; left:125px; border-radius: 50%; - animation: bounceIn 1s ease-in-out; /* Added animation */ + animation: bounceIn 1s ease-in-out; } .image img{ From bd11802fc4a629be937324471a8639754e839c82 Mon Sep 17 00:00:00 2001 From: Isha Bamel Date: Wed, 1 Jan 2025 21:07:53 +0530 Subject: [PATCH 03/17] Added hover effect on testimonials cards --- src/Pages/Testimonial.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Pages/Testimonial.css b/src/Pages/Testimonial.css index 5fa8213..516c6dc 100644 --- a/src/Pages/Testimonial.css +++ b/src/Pages/Testimonial.css @@ -29,6 +29,7 @@ h1{ border-radius: 15px; box-shadow: 0px 2px 6px 3px rgba(0, 0, 0, 0.1); animation: fadeInUp 1s ease-in-out; /* Added animation */ + transition: transform 0.3s ease, box-shadow 0.3s ease; } From 858c456061907e02db74c20434dc87c6ef8752b2 Mon Sep 17 00:00:00 2001 From: Isha Bamel Date: Wed, 1 Jan 2025 22:06:13 +0530 Subject: [PATCH 04/17] Added hover effect on testimonials cards --- src/Pages/Testimonial.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Pages/Testimonial.css b/src/Pages/Testimonial.css index 516c6dc..a1abf4f 100644 --- a/src/Pages/Testimonial.css +++ b/src/Pages/Testimonial.css @@ -32,7 +32,9 @@ h1{ transition: transform 0.3s ease, box-shadow 0.3s ease; } - +.image:hover { + transform: none; + } .image-text h2{ font-size: 25px; From 67a130bfc467521ccec98ca782eede11755465eb Mon Sep 17 00:00:00 2001 From: abhaykumar-0285 Date: Wed, 1 Jan 2025 22:10:38 +0530 Subject: [PATCH 05/17] updated scroll button to the home page --- package-lock.json | 2 +- package.json | 2 +- public/index.html | 7 +++++++ src/index.css | 26 ++++++++++++++++++++++++++ src/index.js | 20 ++++++++++++++++++++ 5 files changed, 55 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ee8a02..6d8cef7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "react-locomotive-scroll": "^0.2.2", "react-redux": "^9.1.2", "react-router-dom": "^6.26.2", - "react-scripts": "5.0.1", + "react-scripts": "^5.0.1", "scrolltrigger": "^1.0.1", "styled-components": "^6.1.13", "web-vitals": "^2.1.4" diff --git a/package.json b/package.json index a7a1bcf..721e6c2 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "react-locomotive-scroll": "^0.2.2", "react-redux": "^9.1.2", "react-router-dom": "^6.26.2", - "react-scripts": "5.0.1", + "react-scripts": "^5.0.1", "scrolltrigger": "^1.0.1", "styled-components": "^6.1.13", "web-vitals": "^2.1.4" diff --git a/public/index.html b/public/index.html index b9178d0..5e24454 100644 --- a/public/index.html +++ b/public/index.html @@ -28,6 +28,7 @@ MsCafe + @@ -44,6 +45,12 @@ To begin the development, run `npm start` or `yarn start`. To create a production bundle, use `npm run build` or `yarn build`. --> + + + + diff --git a/src/index.css b/src/index.css index 651ed53..ded5762 100644 --- a/src/index.css +++ b/src/index.css @@ -14,3 +14,29 @@ code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } + +/* Styling for the scroll-to-top button */ +#scrollToTop { + display: none; /* Initially hidden */ + position: fixed; + bottom: 20px; + right: 20px; + z-index: 99; + background-color: #6F4E37; /* Coffee Brown */ + color: #FAF9F6; /* Off-White */ + border: none; + outline: none; + cursor: pointer; + padding: 10px 15px; + border-radius: 50%; + font-size: 20px; + box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); + transition: all 0.3s ease-in-out; +} + +/* Hover effect */ +#scrollToTop:hover { + background-color: #D4A373; /* Golden Yellow */ + color: #4B4B4B; /* Charcoal Gray */ + transform: scale(1.1); /* Slightly enlarge the button */ +} \ No newline at end of file diff --git a/src/index.js b/src/index.js index d563c0f..04149c9 100644 --- a/src/index.js +++ b/src/index.js @@ -11,6 +11,26 @@ root.render( ); +// Get the button element +const scrollToTopButton = document.getElementById("scrollToTop"); + +// Show the button when the user scrolls down 100px +window.onscroll = function () { + if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { + scrollToTopButton.style.display = "block"; + } else { + scrollToTopButton.style.display = "none"; + } +}; + +// Scroll to the top when the button is clicked +scrollToTopButton.addEventListener("click", function () { + window.scrollTo({ + top: 0, + behavior: "smooth", // Smooth scrolling + }); +}); + // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals From e4617a94386502c30445a1dab9b128dd4bf946d8 Mon Sep 17 00:00:00 2001 From: Rishi Mondal Date: Wed, 1 Jan 2025 17:48:10 +0000 Subject: [PATCH 06/17] Dockerize Container --- Dockerfile | 32 ++++++++++++++++++++++++++++++++ nginx.conf | 15 +++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2219e6b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# Stage 1: Build the React application +FROM node:18 AS builder + +# Set working directory inside the container +WORKDIR /app + +# Copy package.json and package-lock.json +COPY package.json ./ + +# Install dependencies +RUN npm install + +# Copy all source code +COPY . . + +# Build the React app +RUN npm run build + +# Stage 2: Serve the application with Nginx +FROM nginx:stable-alpine + +# Copy the built files from the previous stage +COPY --from=builder /app/build /usr/share/nginx/html + +# Copy the Nginx configuration +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Expose the port +EXPOSE 80 + +# Start the Nginx server +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..185d0f2 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,15 @@ +server { + listen 80; + + server_name localhost; + + root /usr/share/nginx/html; + + index index.html; + + location / { + try_files $uri /index.html; + } + + error_page 404 /index.html; +} From 263a31ff7a80370724e4ea4abd13b2e6068a4759 Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 07:18:40 +0530 Subject: [PATCH 07/17] changes_githubworkFlow --- .github/workflows/greetings.yml | 19 +++++++++++++------ .github/workflows/preview.yaml | 14 -------------- .github/workflows/production.yaml | 14 -------------- 3 files changed, 13 insertions(+), 34 deletions(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 7d1f177..7cc90ea 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -13,12 +13,19 @@ jobs: welcome: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: EddieHubCommunity/gh-action-community/src/welcome@main + - uses: actions/checkout@v3 + - name: Welcome Community + uses: EddieHubCommunity/gh-action-community/src/welcome@main with: - github-token: ${{ secrets.USER_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} issue-message: | - Congratulations, @${{ github.actor }}! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work! + Congratulations, @${{ github.actor }}! 🎉 Thank you for creating your issue. + Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. + Keep up the great work! pr-message: | - Great job, @${{ github.actor }}! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project. - footer: 'We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our [contributing guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md)' \ No newline at end of file + Great job, @${{ github.actor }}! 🎉 Thank you for submitting your pull request. + Your contribution is valuable and we appreciate your efforts to improve our project. + footer: | + We will promptly review your changes and offer feedback. + Keep up the excellent work! + Please check our [contributing guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md) \ No newline at end of file diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 98459ee..1295ed1 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -25,20 +25,6 @@ jobs: - name: Pull Vercel Environment Information run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - - - name: Build Project Artifacts - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - - - name: Deploy Project Artifacts - run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index a2e140b..7769f64 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -25,20 +25,6 @@ jobs: - name: Pull Vercel Environment Information run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - - - name: Build Project Artifacts - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - - - name: Deploy Project Artifacts - run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} From bcfe2ceafd35d011791ecb29dd928596b43f2273 Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 07:27:00 +0530 Subject: [PATCH 08/17] chnages --- .github/ISSUE_TEMPLATE/bug.yml | 32 ----------------- .github/ISSUE_TEMPLATE/document.yml | 41 ---------------------- .github/ISSUE_TEMPLATE/feature_request.yml | 32 ----------------- .github/ISSUE_TEMPLATE/other.yml | 25 ------------- .github/ISSUE_TEMPLATE/refactor_code.yml | 35 ------------------ .github/pull_request_template.md | 39 -------------------- .github/workflows/autocomment-pr-merge.yml | 36 ------------------- .github/workflows/greetings.yml | 31 ---------------- .github/workflows/preview.yaml | 31 ---------------- .github/workflows/production.yaml | 31 ---------------- 10 files changed, 333 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug.yml delete mode 100644 .github/ISSUE_TEMPLATE/document.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 .github/ISSUE_TEMPLATE/other.yml delete mode 100644 .github/ISSUE_TEMPLATE/refactor_code.yml delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/autocomment-pr-merge.yml delete mode 100644 .github/workflows/greetings.yml delete mode 100644 .github/workflows/preview.yaml delete mode 100644 .github/workflows/production.yaml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml deleted file mode 100644 index 3331c02..0000000 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: ​🐞 Bug -description: Report an issue to help us improve the project. -title: "[BUG] " -labels: ["bug", "goal: fix", "priority: medium"] -body: - - type: textarea - attributes: - label: Description - description: A brief description of the issue or bug you are facing, also include what you tried and what didn't work. - validations: - required: false - - type: textarea - attributes: - label: Screenshots - description: Please add screenshots if applicable - validations: - required: false - - type: textarea - attributes: - label: Any additional information? - description: Any additional information or Is there anything we should know about this bug? - validations: - required: false - - type: dropdown - attributes: - label: What browser are you seeing the problem on? - multiple: true - options: - - Firefox - - Chrome - - Safari - - Microsoft Edge diff --git a/.github/ISSUE_TEMPLATE/document.yml b/.github/ISSUE_TEMPLATE/document.yml deleted file mode 100644 index 40c639d..0000000 --- a/.github/ISSUE_TEMPLATE/document.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: "Documentation 📋" -description: "Use this form to present your suggestions on how to improve our docs" -title: "[DOCS] " -labels: ["documenation", "goal: enhancement"] - -body: - - type: textarea - id: docs_description - attributes: - label: "Issue Description" - description: "Please provide a brief summary of the documentation issue you are experiencing or would like to address." - validations: - required: true - - - type: textarea - id: screenshots_examples_docs - attributes: - label: "Screenshots or Examples (if applicable)" - description: "Please include relevant screenshots or examples to help illustrate the problem." - - - type: textarea - id: proposed_solution_docs - attributes: - label: "Proposed Solution (optional)" - description: "If you have a proposed solution for the documentation issue, please provide it here. This can be helpful for speeding up the resolution process." - - - type: checkboxes - id: terms_checklist_docs - attributes: - label: "Checklist" - description: "By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Mujtabaa07/coffeeShop/blob/main/CODE_OF_CONDUCT.md)" - options: - - label: "I have checked the existing [issues](https://github.com/Mujtabaa07/coffeeShop/issues)" - required: true - - label: "I have read the [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md)" - required: true - - label: "I am willing to work on this issue (optional)" - required: false - - type: markdown - attributes: - value: "Thank you for taking the time to raise this issue! Your input is greatly appreciated." diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index b536fbe..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Feature Request 💡 -description: Have any new idea or new feature for popShop? Please suggest! -title: "[Feature] " -labels: ["enhancement", "goal: addition", "priority: high"] -body: - - type: textarea - id: description - attributes: - label: Description - description: A clear and concise description of any alternative solution or features you've considered. - validations: - required: true - - type: textarea - id: screenshots - attributes: - label: Screenshots - description: Please add screenshots if applicable - validations: - required: false - - type: checkboxes - id: no-duplicate-issues - attributes: - label: "Checklist" - options: - - label: "I have checked the existing [issues](https://github.com/Mujtabaa07/coffeeShop/issues)" - required: true - - - label: "I have read the [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md)" - required: true - - - label: "I am willing to work on this issue (optional)" - required: false diff --git a/.github/ISSUE_TEMPLATE/other.yml b/.github/ISSUE_TEMPLATE/other.yml deleted file mode 100644 index ef17e97..0000000 --- a/.github/ISSUE_TEMPLATE/other.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Other -description: Use this for any other question or issue. Please do not create blank issues -title: "[OTHER]" -labels: ["status: awaiting triage"] -body: - - type: textarea - id: issuedescription - attributes: - label: What would you like to share or ask? - description: Provide a clear and concise explanation of your issue. - validations: - required: true - - type: checkboxes - id: no-duplicate-issues - attributes: - label: "Checklist" - options: - - label: "I have checked the existing [issues](https://github.com/Mujtabaa07/coffeeShop/issues)" - required: true - - - label: "I have read the [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md)" - required: true - - - label: "I am willing to work on this issue (optional)" - required: false diff --git a/.github/ISSUE_TEMPLATE/refactor_code.yml b/.github/ISSUE_TEMPLATE/refactor_code.yml deleted file mode 100644 index 148f0a7..0000000 --- a/.github/ISSUE_TEMPLATE/refactor_code.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Refactor Code 🔧 -description: Use this label for code refactoring tasks. -title: "[Refactor] " -labels: ["goal: refactor", "priority: medium"] -body: - - type: input - attributes: - label: File Name - description: "Enter the file that you want to refactor in the codebase." - placeholder: "For example - component/Cards/Card.tsx" - validations: - required: true - - type: textarea - id: refactor_description - attributes: - label: "Reason for Refactoring the Code" - description: "Describe what improvements can be made in the codebase without introducing breaking changes." - validations: - required: true - - type: checkboxes - id: no-duplicate-issues - attributes: - label: "Checklist" - options: - - label: "I have checked the existing [issues](https://github.com/Mujtabaa07/coffeeShop/issues)." - required: true - - - label: "I have read the [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md)." - required: true - - - label: "The changes don't break the code and don't introduce new functionality." - required: true - - - label: "I am willing to work on this issue (optional)." - required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 546968b..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,39 +0,0 @@ -Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. - - -Fixes # (issue) - - -## Type of change - -Please give a X on it which is applicable - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Refactor Code -- [ ] A documentation update -- [ ] Others(mentioned in the issue number) - -# How Has This Been Tested? - -Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - -**_Test A Describe here_** - -**_Test B Describe here (if Requred)_** - -# Screenshots and Videos: - -Give screenshots and video of the changes you made - -# Checklist: -Give a X on, which is applicable - -- [ ] My code follows the style guidelines of this project -- [ ] I have performed a self-review of my code -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation -- [ ] My changes generate no new warnings -- [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] New and existing unit tests pass locally with my changes -- [ ] Any dependent changes have been merged and published in downstream modules diff --git a/.github/workflows/autocomment-pr-merge.yml b/.github/workflows/autocomment-pr-merge.yml deleted file mode 100644 index 54c97b5..0000000 --- a/.github/workflows/autocomment-pr-merge.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Auto Comment on PR Merge - -on: - pull_request: - types: [closed] - -permissions: - issues: write - pull-requests: write - -jobs: - comment: - runs-on: ubuntu-latest - permissions: - pull-requests: write - if: github.event.pull_request.merged == true - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Add Comment to Issue - env: - GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} - run: | - COMMENT=$(cat < Date: Thu, 2 Jan 2025 07:31:59 +0530 Subject: [PATCH 09/17] Fixed hamburger menu for small screen devices --- src/componets/Navbar.js | 122 +++++++++++++++++++++++----------------- 1 file changed, 71 insertions(+), 51 deletions(-) diff --git a/src/componets/Navbar.js b/src/componets/Navbar.js index cf08477..4d5a420 100644 --- a/src/componets/Navbar.js +++ b/src/componets/Navbar.js @@ -1,9 +1,9 @@ -import React, { useState, useEffect } from 'react'; -import { Link } from 'react-router-dom'; -import { useSelector, useDispatch } from 'react-redux'; -import { logout } from '../Store/authSlice'; -import styled from 'styled-components'; -import { motion, AnimatePresence } from 'framer-motion'; +import React, { useState, useEffect } from "react"; +import { Link } from "react-router-dom"; +import { useSelector, useDispatch } from "react-redux"; +import { logout } from "../Store/authSlice"; +import styled from "styled-components"; +import { motion, AnimatePresence } from "framer-motion"; const NavbarContainer = styled(motion.nav)` display: flex; @@ -19,7 +19,7 @@ const NavbarContainer = styled(motion.nav)` right: 0; z-index: 1000; transition: all 0.3s ease; - border-bottom: 2px solid #8B4513; + border-bottom: 2px solid #8b4513; &.scrolled { padding: 0.8rem 2rem; @@ -27,13 +27,13 @@ const NavbarContainer = styled(motion.nav)` } &::before { - content: ''; + content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; - background: url('/coffee-beans-pattern.png') repeat; + background: url("/coffee-beans-pattern.png") repeat; opacity: 0.05; pointer-events: none; } @@ -42,17 +42,17 @@ const NavbarContainer = styled(motion.nav)` const Logo = styled(motion.div)` font-size: 2rem; font-weight: 700; - font-family: 'Playfair Display', serif; - + font-family: "Playfair Display", serif; + a { - color: #D2691E; + color: #d2691e; text-decoration: none; - background: linear-gradient(to right, #D2691E, #CD853F); + background: linear-gradient(to right, #d2691e, #cd853f); -webkit-background-clip: text; -webkit-text-fill-color: transparent; transition: all 0.3s ease; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); - + &:hover { opacity: 0.9; } @@ -71,29 +71,29 @@ const NavLinks = styled(motion.div)` const NavLink = styled(motion.div)` position: relative; - + a { - color: #DEB887; + color: #deb887; text-decoration: none; font-weight: 500; font-size: 1.1rem; transition: all 0.3s ease; - font-family: 'Poppins', sans-serif; - + font-family: "Poppins", sans-serif; + &:hover { - color: #FFE4B5; + color: #ffe4b5; } } &::after { - content: '☕'; + content: "☕"; position: absolute; font-size: 0.8rem; bottom: -15px; left: 50%; transform: translateX(-50%) scale(0); transition: transform 0.3s ease; - color: #D2691E; + color: #d2691e; } &:hover::after { @@ -104,10 +104,10 @@ const NavLink = styled(motion.div)` const MobileMenuButton = styled(motion.button)` display: none; background: none; - border: 2px solid #D2691E; + border: 2px solid #d2691e; font-size: 1.8rem; cursor: pointer; - color: #DEB887; + color: #deb887; padding: 0.5rem; border-radius: 8px; transition: all 0.3s ease; @@ -120,7 +120,7 @@ const MobileMenuButton = styled(motion.button)` &:hover { background: rgba(210, 105, 30, 0.2); - color: #FFE4B5; + color: #ffe4b5; } `; @@ -131,9 +131,10 @@ const MobileMenu = styled(motion.div)` right: 0; background: rgba(44, 19, 11, 0.98); padding: 1rem; + z-index: 1000; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); border-radius: 0 0 15px 15px; - border: 2px solid #8B4513; + border: 2px solid #8b4513; border-top: none; `; @@ -142,21 +143,21 @@ const MobileNavLink = styled(motion.div)` border-radius: 8px; transition: all 0.3s ease; margin-bottom: 0.5rem; - + a { - color: #DEB887; + color: #deb887; text-decoration: none; font-weight: 500; display: block; transition: all 0.3s ease; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; } &:hover { background: rgba(210, 105, 30, 0.2); - + a { - color: #FFE4B5; + color: #ffe4b5; transform: translateX(10px); } } @@ -173,8 +174,8 @@ function Navbar() { setScrolled(window.scrollY > 20); }; - window.addEventListener('scroll', handleScroll); - return () => window.removeEventListener('scroll', handleScroll); + window.addEventListener("scroll", handleScroll); + return () => window.removeEventListener("scroll", handleScroll); }, []); const handleLogout = () => { @@ -191,7 +192,7 @@ function Navbar() { initial={{ y: -100 }} animate={{ y: 0 }} transition={{ duration: 0.5 }} - className={scrolled ? 'scrolled' : ''} + className={scrolled ? "scrolled" : ""} > MsCafe @@ -212,7 +213,7 @@ function Navbar() { Contact - + {isLoggedIn ? ( <> @@ -221,10 +222,10 @@ function Navbar() { Cart - Logout @@ -240,7 +241,7 @@ function Navbar() { whileHover={{ scale: 1.1 }} whileTap={{ scale: 0.9 }} > - {isOpen ? '×' : '☰'} + {isOpen ? "×" : "☰"} @@ -252,39 +253,58 @@ function Navbar() { transition={{ duration: 0.3 }} > - Home + + Home + - Shop + + Shop + - About + + About + - Testimonial + + Testimonial + - Contact + + Contact + {isLoggedIn ? ( <> - Profile + + Profile + - Cart + + Cart + - { handleLogout(); toggleMenu(); }} - style={{ cursor: 'pointer' }} + { + handleLogout(); + toggleMenu(); + }} + style={{ cursor: "pointer" }} > Logout ) : ( - Login + + Login + )} @@ -294,4 +314,4 @@ function Navbar() { ); } -export default Navbar; \ No newline at end of file +export default Navbar; From 37d026793dce8dc3baa432b37b2d6e280c578cc7 Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 07:45:43 +0530 Subject: [PATCH 10/17] github --- .github/ISSUE_TEMPLATE/Bug-report.yaml | 67 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/Doc.yaml | 18 ++++++ .github/ISSUE_TEMPLATE/Feature-Request.yaml | 35 +++++++++++ .github/workflows/PRs.yaml | 37 ++++++++++++ .github/workflows/greetings.yaml | 41 +++++++++++++ .github/workflows/preview.yaml | 39 ++++++++++++ .github/workflows/production.yaml | 39 ++++++++++++ .github/workflows/pull-request.yaml | 29 +++++++++ 8 files changed, 305 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/Bug-report.yaml create mode 100644 .github/ISSUE_TEMPLATE/Doc.yaml create mode 100644 .github/ISSUE_TEMPLATE/Feature-Request.yaml create mode 100644 .github/workflows/PRs.yaml create mode 100644 .github/workflows/greetings.yaml create mode 100644 .github/workflows/preview.yaml create mode 100644 .github/workflows/production.yaml create mode 100644 .github/workflows/pull-request.yaml diff --git a/.github/ISSUE_TEMPLATE/Bug-report.yaml b/.github/ISSUE_TEMPLATE/Bug-report.yaml new file mode 100644 index 0000000..5c3de39 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug-report.yaml @@ -0,0 +1,67 @@ +name: 🐛 Bug Report +description: Create a report to help us improve +title: "[BUG] " +labels: ["bug", "triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: textarea + id: describe-bug + attributes: + label: Describe the Bug + description: A clear description of what the bug is + placeholder: Tell us what happened... + validations: + required: true + + - type: textarea + id: reproduce + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + validations: + required: true + + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Chrome + - Firefox + - Safari + - Microsoft Edge + + - type: input + id: version + attributes: + label: Version + description: What version of our software are you running? + validations: + required: true + + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our Code of Conduct + options: + - label: I agree to follow this project's Code of Conduct + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Doc.yaml b/.github/ISSUE_TEMPLATE/Doc.yaml new file mode 100644 index 0000000..7270954 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Doc.yaml @@ -0,0 +1,18 @@ +name: 📚 Documentation +description: Report documentation issues +title: "[Docs]: " +labels: ["documentation"] +body: + - type: textarea + id: description + attributes: + label: Description + description: What needs to be documented? + validations: + required: true + + - type: input + id: page-url + attributes: + label: Page URL + description: Which page needs updating? \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Feature-Request.yaml b/.github/ISSUE_TEMPLATE/Feature-Request.yaml new file mode 100644 index 0000000..6fb38ec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature-Request.yaml @@ -0,0 +1,35 @@ +name: 💡 Feature Request +description: Suggest an idea for this project +title: "[FEATURE] " +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: Is your feature request related to a problem? + description: A clear description of what the problem is + placeholder: I'm always frustrated when... + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Describe the solution + description: What you want to happen + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Any alternative solutions you've considered + + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + options: + - label: I agree to follow this project's Code of Conduct + required: true \ No newline at end of file diff --git a/.github/workflows/PRs.yaml b/.github/workflows/PRs.yaml new file mode 100644 index 0000000..b8760d2 --- /dev/null +++ b/.github/workflows/PRs.yaml @@ -0,0 +1,37 @@ +name: PR Auto Comment + +on: + pull_request_target: + types: [opened, ready_for_review] + +jobs: + pr-comment: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Comment on PR + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `### Thank you for your contribution! 🎉 + + #### PR Checklist + - [ ] Tests added/updated + - [ ] Documentation updated + - [ ] Changes follow coding standards + - [ ] Commit messages are clear + + #### Next Steps + 1. We will review your PR soon + 2. Address any requested changes + 3. Once approved, your PR will be merged + + Need help? Check our [Contributing Guide](CONTRIBUTING.md) + + Happy coding! 💻` + }) \ No newline at end of file diff --git a/.github/workflows/greetings.yaml b/.github/workflows/greetings.yaml new file mode 100644 index 0000000..354f8bc --- /dev/null +++ b/.github/workflows/greetings.yaml @@ -0,0 +1,41 @@ +name: Welcome to Our Community! 🎉 + +on: + fork: + issues: + types: [opened] + pull_request_target: + types: [opened] + discussion: + types: [created] + +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + ### Hello @${{ github.actor }}! 👋 + + Thank you for opening your first issue in our project! 🌟 + + A few quick things: + - 📝 Please check if this issue has been reported before + - ✅ Follow our issue template if provided + - ⏳ We'll review your issue as soon as possible + + Need help? Check our [Contributing Guidelines](CONTRIBUTING.md) + + pr-message: | + ### Amazing Work @${{ github.actor }}! 🎉 + + Thank you for your first contribution! We're thrilled to have you here! + + Helpful resources: + - 📚 [Contributing Guidelines](CONTRIBUTING.md) + - 🔧 [Development Setup](DEVELOPMENT.md) + - ⭐ [Code of Conduct](CODE_OF_CONDUCT.md) + + We'll review your PR soon. Keep coding! 💻 \ No newline at end of file diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml new file mode 100644 index 0000000..fe3807f --- /dev/null +++ b/.github/workflows/preview.yaml @@ -0,0 +1,39 @@ +name: Vercel Preview Deployment + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + pull_request: + branches: + - main + - master + +jobs: + Deploy-Preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install Dependencies + run: npm ci + + - name: Install Vercel CLI + run: npm install --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy Project Artifacts + run: | + DEPLOYMENT_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) + echo "Preview URL: $DEPLOYMENT_URL" \ No newline at end of file diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml new file mode 100644 index 0000000..d0ac5c7 --- /dev/null +++ b/.github/workflows/production.yaml @@ -0,0 +1,39 @@ +name: Vercel Production Deployment + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + push: + branches: + - main + - master + +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install Dependencies + run: npm ci + + - name: Install Vercel CLI + run: npm install --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + env: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy Project Artifacts + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 0000000..bb6a134 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,29 @@ +name: Pull Request Checks + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linter + run: npm run lint + + - name: Run tests + run: npm test + + - name: Build check + run: npm run build \ No newline at end of file From 4e047568e740d52bf11c55504089008b3c125744 Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 08:01:52 +0530 Subject: [PATCH 11/17] changes --- .github/ISSUE_TEMPLATE/Bug-report.yaml | 67 +++++------------ .github/ISSUE_TEMPLATE/Doc.yaml | 71 ++++++++++++++++--- .github/ISSUE_TEMPLATE/Feature-Request.yaml | 64 +++++++++++++---- .github/ISSUE_TEMPLATE/general_issues.yaml | 69 ++++++++++++++++++ .github/pull_request-templet.md | 39 ++++++++++ .github/workflows/auto-comment-pr.yml | 38 ++++++++++ .../{greetings.yaml => greetings.yml} | 28 +++++--- 7 files changed, 290 insertions(+), 86 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/general_issues.yaml create mode 100644 .github/pull_request-templet.md create mode 100644 .github/workflows/auto-comment-pr.yml rename .github/workflows/{greetings.yaml => greetings.yml} (68%) diff --git a/.github/ISSUE_TEMPLATE/Bug-report.yaml b/.github/ISSUE_TEMPLATE/Bug-report.yaml index 5c3de39..a3ff5b5 100644 --- a/.github/ISSUE_TEMPLATE/Bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/Bug-report.yaml @@ -1,67 +1,32 @@ -name: 🐛 Bug Report -description: Create a report to help us improve -title: "[BUG] " -labels: ["bug", "triage"] +name: ​🐞 Bug +description: Report an issue to help us improve the project. +title: "[BUG] " +labels: ["bug", "goal: fix", "priority: medium"] body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: textarea - id: describe-bug attributes: - label: Describe the Bug - description: A clear description of what the bug is - placeholder: Tell us what happened... + label: Description + description: A brief description of the issue or bug you are facing, also include what you tried and what didn't work. validations: - required: true - + required: false - type: textarea - id: reproduce attributes: - label: Steps To Reproduce - description: Steps to reproduce the behavior - placeholder: | - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error + label: Screenshots + description: Please add screenshots if applicable validations: - required: true - + required: false - type: textarea - id: expected attributes: - label: Expected Behavior - description: What did you expect to happen? + label: Any additional information? + description: Any additional information or Is there anything we should know about this bug? validations: - required: true - + required: false - type: dropdown - id: browsers attributes: - label: What browsers are you seeing the problem on? + label: What browser are you seeing the problem on? multiple: true options: - - Chrome - Firefox + - Chrome - Safari - - Microsoft Edge - - - type: input - id: version - attributes: - label: Version - description: What version of our software are you running? - validations: - required: true - - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our Code of Conduct - options: - - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + - Microsoft Edge \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Doc.yaml b/.github/ISSUE_TEMPLATE/Doc.yaml index 7270954..d30b848 100644 --- a/.github/ISSUE_TEMPLATE/Doc.yaml +++ b/.github/ISSUE_TEMPLATE/Doc.yaml @@ -1,18 +1,67 @@ -name: 📚 Documentation -description: Report documentation issues -title: "[Docs]: " -labels: ["documentation"] +name: "📚 Documentation Update" +description: "Help us improve our documentation" +title: "[DOCS] " +labels: ["documentation", "needs-triage"] + body: + - type: markdown + attributes: + value: | + Thanks for helping improve our documentation! 📖 + Please fill out the information below to help us understand your suggestion better. + - type: textarea - id: description + id: current_docs attributes: - label: Description - description: What needs to be documented? + label: "Current Documentation" + description: "What's currently in the documentation that needs to be updated?" + placeholder: "Example: The installation guide is missing steps for Windows setup..." validations: required: true - - type: input - id: page-url + - type: textarea + id: suggested_change + attributes: + label: "Suggested Changes" + description: "What changes would you like to see?" + placeholder: "Example: Add Windows-specific installation steps..." + validations: + required: true + + - type: textarea + id: screenshots + attributes: + label: "Screenshots or Examples" + description: "Add screenshots or examples if applicable" + placeholder: "Drag and drop images here..." + + - type: dropdown + id: doc_type + attributes: + label: "Documentation Type" + options: + - Installation Guide + - API Reference + - Tutorials + - README + - Other + validations: + required: true + + - type: checkboxes + id: terms + attributes: + label: "Contribution Agreement" + options: + - label: "I have searched existing issues and this is not a duplicate" + required: true + - label: "I have read the contributing guidelines" + required: true + - label: "I would like to work on fixing this documentation" + required: false + + - type: markdown attributes: - label: Page URL - description: Which page needs updating? \ No newline at end of file + value: | + --- + ⭐ Thank you for helping make our documentation better! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Feature-Request.yaml b/.github/ISSUE_TEMPLATE/Feature-Request.yaml index 6fb38ec..2467a5b 100644 --- a/.github/ISSUE_TEMPLATE/Feature-Request.yaml +++ b/.github/ISSUE_TEMPLATE/Feature-Request.yaml @@ -1,35 +1,73 @@ -name: 💡 Feature Request -description: Suggest an idea for this project +name: "✨ Feature Request" +description: "Suggest a new feature to enhance our Coffee Shop" title: "[FEATURE] " -labels: ["enhancement"] +labels: ["enhancement", "triage-needed"] + body: + - type: markdown + attributes: + value: | + # Feature Request + Thanks for taking the time to suggest a new feature! + Please fill out the information below to help us understand your suggestion better. + - type: textarea id: problem attributes: - label: Is your feature request related to a problem? - description: A clear description of what the problem is - placeholder: I'm always frustrated when... + label: "Problem Statement" + description: "What problem does this feature solve?" + placeholder: "I'm always frustrated when..." validations: required: true - type: textarea id: solution attributes: - label: Describe the solution - description: What you want to happen + label: "Proposed Solution" + description: "Describe the solution you'd like" + placeholder: "It would be great if..." validations: required: true - type: textarea id: alternatives attributes: - label: Alternatives Considered - description: Any alternative solutions you've considered + label: "Alternative Solutions" + description: "What alternatives have you considered?" + placeholder: "Another approach could be..." + + - type: textarea + id: screenshots + attributes: + label: "Screenshots or Mockups" + description: "Add any relevant screenshots, mockups or examples" + placeholder: "Drag and drop images here..." + + - type: dropdown + id: priority + attributes: + label: "Priority" + options: + - High + - Medium + - Low + validations: + required: true - type: checkboxes id: terms attributes: - label: Code of Conduct + label: "Contribution Guidelines" options: - - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + - label: "I have searched [existing issues](https://github.com/Mujtabaa07/coffeeShop/issues) and this is not a duplicate" + required: true + - label: "I have read the [Contributing Guidelines](CONTRIBUTING.md)" + required: true + - label: "I would like to implement this feature" + required: false + + - type: markdown + attributes: + value: | + --- + 💡 Thank you for contributing to make our Coffee Shop better! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/general_issues.yaml b/.github/ISSUE_TEMPLATE/general_issues.yaml new file mode 100644 index 0000000..60de8ff --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general_issues.yaml @@ -0,0 +1,69 @@ +name: "🤔 General Issue" +description: "Submit a general question, suggestion or issue" +title: "[GENERAL] " +labels: ["triage-needed"] + +body: + - type: markdown + attributes: + value: | + # General Issue Template + Thanks for taking the time to fill out this issue! Please provide as much information as possible. + + - type: dropdown + id: category + attributes: + label: "Category" + description: "What type of issue is this?" + options: + - Question + - Suggestion + - Problem + - Other + validations: + required: true + + - type: textarea + id: description + attributes: + label: "Description" + description: "What would you like to share or ask?" + placeholder: "Provide details about your issue, question, or suggestion..." + validations: + required: true + + - type: textarea + id: additional + attributes: + label: "Additional Context" + description: "Add any other context, screenshots, or relevant information" + placeholder: "Add any additional details here..." + + - type: dropdown + id: impact + attributes: + label: "Impact Level" + options: + - High + - Medium + - Low + validations: + required: true + + - type: checkboxes + id: terms + attributes: + label: "Contribution Guidelines" + options: + - label: "I have searched [existing issues](https://github.com/Mujtabaa07/coffeeShop/issues) to avoid duplicates" + required: true + - label: "I have read the [Contributing Guidelines](CONTRIBUTING.md)" + required: true + - label: "I would like to help resolve this issue" + required: false + + - type: markdown + attributes: + value: | + --- + Thank you for contributing to our project! 🙏 \ No newline at end of file diff --git a/.github/pull_request-templet.md b/.github/pull_request-templet.md new file mode 100644 index 0000000..3da9662 --- /dev/null +++ b/.github/pull_request-templet.md @@ -0,0 +1,39 @@ +Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. + + +Fixes # (issue) + + +## Type of change + +Please give a X on it which is applicable + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Refactor Code +- [ ] A documentation update +- [ ] Others(mentioned in the issue number) + +# How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + +**_Test A Describe here_** + +**_Test B Describe here (if Requred)_** + +# Screenshots and Videos: + +Give screenshots and video of the changes you made + +# Checklist: +Give a X on, which is applicable + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules \ No newline at end of file diff --git a/.github/workflows/auto-comment-pr.yml b/.github/workflows/auto-comment-pr.yml new file mode 100644 index 0000000..07fa6c4 --- /dev/null +++ b/.github/workflows/auto-comment-pr.yml @@ -0,0 +1,38 @@ +name: 'Auto Comment on PR Merge' + +on: + pull_request_target: + types: [closed] + +permissions: + pull-requests: write + +jobs: + auto_comment: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + + steps: + - uses: actions/checkout@v3 + + - name: Create Success Comment + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const message = `### 🎉 Congratulations on Your Merged PR! + + Thank you @${context.payload.pull_request.user.login} for your contribution! + + #### What's Next? + - 🌟 Consider contributing to other issues + - 📚 Check our [Contributing Guidelines](CONTRIBUTING.md) for more ways to help + + Keep up the fantastic work! 🚀`; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: message + }); \ No newline at end of file diff --git a/.github/workflows/greetings.yaml b/.github/workflows/greetings.yml similarity index 68% rename from .github/workflows/greetings.yaml rename to .github/workflows/greetings.yml index 354f8bc..fe89b20 100644 --- a/.github/workflows/greetings.yaml +++ b/.github/workflows/greetings.yml @@ -1,4 +1,4 @@ -name: Welcome to Our Community! 🎉 +name: '👋 Welcome' on: fork: @@ -12,30 +12,36 @@ on: jobs: welcome: runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write steps: - - uses: actions/first-interaction@v1 + - uses: actions/checkout@v3 + + - name: Greet New Contributors + uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} issue-message: | - ### Hello @${{ github.actor }}! 👋 - - Thank you for opening your first issue in our project! 🌟 - + ### Welcome @${{ github.actor }}! 🌟 + + Thank you for opening your first issue! We're excited to have you here. + A few quick things: - 📝 Please check if this issue has been reported before - ✅ Follow our issue template if provided - ⏳ We'll review your issue as soon as possible - + Need help? Check our [Contributing Guidelines](CONTRIBUTING.md) pr-message: | ### Amazing Work @${{ github.actor }}! 🎉 - - Thank you for your first contribution! We're thrilled to have you here! - + + Thank you for your first pull request! We're thrilled to have you here. + Helpful resources: - 📚 [Contributing Guidelines](CONTRIBUTING.md) - 🔧 [Development Setup](DEVELOPMENT.md) - ⭐ [Code of Conduct](CODE_OF_CONDUCT.md) - + We'll review your PR soon. Keep coding! 💻 \ No newline at end of file From ede812790433885ad898ac82624fc8b263c04c93 Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 08:22:35 +0530 Subject: [PATCH 12/17] auto-close-issue --- .github/workflows/autoCloseLinkedIssues.yml | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/autoCloseLinkedIssues.yml diff --git a/.github/workflows/autoCloseLinkedIssues.yml b/.github/workflows/autoCloseLinkedIssues.yml new file mode 100644 index 0000000..22b4a5d --- /dev/null +++ b/.github/workflows/autoCloseLinkedIssues.yml @@ -0,0 +1,48 @@ +name: 'Auto Close Linked Issues' + +on: + pull_request_target: + types: [closed] + branches: [main, master] + +jobs: + close-issues: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/checkout@v3 + + - name: Close Linked Issues + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const pr = context.payload.pull_request; + + // Get issue numbers from PR title/body + const issueNumbers = [ + ...pr.title.match(/#(\d+)/g) || [], + ...pr.body.match(/#(\d+)/g) || [] + ].map(num => Number(num.replace('#', ''))); + + // Process each linked issue + for (const issueNumber of issueNumbers) { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + state: 'closed' + }); + + // Add completion comment + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + body: `✅ This issue has been resolved in PR #${pr.number} by @${pr.user.login}` + }); + } \ No newline at end of file From 78546f5e5ec005e2c5b8145f20937e7bef691b29 Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 08:48:02 +0530 Subject: [PATCH 13/17] changes --- .github/ISSUE_TEMPLATE/Feature-Request.yaml | 2 +- .github/ISSUE_TEMPLATE/general_issues.yaml | 2 +- .github/workflows/auto-comment-pr.yml | 2 +- .github/workflows/autoCloseLinkedIssues.yml | 2 +- .github/workflows/greetings.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Feature-Request.yaml b/.github/ISSUE_TEMPLATE/Feature-Request.yaml index 2467a5b..e8f6261 100644 --- a/.github/ISSUE_TEMPLATE/Feature-Request.yaml +++ b/.github/ISSUE_TEMPLATE/Feature-Request.yaml @@ -61,7 +61,7 @@ body: options: - label: "I have searched [existing issues](https://github.com/Mujtabaa07/coffeeShop/issues) and this is not a duplicate" required: true - - label: "I have read the [Contributing Guidelines](CONTRIBUTING.md)" + - label: "I have read the [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md)" required: true - label: "I would like to implement this feature" required: false diff --git a/.github/ISSUE_TEMPLATE/general_issues.yaml b/.github/ISSUE_TEMPLATE/general_issues.yaml index 60de8ff..b949717 100644 --- a/.github/ISSUE_TEMPLATE/general_issues.yaml +++ b/.github/ISSUE_TEMPLATE/general_issues.yaml @@ -57,7 +57,7 @@ body: options: - label: "I have searched [existing issues](https://github.com/Mujtabaa07/coffeeShop/issues) to avoid duplicates" required: true - - label: "I have read the [Contributing Guidelines](CONTRIBUTING.md)" + - label: "I have read the [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md)" required: true - label: "I would like to help resolve this issue" required: false diff --git a/.github/workflows/auto-comment-pr.yml b/.github/workflows/auto-comment-pr.yml index 07fa6c4..e557f88 100644 --- a/.github/workflows/auto-comment-pr.yml +++ b/.github/workflows/auto-comment-pr.yml @@ -18,7 +18,7 @@ jobs: - name: Create Success Comment uses: actions/github-script@v6 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.COFFEE_SHOP_GITHUB_TOKEN }} script: | const message = `### 🎉 Congratulations on Your Merged PR! diff --git a/.github/workflows/autoCloseLinkedIssues.yml b/.github/workflows/autoCloseLinkedIssues.yml index 22b4a5d..d47c590 100644 --- a/.github/workflows/autoCloseLinkedIssues.yml +++ b/.github/workflows/autoCloseLinkedIssues.yml @@ -19,7 +19,7 @@ jobs: - name: Close Linked Issues uses: actions/github-script@v6 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.COFFEE_SHOP_GITHUB_TOKEN }} script: | const pr = context.payload.pull_request; diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index fe89b20..66e15e2 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -21,7 +21,7 @@ jobs: - name: Greet New Contributors uses: actions/first-interaction@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.COFFEE_SHOP_GITHUB_TOKEN }} issue-message: | ### Welcome @${{ github.actor }}! 🌟 From 9f862582400e89cd5db00e31b1085d8fab4d668e Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 08:53:45 +0530 Subject: [PATCH 14/17] changes --- .github/workflows/PRs.yaml | 3 ++- .github/workflows/auto-comment-pr.yml | 2 +- .github/workflows/greetings.yml | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/PRs.yaml b/.github/workflows/PRs.yaml index b8760d2..35be37f 100644 --- a/.github/workflows/PRs.yaml +++ b/.github/workflows/PRs.yaml @@ -31,7 +31,8 @@ jobs: 2. Address any requested changes 3. Once approved, your PR will be merged - Need help? Check our [Contributing Guide](CONTRIBUTING.md) + Need help? Check our [Contributing Guide](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md) + Happy coding! 💻` }) \ No newline at end of file diff --git a/.github/workflows/auto-comment-pr.yml b/.github/workflows/auto-comment-pr.yml index e557f88..52bda15 100644 --- a/.github/workflows/auto-comment-pr.yml +++ b/.github/workflows/auto-comment-pr.yml @@ -26,7 +26,7 @@ jobs: #### What's Next? - 🌟 Consider contributing to other issues - - 📚 Check our [Contributing Guidelines](CONTRIBUTING.md) for more ways to help + - 📚 Check our [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md) for more ways to help Keep up the fantastic work! 🚀`; diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 66e15e2..53b8ff1 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -32,7 +32,7 @@ jobs: - ✅ Follow our issue template if provided - ⏳ We'll review your issue as soon as possible - Need help? Check our [Contributing Guidelines](CONTRIBUTING.md) + Need help? Check our [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md) pr-message: | ### Amazing Work @${{ github.actor }}! 🎉 @@ -40,8 +40,7 @@ jobs: Thank you for your first pull request! We're thrilled to have you here. Helpful resources: - - 📚 [Contributing Guidelines](CONTRIBUTING.md) - - 🔧 [Development Setup](DEVELOPMENT.md) - - ⭐ [Code of Conduct](CODE_OF_CONDUCT.md) + - 📚 [Contributing Guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md) + - ⭐ [Code of Conduct](https://github.com/Mujtabaa07/coffeeShop/blob/main/CODE_OF_CONDUCT.md) We'll review your PR soon. Keep coding! 💻 \ No newline at end of file From e41c8e7fafeac7dbecb25f94a6a08217d133dc7f Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 09:05:40 +0530 Subject: [PATCH 15/17] welcome_git --- .github/workflows/welcome.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/welcome.yml diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml new file mode 100644 index 0000000..923e4cc --- /dev/null +++ b/.github/workflows/welcome.yml @@ -0,0 +1,21 @@ +name: Welcome New Contributors + +on: + issues: + types: [opened] + pull_request_target: + types: [opened] + +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: EddieHubCommunity/gh-action-community/src/welcome@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + Congratulations! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work! + pr-message: | + Great job! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project. + footer: | + We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our [contributing guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md) \ No newline at end of file From 33cfaa340f427247062504ba1d89c925595b3818 Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 09:08:13 +0530 Subject: [PATCH 16/17] added-token --- .github/workflows/welcome.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 923e4cc..8331c77 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: EddieHubCommunity/gh-action-community/src/welcome@main with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.COFFEE_SHOP_GITHUB_TOKEN }} issue-message: | Congratulations! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work! pr-message: | From 60d715d2106a9a4ed346d20fef6768362fdcd9de Mon Sep 17 00:00:00 2001 From: Mohamed Mujtaba Date: Thu, 2 Jan 2025 09:12:54 +0530 Subject: [PATCH 17/17] changes --- .github/workflows/welcome.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 8331c77..65cbe68 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -10,12 +10,10 @@ jobs: welcome: runs-on: ubuntu-latest steps: - - uses: EddieHubCommunity/gh-action-community/src/welcome@main + - uses: actions/first-interaction@v1 with: - github-token: ${{ secrets.COFFEE_SHOP_GITHUB_TOKEN }} + repo-token: ${{ secrets.COFFEE_SHOP_GITHUB_TOKEN }} issue-message: | Congratulations! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work! pr-message: | Great job! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project. - footer: | - We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our [contributing guidelines](https://github.com/Mujtabaa07/coffeeShop/blob/main/CONTRIBUTING.md) \ No newline at end of file