Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@razzasid
Copy link
Contributor

@razzasid razzasid commented Aug 8, 2025

Redesigned the GitHub login page with improved UI styling and layout, replacing the previous basic static version for a more polished and user-friendly look.

--- before ---
Screenshot 2025-08-08 162555

--- after ---
Screenshot 2025-08-08 162620

Summary by CodeRabbit

  • New Features
    • New account layout providing a centered, responsive card container for account-related pages.
    • Introduced a dedicated "Connect with GitHub" login page with localized copy, a prominent "Continue with GitHub" button, and a cancel option to return to the standard login.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds two new Django templates: website/templates/account/base.html (a centered account card layout exposing an account_content block) and website/templates/socialaccount/login.html (extends the account base and implements a localized, CSRF-protected GitHub connect form with styling, SVG icon, and cancel link).

Changes

Cohort / File(s) Change Summary
Account base template
website/templates/account/base.html
New base template that extends the site layout and defines a centered, responsive card container exposing account_content.
Social account login
website/templates/socialaccount/login.html
New template extending the account base providing a localized GitHub connect page: header, subtitle, SVG icon, CSRF POST form with "Continue with GitHub" button and a "Cancel" link.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant Django as Django App
    participant Social as SocialAuth View
    participant GitHub

    rect rgb(240,248,255)
    User->>Browser: Open "Connect GitHub" page
    Browser->>Django: GET /socialaccount/login/ (renders template)
    Django-->>Browser: HTML (socialaccount/login.html)
    end

    rect rgb(245,255,240)
    Browser->>Django: POST /socialaccount/login/ (form submit, CSRF token)
    Django->>Social: Hand off to social auth flow
    Social->>GitHub: Redirect to GitHub OAuth
    GitHub-->>Social: OAuth callback
    Social-->>Django: Authenticate / link account
    Django-->>Browser: Redirect to next page / show status
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review accessibility (button labels, focus states, color contrast).
  • Verify i18n usage and translation strings are correct.
  • Confirm CSRF token and form action integrate with the expected social auth view/URL.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Implement new GitHub login page" directly aligns with the primary changes in this pull request. The main deliverable is a new Django template for GitHub social account login (website/templates/socialaccount/login.html) with updated UI styling and layout. While a supporting base template (website/templates/account/base.html) is also added to provide the layout structure, the core objective is the GitHub login page implementation. The title is concise, clear, and specific enough that a team member reviewing the git history would immediately understand the primary change.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between ef94509 and 0d475f0.

📒 Files selected for processing (2)
  • website/templates/account/base.html (1 hunks)
  • website/templates/socialaccount/login.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • website/templates/socialaccount/login.html
  • website/templates/account/base.html

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@razzasid razzasid force-pushed the fix/github-login-ui branch from 951f386 to b683d8e Compare August 8, 2025 11:07
Copy link
Contributor

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

Implements a new GitHub login page with modern UI design, replacing a basic static version. The redesign includes improved styling using Tailwind CSS, proper localization support, and a more polished user experience.

  • Added complete HTML template for GitHub social account login
  • Implemented responsive design with modern card-based layout
  • Integrated GitHub branding with SVG icon and proper color scheme

Comment on lines 13 to 14
<svg class="w-12 h-12 text-gray-800" viewBox="0 0 16 16" version="1.1">
<path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

The GitHub icon color should use the project's red color #e74c3c instead of text-gray-800 to maintain brand consistency throughout the login page.

Copilot uses AI. Check for mistakes.
@DonnieBLT
Copy link
Collaborator

@razzasid we would rather override the style in the allauth base template so it applies to all templates

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

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

Please override the one file base template in allauth so it applies to all allauth pages.

@github-project-automation github-project-automation bot moved this from Backlog to Ready in 📌 OWASP BLT Project Board Oct 2, 2025
@razzasid razzasid force-pushed the fix/github-login-ui branch from 5e9641b to ef94509 Compare October 25, 2025 05:43
@razzasid razzasid force-pushed the fix/github-login-ui branch from ef94509 to 0d475f0 Compare October 25, 2025 05:49
@razzasid
Copy link
Contributor Author

Hi @DonnieBLT I've implemented the styling feedback. The allauth base template (account/base.html) now contains the shared styling, and socialaccount/login.html has been updated to use it for consistent appearance across allauth pages.

@DonnieBLT DonnieBLT added the d15 label Nov 16, 2025
@github-actions github-actions bot added files-changed: 2 PR changes 2 files unresolved-conversations: 0 PR has 0 unresolved conversations labels Nov 16, 2025
@DonnieBLT DonnieBLT merged commit cda4fc7 into OWASP-BLT:main Nov 16, 2025
14 of 15 checks passed
@razzasid razzasid deleted the fix/github-login-ui branch November 16, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

files-changed: 2 PR changes 2 files unresolved-conversations: 0 PR has 0 unresolved conversations

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants