Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web): Add and link privacy and tnc page #226

Merged
merged 2 commits into from
May 19, 2024
Merged

feat(web): Add and link privacy and tnc page #226

merged 2 commits into from
May 19, 2024

Conversation

kriptonian1
Copy link
Contributor

@kriptonian1 kriptonian1 commented May 18, 2024

User description

Description

Give a summary of the change that you have made

Fixes #[ISSUENO]

Dependencies

Mention any dependencies/packages used

Future Improvements

Mention any improvements to be done in future related to any file/feature

Mentions

Mention and tag the people

Screenshots of relevant screens

Add screenshots of relevant screens

Developer's checklist

  • My PR follows the style guidelines of this project
  • I have performed a self-check on my work

If changes are made in the code:

  • I have followed the coding guidelines
  • My changes in code generate no new warnings
  • My changes are breaking another fix/feature of the project
  • I have added test cases to show that my feature works
  • I have added relevant screenshots in my PR
  • There are no UI/UX issues

Documentation Update

  • This PR requires an update to the documentation at docs.keyshade.xyz
  • I have made the necessary updates to the documentation, or no documentation changes are required.

PR Type

enhancement


Description

  • Added custom MDX components for styled HTML tags in MDX files.
  • Updated footer links to point to newly added legal pages (Terms and Conditions, Privacy Policy).
  • Created a layout component for MDX pages to standardize page structure.
  • Introduced new MDX content for Terms and Conditions and Privacy Policy.
  • Configured MDX support in the Next.js configuration to handle MDX files.
  • Added necessary MDX dependencies in package.json.

Changes walkthrough 📝

Relevant files
Enhancement
mdx-components.tsx
Add Custom MDX Components with Styled HTML Tags                   

apps/web/src/mdx-components.tsx

  • Added custom MDX components for various HTML tags with specific
    styles.
  • +29/-0   
    index.tsx
    Update Footer Links to New Legal Pages                                     

    apps/web/src/components/shared/footer/index.tsx

  • Modified footer links to point to the new terms and conditions and
    privacy policy pages.
  • +10/-4   
    layout.tsx
    Create Layout Component for MDX Pages                                       

    apps/web/src/app/(main)/(mdx)/layout.tsx

    • Created a new layout component for MDX pages.
    +12/-0   
    Bug fix
    index.tsx
    Syntax Correction in CardProps Interface                                 

    apps/web/src/components/shared/card/index.tsx

    • Minor syntax correction in CardProps interface.
    +1/-1     
    Documentation
    page.mdx
    Add Terms and Conditions MDX Content                                         

    apps/web/src/app/(main)/(mdx)/terms_and_condition/page.mdx

  • Added a new MDX file for terms and conditions with detailed legal
    information.
  • +299/-0 
    page.mdx
    Add Privacy Policy MDX Content                                                     

    apps/web/src/app/(main)/(mdx)/privacy/page.mdx

  • Added a new MDX file for privacy policy with detailed information on
    data handling.
  • +113/-0 
    Configuration changes
    next.config.mjs
    Configure MDX Support in Next.js                                                 

    apps/web/next.config.mjs

  • Configured MDX support in Next.js configuration.
  • Added page extensions for MDX and TypeScript files.
  • +12/-2   
    Dependencies
    package.json
    Add MDX Dependencies in package.json                                         

    apps/web/package.json

    • Added dependencies for MDX support.
    +4/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Contributor

    PR Description updated to latest commit (a8d3b93)

    Copy link

    sonarcloud bot commented May 18, 2024

    Quality Gate Passed Quality Gate passed

    Issues
    1 New issue
    0 Accepted issues

    Measures
    0 Security Hotspots
    No data about Coverage
    0.0% Duplication on New Code

    See analysis details on SonarCloud

    Copy link
    Contributor

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    3, because the PR involves multiple files and significant changes including the addition of new components, MDX content, and configuration changes. The complexity is moderate with the introduction of new dependencies and potential implications on existing functionalities.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    Possible Bug: The use of EncryptText in the footer links without a corresponding import or definition in the provided diff could lead to runtime errors if not defined elsewhere.

    Styling Consistency: The styling applied to MDX components uses hard-coded values which might not be consistent with the rest of the application's theme management.

    🔒 Security concerns

    No

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Performance
    Improve rendering performance by using React.memo

    Consider using React.memo for the component definitions within useMDXComponents to avoid
    unnecessary re-renders. This is particularly beneficial for components that are expected
    to receive the same props in typical use cases, improving performance.

    apps/web/src/mdx-components.tsx [6-8]

    -h1: ({ children }) => (
    +h1: React.memo(({ children }) => (
       <h1 className="text-brandBlue my-8 text-2xl md:text-3xl">{children}</h1>
    -),
    +)),
     
    Suggestion importance[1-10]: 7

    Why: Using React.memo for static components can prevent unnecessary re-renders, enhancing performance. The suggestion correctly identifies a performance improvement opportunity in the new code.

    7
    Maintainability
    Reduce redundancy and ease future modifications by using a constant for repeated className strings

    Extract the repeated className string into a constant to avoid redundancy and facilitate
    easier future modifications.

    apps/web/src/components/shared/footer/index.tsx [95-101]

    -className="text-white/60 transition-colors hover:text-white"
    +const linkClassName = "text-white/60 transition-colors hover:text-white";
    +className={linkClassName}
     
    Suggestion importance[1-10]: 6

    Why: Extracting repeated className strings into a constant is a good practice for maintainability and ease of future changes. The suggestion is relevant and correctly applied to the new code.

    6
    Enhancement
    Improve layout adaptability by using a more responsive unit for margins

    Use a more responsive unit than vw for top margin to improve the layout's adaptability
    across different screen sizes.

    apps/web/src/app/(main)/(mdx)/layout.tsx [9]

    -<div className="mt-[10vw] px-8 md:w-[60vw]">{children}</div>
    +<div className="mt-10 px-8 md:w-[60vw]">{children}</div>
     
    Suggestion importance[1-10]: 5

    Why: The suggestion to use a more responsive unit than 'vw' for margins is valid for improving adaptability. However, the impact on the overall layout might not be significant, hence the moderate score.

    5

    @kriptonian1 kriptonian1 enabled auto-merge (squash) May 19, 2024 04:45
    @kriptonian1 kriptonian1 removed the request for review from rajdip-b May 19, 2024 04:45
    @rajdip-b rajdip-b changed the title feat(web): add and link privacy and tnc page feat(web): Add and link privacy and tnc page May 19, 2024
    @kriptonian1 kriptonian1 merged commit ec81eb9 into develop May 19, 2024
    9 checks passed
    @rajdip-b rajdip-b deleted the tnc-page branch May 19, 2024 05:47
    rajdip-b pushed a commit that referenced this pull request May 24, 2024
    ## [1.4.0](v1.3.0...v1.4.0) (2024-05-24)
    
    ### 🚀 Features
    
    * add example for health and email auth ([b834d25](b834d25))
    * **api:** Add `minio-client` provider ([#237](#237)) ([cd71c5a](cd71c5a))
    * **api:** Add feature to fork projects ([#239](#239)) ([3bab653](3bab653))
    * **api:** Added feedback form module ([#210](#210)) ([ae1efd8](ae1efd8))
    * **api:** Added Project Level Access  ([#221](#221)) ([564f5ed](564f5ed))
    * **api:** Added support for changing email of users ([#233](#233)) ([5ea9a10](5ea9a10))
    * implemented auth, ui for most, and fixed cors ([#217](#217)) ([feace86](feace86))
    * **platfrom:** add delete method in api client ([#225](#225)) ([55cf09f](55cf09f))
    * **postman:** add example for get_self and update_self ([e015acf](e015acf))
    * **web:** Add and link privacy and tnc page ([#226](#226)) ([ec81eb9](ec81eb9))
    
    ### 🐛 Bug Fixes
    
    * **web:** docker next config not found ([#228](#228)) ([afe3160](afe3160))
    
    ### 📚 Documentation
    
    * Added docs regarding postman, and refactored architecture diagrams ([f1c9777](f1c9777))
    * Fix typo in organization-of-code.md ([#234](#234)) ([11244a2](11244a2))
    
    ### 🔧 Miscellaneous Chores
    
    * **api:** Get feedback forward email from process.env ([#236](#236)) ([204c9d1](204c9d1))
    * **postman:** Initialized postman ([bb76384](bb76384))
    * **release:** Update changelog config ([af91283](af91283))
    * Remove swagger docs ([#220](#220)) ([7640299](7640299))
    
    ### 🔨 Code Refactoring
    
    * **api:** Replaced OTP code from alphanumeric to numeric ([#230](#230)) ([f16162a](f16162a))
    @rajdip-b
    Copy link
    Member

    🎉 This PR is included in version 1.4.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    Successfully merging this pull request may close these issues.

    2 participants