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

Updated terms and policy #2232

Merged
merged 2 commits into from
Nov 14, 2024
Merged

Updated terms and policy #2232

merged 2 commits into from
Nov 14, 2024

Conversation

OchiengPaul442
Copy link
Contributor

@OchiengPaul442 OchiengPaul442 commented Nov 14, 2024

Summary of Changes (What does this PR do?)

  • Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Status of maturity (all need to be checked before merging):

  • I've tested this locally
  • I consider this code done
  • This change ready to hit production in its current state
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included issue number in the "Closes #ISSUE-NUMBER" part of the "What are the relevant tickets?" section to link the issue.
  • I've updated corresponding documentation for the changes in this PR.
  • I have written unit and/or e2e tests for my change(s).

How should this be manually tested?

  • Please include the steps to be done inorder to setup and test this PR.

What are the relevant tickets?

Screenshots (optional)

image
image

Summary by CodeRabbit

  • New Features

    • Updated the "Privacy Policy" to clarify the name "AirQo" as "AirQo Research" and enhance text emphasis.
    • Revised the "Terms of Service" introduction for improved clarity and user engagement, while retaining the existing ordered list structure.
  • Bug Fixes

    • No bug fixes were included in this release.
  • Documentation

    • Enhanced clarity and presentation of legal documents for better user understanding.

Copy link

coderabbitai bot commented Nov 14, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request involve updates to the content of two legal documents: the Privacy Policy and Terms of Service. The PrivacyPolicy.js file has modifications to the text in the "Introduction" and "Information we collect and how we use it" sections, emphasizing the name "AirQo" with strong HTML tags. The TermsOfService.js file features a new introductory paragraph that enhances clarity, followed by an ordered list that remains unchanged. Overall, the functionality of both components is preserved.

Changes

File Path Change Summary
website/frontend/src/pages/Legal/PrivacyPolicy.js Updated text in "Introduction" and "Information we collect and how we use it" sections, emphasizing "AirQo" with strong HTML tags.
website/frontend/src/pages/Legal/TermsOfService.js Replaced the ordered list in the "Introduction" section with a new introductory paragraph for clarity, while retaining the list structure.

Possibly related PRs

Suggested labels

ready for review

Suggested reviewers

  • Baalmart

In the realm of legal text,
Clarity shines, it’s the best!
With "AirQo" bold and bright,
Terms and policies now feel right.
A paragraph here, a list in place,
Navigating laws with style and grace! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between eed3eb7 and 2ccc999.

📒 Files selected for processing (1)
  • website/frontend/src/pages/Legal/TermsOfService.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/frontend/src/pages/Legal/TermsOfService.js

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b0ddd8f) to head (2ccc999).
Report is 299 commits behind head on staging.

Additional details and impacted files
@@            Coverage Diff            @@
##           staging     #2232   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            5         5           
  Branches         2         2           
=========================================
  Hits             5         5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (5)
website/frontend/src/pages/Legal/PrivacyPolicy.js (3)

40-44: Ensure consistent company name references throughout the document

While the introduction now properly establishes "AirQo Research" and its shortened form "AirQo", we should maintain this consistency throughout the document. Consider updating all subsequent mentions of AirQo to use the <strong> tags for visual consistency.


64-65: Consider enhancing data protection clarity

While the commitment to responsible data use is stated, consider adding specific references to applicable data protection regulations (e.g., GDPR if relevant) and more detailed information about data protection measures. This would strengthen user trust and legal compliance.


Line range hint 258-260: Consider making the last update date dynamic

The last update date is currently hardcoded. Consider making this dynamic by:

  1. Moving it to a configuration file
  2. Using an environment variable
  3. Implementing an automated update mechanism tied to content changes

This would ensure the date stays current with policy updates.

-              <p>
-                <strong>This Privacy Policy was last updated on Nov 22, 2022</strong>
-              </p>
+              <p>
+                <strong>This Privacy Policy was last updated on {process.env.REACT_APP_PRIVACY_POLICY_LAST_UPDATE || 'Nov 22, 2022'}</strong>
+              </p>
website/frontend/src/pages/Legal/TermsOfService.js (2)

38-65: Consider enhancing accessibility of the introduction section

The content structure looks good, and I appreciate the clear welcome message. However, we could improve accessibility for screen readers.

Consider these enhancements:

 <>
   <p>
-    Welcome to <strong>AirQo Research</strong> ("AirQo"). By accessing or using our
+    Welcome to <strong aria-label="AirQo Research">AirQo Research</strong> ("AirQo"). By accessing or using our
     platform, you agree to adhere to and be bound by these Terms of Service. If you do not
     agree with these terms, please refrain from using our platform.
   </p>
-  <ol>
+  <ol aria-label="Key terms and conditions">
     <li>
       Some cities already have programs for air quality monitoring, so we collaborate with

Line range hint 32-65: Consider debouncing the scroll event handler

The scroll event handler implementation is correct, but scroll events can fire frequently and impact performance. Consider implementing debouncing to optimize performance.

Here's how you could enhance the scroll handler:

+import { debounce } from 'lodash';
+
 const TermsOfService = () => {
   const [activeSection, setActiveSection] = useState('intro');
 
   useEffect(() => {
-    const handleScroll = () => {
+    const handleScroll = debounce(() => {
       if (!sections || sections.length === 0) return;
 
       const sectionElements = sections
         .map((section) => document.getElementById(section.id))
         .filter((element) => element !== null);
 
       if (sectionElements.length === 0) return;
 
       const currentSection = sectionElements.find((element) => {
         const rect = element.getBoundingClientRect();
         return rect.top <= 100 && rect.bottom > 100;
       });
 
       if (currentSection && currentSection.id !== activeSection) {
         setActiveSection(currentSection.id);
       }
-    };
+    }, 100);
 
     window.addEventListener('scroll', handleScroll);
 
     return () => {
       window.removeEventListener('scroll', handleScroll);
+      handleScroll.cancel();
     };
   }, [sections, activeSection]);

Also applies to: 441-467

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e034347 and eed3eb7.

📒 Files selected for processing (2)
  • website/frontend/src/pages/Legal/PrivacyPolicy.js (2 hunks)
  • website/frontend/src/pages/Legal/TermsOfService.js (1 hunks)

Copy link
Contributor

New Website changes available for preview here

Copy link
Contributor

New Website changes available for preview here

@Baalmart Baalmart merged commit f2e51bc into staging Nov 14, 2024
31 checks passed
@Baalmart Baalmart deleted the website-update-TOS branch November 14, 2024 16:51
@Baalmart Baalmart mentioned this pull request Nov 14, 2024
1 task
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