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

Captive portal experience like airplane #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luandro
Copy link
Contributor

@luandro luandro commented May 31, 2024

User description

Redirect user to default browser through the captive-portal


PR Type

Enhancement


Description

  • Updated the captive portal HTML to use a meta http-equiv tag for automatic redirection.
  • Changed the redirection URL to http://edt.local.
  • Improved the user message and link in the HTML body.
  • Removed the JavaScript-based redirection in favor of the meta tag.

Changes walkthrough 📝

Relevant files
Enhancement
start.sh
Update captive portal HTML for improved redirection           

services/wifi-connect/start.sh

  • Updated HTML content to use meta http-equiv tag for redirection.
  • Changed redirection URL to http://edt.local.
  • Updated the link text and URL in the body.
  • Removed JavaScript-based redirection.
  • +3/-7     

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

    @github-actions github-actions bot added the enhancement New feature or request label May 31, 2024
    Copy link

    PR Description updated to latest commit (6e8df90)

    Copy link

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are straightforward and limited to a single script file, involving simple HTML and meta tag modifications.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    Possible Bug: The meta http-equiv="refresh" tag might not work in all browsers or situations, especially if browser settings disable such redirections for security reasons.

    🔒 Security concerns

    No

    Code feedback:
    relevant fileservices/wifi-connect/start.sh
    suggestion      

    Consider adding a noscript tag to handle situations where JavaScript is disabled in the user's browser, ensuring that the user still receives a prompt or manual link to proceed. [important]

    relevant line

    Copy link

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Add a viewport meta tag to improve responsiveness on mobile devices

    Consider adding the viewport meta tag to ensure the captive portal page is responsive on
    mobile devices. This is particularly important for users accessing the portal through a
    mobile device.

    services/wifi-connect/start.sh [28]

     <meta charset="UTF-8">
    +<meta name="viewport" content="width=device-width, initial-scale=1">
     
    Suggestion importance[1-10]: 9

    Why: Adding a viewport meta tag is a significant enhancement for mobile responsiveness, which is crucial for user experience on mobile devices. This suggestion is contextually accurate and improves the new code introduced in the PR.

    9
    Maintainability
    Use a configuration variable for URLs to enhance maintainability

    Replace the direct URL in the meta refresh and anchor tag with a relative path or a
    configuration variable to enhance maintainability and flexibility of the portal URL
    management.

    services/wifi-connect/start.sh [30-33]

    -<meta http-equiv="refresh" content="0; url=http://edt.local">
    -<a href="http://edt.local">link to Earth Defenders Toolkit</a>
    +<meta http-equiv="refresh" content="0; url={{ portal_url }}">
    +<a href="{{ portal_url }}">link to Earth Defenders Toolkit</a>
     
    Suggestion importance[1-10]: 8

    Why: Using a configuration variable for URLs enhances maintainability and flexibility, making it easier to manage and update URLs in the future. This suggestion is relevant and improves the new code introduced in the PR.

    8
    Seo
    Add a meta description tag to improve SEO and provide context

    Ensure that the HTML document includes essential tags such as to
    enhance SEO and provide better context about the page.

    services/wifi-connect/start.sh [28]

     <meta charset="UTF-8">
    +<meta name="description" content="Captive portal page for Earth Defenders Toolkit.">
     
    Suggestion importance[1-10]: 7

    Why: Adding a meta description tag is a good practice for SEO and provides better context about the page. This suggestion is contextually accurate and improves the new code introduced in the PR.

    7

    @digidem digidem deleted a comment from github-actions bot May 31, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant