Skip to content

Story 2412: Sign Up Page Integration#2482

Open
jlchilders11 wants to merge 10 commits into
developfrom
jc/webpage-integration-sign-up
Open

Story 2412: Sign Up Page Integration#2482
jlchilders11 wants to merge 10 commits into
developfrom
jc/webpage-integration-sign-up

Conversation

@jlchilders11

@jlchilders11 jlchilders11 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Issue: #2412

Summary & Context

Integrates the existing sign up flow with v3 design.

Changes

  • Moves V3 signup design to live sign up link, with a flag protection
  • Dynamically loads Oauth sign ups based on available oauth in the v3 design, to match existing functionality.

‼️ Risks & Considerations ‼️

Please list any potential risks or areas that need extra attention during review/testing

TESTING CONSIDERATIONS: When testing, the V3 flag must be set to "Everyone: Yes" in the admin, since the sign up page does not check the users flag. Additionally, Oauth only populates on the sing up page if the keys are set for local development. Contact @jlchilders11 for these keys if needed during testing. Finally, the Oauth workflow can only be completed on a live site, such as staging.

Additionally, the Email Sent and Email Confirmed designs are still based on V2. An additional ticket is being created to address this UI requirement.

Screenshots

Full Sign Up
image

Sign Up without Oauth Set:
image

Current Confirmation Sent Page:
image

Current Confirm Email Page:
image

New Sign up:
image

Error State:
image

Terms Accepted:
image

Self-review Checklist

  • Link this PR to the related GitHub Project ticket

Summary by CodeRabbit

  • New Features

    • Signup now requires an "Accept Terms of Use" checkbox; social buttons remain disabled until accepted. Social login buttons render dynamically per available provider.
  • Style

    • Improved auth page spacing, signup divider and sign-in link styling, checkbox link underline, and clearer disabled/error visuals for signup social options.
  • Refactor

    • v3 auth/signup pages consolidated under a unified handling; legacy v3 signup route/view removed.

@jlchilders11 jlchilders11 linked an issue Jun 5, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR centralizes V3 auth-page context into a mixin, requires terms-of-use on signup, refactors the signup template to render social providers dynamically, updates CSS to disable social actions until ToU is accepted, and removes the old V3 signup URL.

Changes

V3 Signup Refactoring

Layer / File(s) Summary
V3 auth context mixin foundation
core/mixins.py
Adds V3AuthContextMixin, tightens V3Mixin.dispatch to route v3 rendering via TemplateView dispatch, and supplies shared auth-page context (page title, images, auth route URLs).
CustomSignupView V3 integration
users/views.py
CustomSignupView now includes V3AuthContextMixin, sets v3_template_name, conditionally returns CustomSignUpForm when v3 is active, injects password_rules into v3 context, updates imports, and removes the local V3SignupView.
Signup form with terms acceptance field
users/forms.py
Adds CustomSignUpForm subclassing allauth.account.forms.SignupForm with required accept_terms_of_use boolean field.
Signup template refactor with terms checkbox and dynamic providers
templates/v3/accounts/signup.html
Wraps content in auth block, sets form id, adds required ToU checkbox linking to terms-of-use, replaces hardcoded social buttons with a provider loop using get_providers/provider_login_url, and moves the sign-in link after the form.
CSS for terms acceptance state management
static/css/v3/auth-page.css, static/css/v3/forms.css
Adds sign-in link and divider styles, underlines links in checkbox labels, and implements state-driven styles that dim/disable social buttons and show error visuals when ToU is not accepted or invisible-check protection is active.
V3 context propagation in views
ak/views.py, core/views.py, libraries/views.py, news/views.py, versions/views.py
Multiple views now initialize V3 context from super().get_v3_context_data(...), pass explicit querysets/object_list where needed, and remove custom render_v3_response logic in list views.
URL routing cleanup
config/v3_urls.py
Removes the /v3/accounts/signup/ route and the V3SignupView import from v3 URL patterns.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

A rabbit hops through signup flows,
Terms ticked, the pathway grows,
Mixins share the context bright,
Providers line up, buttons light,
Routes trimmed, the page takes flight. 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'Story 2412: Sign Up Page Integration' directly describes the main objective—integrating the sign-up flow with v3 design—which matches the core changes across multiple files.
Description check ✅ Passed The PR description includes the issue number, summary, Figma link, test page link, changes summary, testing considerations with specific flag/OAuth requirements, and comprehensive screenshots demonstrating the new UI states.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jc/webpage-integration-sign-up

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
users/views.py (1)

551-565: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't hard-gate the live signup view with V3AuthContextMixin.

Because this mixin returns 404 when the v3 flag is off, /accounts/signup/ no longer falls back to the legacy signup flow at all. That conflicts with the PR goal of swapping designs behind the flag on the existing route. Use a non-gating mixin here, or make the 404 behavior opt-in for V3-only pages.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@users/views.py` around lines 551 - 565, The class CustomSignupView must not
inherit V3AuthContextMixin because that mixin currently returns 404 when the v3
flag is off and thereby blocks the legacy signup route; remove
V3AuthContextMixin from the inheritance list on CustomSignupView and instead
apply its behavior conditionally: keep ClaimExistingAccountMixin and SignupView
in the bases, and override get_context_data (or dispatch) to call
V3AuthContextMixin.get_context_data(self, **kwargs) only when
flag_is_active(self.request, "v3") is true so the view falls back to the legacy
flow when the flag is off; reference the class name CustomSignupView and the
mixin V3AuthContextMixin when making this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@core/mixins.py`:
- Around line 25-33: The dispatch method currently clears self._v3_active for
any non-GET, causing POSTs that re-render to lose the v3 template; update
dispatch so self._v3_active is set to True whenever self.v3_template_name and
flag_is_active(request, "v3") (regardless of request.method), and only return
self.render_v3_response immediately on GET; remove the unconditional
self._v3_active = False so the flag remains True for POST re-renders (symbols:
dispatch, _v3_active, v3_template_name, flag_is_active, render_v3_response,
request.method).
- Around line 91-93: The reverse_lazy call in core/mixins.py sets
context["signup_url"] = reverse_lazy("v3-signup") but config/v3_urls.py does not
define a pattern named "v3-signup", causing a possible NoReverseMatch; fix by
either updating the mixin to use the actual route name defined in
config/v3_urls.py (replace "v3-signup" with the real name used there) or
add/restore a URL pattern in config/v3_urls.py with name="v3-signup" that points
to the signup view so reverse_lazy("v3-signup") resolves correctly; locate the
assignment to context["signup_url"] in the mixin to apply the change or add the
named URL pattern in config/v3_urls.py.

In `@static/css/v3/auth-page.css`:
- Around line 188-191: The CSS selector never matches because the template uses
inputs with class .auth-page__invisible-check (no name) for social checkboxes;
update the rule to target that class instead of input[name="checkbox-GitHub"].
Specifically, change the :has(...) portion to look for
.auth-page__invisible-check:checked (e.g.
.auth-page__signup-form:not(:has(input[name="accept_terms_of_use"]:checked)):has(.auth-page__invisible-check:checked)
input[name="accept_terms_of_use"]) so the TOU highlight applies when the social
checkbox is checked.
- Line 200: Replace the deprecated CSS property clip: rect(0, 0, 0, 0) used for
visually-hidden inputs with the modern equivalent clip-path: inset(50%) in the
selectors that implement the visually-hidden pattern (e.g.,
.auth-page__invisible-check and .checkbox__input); locate those selectors and
swap the clip declaration for clip-path: inset(50%) (keeping the rest of the
visually-hidden rules intact such as position, width/height, overflow,
white-space, and border: 0).

In `@templates/v3/accounts/signup.html`:
- Around line 57-70: Render the server-side validation errors for the checkbox
field named "accept_terms_of_use" and correct the label copy to "Terms of Use":
update the template around the input with id "checkbox-accept_terms_of_use" to
output the field's errors (e.g., render {{ form.accept_terms_of_use.errors }} or
use the form field's non_field_errors helper) and associate them with the input
(add an error container and aria-describedby if needed), and change the link
text inside the span with class "checkbox__label" from "Term of Use" to "Terms
of Use".
- Line 30: Replace the hardcoded form action and links that point to
"/accounts/signup/" with Django URL reversal using the named URL account_signup;
update the form tag in templates/v3/accounts/signup.html to use {% url
'account_signup' %} for the action and likewise replace any <a
href="/accounts/signup/"> occurrences (for example in
templates/users/includes/user_join.html) with {% url 'account_signup' %} so
paths follow the named route and respect any URL prefix changes.

---

Outside diff comments:
In `@users/views.py`:
- Around line 551-565: The class CustomSignupView must not inherit
V3AuthContextMixin because that mixin currently returns 404 when the v3 flag is
off and thereby blocks the legacy signup route; remove V3AuthContextMixin from
the inheritance list on CustomSignupView and instead apply its behavior
conditionally: keep ClaimExistingAccountMixin and SignupView in the bases, and
override get_context_data (or dispatch) to call
V3AuthContextMixin.get_context_data(self, **kwargs) only when
flag_is_active(self.request, "v3") is true so the view falls back to the legacy
flow when the flag is off; reference the class name CustomSignupView and the
mixin V3AuthContextMixin when making this change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d996dd4-cad4-4073-87f7-372795a19ae2

📥 Commits

Reviewing files that changed from the base of the PR and between 00a8e72 and aa2b119.

📒 Files selected for processing (7)
  • config/v3_urls.py
  • core/mixins.py
  • static/css/v3/auth-page.css
  • static/css/v3/forms.css
  • templates/v3/accounts/signup.html
  • users/forms.py
  • users/views.py
💤 Files with no reviewable changes (1)
  • config/v3_urls.py

Comment thread core/mixins.py
Comment thread core/mixins.py
Comment thread static/css/v3/auth-page.css Outdated
Comment thread static/css/v3/auth-page.css Outdated
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify deprecated clip usage locations in v3 CSS.
rg -n 'clip:\s*rect\(' static/css/v3/auth-page.css static/css/v3/forms.css

Repository: boostorg/website-v2

Length of output: 175


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '180,215p' static/css/v3/auth-page.css
echo '---'
sed -n '565,620p' static/css/v3/forms.css

Repository: boostorg/website-v2

Length of output: 2188


Replace deprecated clip in visually-hidden inputs.

clip: rect(0, 0, 0, 0); is used for visually-hidden elements in static/css/v3/auth-page.css (.auth-page__invisible-check, ~200) and static/css/v3/forms.css (.checkbox__input, ~593). Replace it with clip-path: inset(50%) to satisfy stylelint and modernize the pattern.

Suggested fix
-  clip: rect(0, 0, 0, 0);
+  clip-path: inset(50%);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
🧰 Tools
🪛 Stylelint (17.12.0)

[error] 200-200: Deprecated property "clip" (property-no-deprecated)

(property-no-deprecated)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@static/css/v3/auth-page.css` at line 200, Replace the deprecated CSS property
clip: rect(0, 0, 0, 0) used for visually-hidden inputs with the modern
equivalent clip-path: inset(50%) in the selectors that implement the
visually-hidden pattern (e.g., .auth-page__invisible-check and
.checkbox__input); locate those selectors and swap the clip declaration for
clip-path: inset(50%) (keeping the rest of the visually-hidden rules intact such
as position, width/height, overflow, white-space, and border: 0).

Source: Linters/SAST tools

Comment thread templates/v3/accounts/signup.html Outdated
id="signup_form"
method="post"
action=""
action="/accounts/signup/"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the project has a named signup URL and detect hardcoded signup actions.
fd -i 'urls.py' | xargs rg -n "account_signup|accounts/signup|name=['\"]account_signup['\"]"
rg -n 'action="/accounts/signup/"' templates

Repository: boostorg/website-v2

Length of output: 521


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect surrounding lines in the template
echo "---- templates/v3/accounts/signup.html:25-40 ----"
nl -ba templates/v3/accounts/signup.html | sed -n '25,45p'

# 2) Find all hardcoded signup action usages
echo "---- hardcoded action=\"/accounts/signup/\" in templates ----"
rg -n 'action="/accounts/signup/"' templates || true

# 3) Confirm how account_signup is defined and referenced
echo "---- definition of name=\"account_signup\" ----"
rg -n 'name="account_signup"' config/urls.py

echo "---- usages of account_signup (templates) ----"
rg -n "{%\s*url\s+['\"]account_signup['\"]\s*%}" -S templates || true

echo "---- usages of /accounts/signup/ in templates ----"
rg -n '/accounts/signup/' -S templates || true

# 4) Check tests expectations
echo "---- tests referencing account_signup ----"
rg -n 'account_signup|/accounts/signup/' users/tests/test_urls.py

Repository: boostorg/website-v2

Length of output: 174


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "---- templates/v3/accounts/signup.html:25-40 ----"
cat -n templates/v3/accounts/signup.html | sed -n '25,45p'

echo "---- hardcoded action=\"/accounts/signup/\" in templates ----"
rg -n 'action="/accounts/signup/"' templates || true

echo "---- definition of name=\"account_signup\" ----"
rg -n 'name="account_signup"' config/urls.py

echo "---- usages of account_signup via {% url %} (templates) ----"
rg -n "{%[[:space:]]*url[[:space:]]+['\"]account_signup['\"][[:space:]]*%}" -S templates || true

echo "---- usages of /accounts/signup/ (templates) ----"
rg -n '/accounts/signup/' -S templates || true

echo "---- tests referencing account_signup and /accounts/signup/ ----"
rg -n 'account_signup|/accounts/signup/' users/tests/test_urls.py

Repository: boostorg/website-v2

Length of output: 1987


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "---- config/urls.py:120-160 ----"
sed -n '120,160p' config/urls.py | cat -n

echo "---- any existing {% url 'account_signup' %} usage in templates ----"
rg -n "{%\s*url\s+['\"]account_signup['\"]\s*%}" -S templates || true

echo "---- any existing {% url account_signup %} usage (non-quoted) in templates ----"
rg -n "{%\s*url\s+account_signup\s*%}" -S templates || true

echo "---- all hardcoded /accounts/signup/ occurrences in templates ----"
rg -n '/accounts/signup/' templates

Repository: boostorg/website-v2

Length of output: 2569


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "---- templates/users/includes/user_join.html ----"
cat -n templates/users/includes/user_join.html | sed -n '1,80p'

echo "---- any 'account_signup' string in templates ----"
rg -n "account_signup" templates || true

echo "---- any url tag usage referencing account_* in templates ----"
rg -n "{%[[:space:]]*url" templates | head -n 50

echo "---- all hardcoded /accounts/signup/ occurrences in repo (limit to html/templates) ----"
rg -n '/accounts/signup/' templates

echo "---- all hardcoded /accounts/signup/ occurrences in entire repo (sanity) ----"
rg -n '/accounts/signup/' . | head -n 50

Repository: boostorg/website-v2

Length of output: 843


Use URL reversal for the signup form action (and remove hardcoded signup URLs)

templates/v3/accounts/signup.html hardcodes action="/accounts/signup/", but account_signup is a named URL; use {% url 'account_signup' %} to avoid path/prefix fragility.

Suggested fix
-    action="/accounts/signup/"
+    action="{% url 'account_signup' %}"

Also consider replacing the hardcoded <a href="/accounts/signup/"> in templates/users/includes/user_join.html with {% url 'account_signup' %}.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
action="/accounts/signup/"
action="{% url 'account_signup' %}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/v3/accounts/signup.html` at line 30, Replace the hardcoded form
action and links that point to "/accounts/signup/" with Django URL reversal
using the named URL account_signup; update the form tag in
templates/v3/accounts/signup.html to use {% url 'account_signup' %} for the
action and likewise replace any <a href="/accounts/signup/"> occurrences (for
example in templates/users/includes/user_join.html) with {% url 'account_signup'
%} so paths follow the named route and respect any URL prefix changes.

Comment thread templates/v3/accounts/signup.html Outdated
Comment on lines +57 to +70
<label class="checkbox" for="checkbox-accept_terms_of_use">
<input
class="checkbox__input"
type="checkbox"
id="checkbox-accept_terms_of_use"
name="accept_terms_of_use"
value="on"
required
>
<span class="checkbox__box" aria-hidden="true">
{% include "includes/icon.html" with icon_name="check" icon_class="checkbox__check" %}
</span>
<span class="checkbox__label">I have read and accepted the <a href="{% url 'terms-of-use' %}">Term of Use</a> for this service</span>
</label>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Render terms-field errors and fix the label copy.

The checkbox is validated server-side, but its error is not displayed in this template. Also, “Term of Use” should be “Terms of Use”.

Suggested fix
     <label class="checkbox" for="checkbox-accept_terms_of_use">
         <input
           class="checkbox__input"
           type="checkbox"
           id="checkbox-accept_terms_of_use"
           name="accept_terms_of_use"
           value="on"
+          {% if form.accept_terms_of_use.value %}checked{% endif %}
           required
         >
@@
-          <span class="checkbox__label">I have read and accepted the <a href="{% url 'terms-of-use' %}">Term of Use</a> for this service</span>
+          <span class="checkbox__label">I have read and accepted the <a href="{% url 'terms-of-use' %}">Terms of Use</a> for this service</span>
     </label>
+    {% if form.accept_terms_of_use.errors %}
+      {% for error in form.accept_terms_of_use.errors %}<p class="field__error" role="alert">{{ error }}</p>{% endfor %}
+    {% endif %}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/v3/accounts/signup.html` around lines 57 - 70, Render the
server-side validation errors for the checkbox field named "accept_terms_of_use"
and correct the label copy to "Terms of Use": update the template around the
input with id "checkbox-accept_terms_of_use" to output the field's errors (e.g.,
render {{ form.accept_terms_of_use.errors }} or use the form field's
non_field_errors helper) and associate them with the input (add an error
container and aria-describedby if needed), and change the link text inside the
span with class "checkbox__label" from "Term of Use" to "Terms of Use".

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
templates/v3/accounts/signup.html (1)

84-92: ⚡ Quick win

Don’t silently drop non-GitHub/Google providers in the dynamic loop.

Line 84 iterates all providers, but Lines 88–92 only render buttons for GitHub/Google. Any other configured provider gets no visible action. Add an else fallback button (generic icon/text) so available providers are consistently surfaced.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/v3/accounts/signup.html` around lines 84 - 92, The loop over
socialaccount_providers currently only renders buttons for provider.name ==
"GitHub" and "Google", silently dropping other providers; update the template
around the {% for provider in socialaccount_providers %} block (the code that
uses {% provider_login_url provider process="login" ... as href %} and the
checkbox id="checkbox-{{provider.name}}") to add an else fallback branch that
includes "v3/includes/_button.html" with a generic label like "Continue with " +
provider.name, the href from the provider_login_url tag, and a generic
icon_name/style so any non-GitHub/Google provider will render a visible button
instead of being omitted.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@templates/v3/accounts/signup.html`:
- Around line 84-92: The loop over socialaccount_providers currently only
renders buttons for provider.name == "GitHub" and "Google", silently dropping
other providers; update the template around the {% for provider in
socialaccount_providers %} block (the code that uses {% provider_login_url
provider process="login" ... as href %} and the checkbox
id="checkbox-{{provider.name}}") to add an else fallback branch that includes
"v3/includes/_button.html" with a generic label like "Continue with " +
provider.name, the href from the provider_login_url tag, and a generic
icon_name/style so any non-GitHub/Google provider will render a visible button
instead of being omitted.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dcda7009-7065-45fc-a0fe-9103de6f596d

📥 Commits

Reviewing files that changed from the base of the PR and between aa2b119 and 29dcc1b.

📒 Files selected for processing (2)
  • static/css/v3/auth-page.css
  • templates/v3/accounts/signup.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • static/css/v3/auth-page.css

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@static/css/v3/auth-page.css`:
- Around line 157-173: The CSS has a typo in the custom property name inside the
.auth-page__sign-in-link rule: replace the incorrect --letter-spaceing-tight
with the correct --letter-spacing-tight so the class uses the defined variable;
update the declaration in the .auth-page__sign-in-link selector to reference
--letter-spacing-tight.
- Around line 187-203: The CSS here has a misspelled custom property name in the
.auth-page__signup-divider rule (uses --letter-spaceing-tight); update that
property to the correct --letter-spacing-tight so the font-letter spacing uses
the intended variable, and ensure any other occurrences in that selector (and
its descendants like .auth-page__signup-divider hr) are corrected to the exact
symbol --letter-spacing-tight.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 483f23a7-cd94-4477-9a01-b8939c56d767

📥 Commits

Reviewing files that changed from the base of the PR and between 29dcc1b and 0d96767.

📒 Files selected for processing (3)
  • core/mixins.py
  • static/css/v3/auth-page.css
  • templates/v3/accounts/signup.html

Comment thread static/css/v3/auth-page.css
Comment thread static/css/v3/auth-page.css

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@core/mixins.py`:
- Around line 26-29: The current V3Mixin.dispatch sets self._v3_active and
immediately returns super().dispatch, which skips any render_v3_response()
overrides; change dispatch so it still sets self._v3_active = True, then call
response = super().dispatch(request, *args, **kwargs), then invoke
self.render_v3_response(request, response) (or call it only if it exists/if
_v3_active) so view-specific v3 behavior (redirects/cookies/context) runs, and
finally return the (possibly modified) response; update V3Mixin.dispatch to use
this flow and reference self._v3_active, render_v3_response, and dispatch when
locating the code to change.

In `@core/views.py`:
- Around line 116-119: The current CalendarView.get_context_data replaces the
V3Mixin.get_context_data by starting from {}, so
CalendarView.get_v3_context_data and shared v3 keys (like timezone) are never
merged; change get_context_data to first call super().get_context_data(**kwargs)
(invoking V3Mixin.get_context_data), then set ctx["boost_calendar"] =
settings.BOOST_CALENDAR and return ctx so v3/calendar.html receives the merged
v3 context along with the boost_calendar flag.

In `@libraries/views.py`:
- Around line 127-131: The get_v3_context_data method is re-calling
get_queryset() and can duplicate work and warnings; instead use the resolved
list passed in or the already-populated self.object_list. Change
get_v3_context_data to avoid calling get_queryset() again — prefer the incoming
queryset parameter if not None, else use self.object_list — and pass that value
to super().get_v3_context_data as object_list/queryset so you don't re-run
get_queryset() or replay messages.add_message paths.

In `@news/views.py`:
- Around line 179-183: Replace the extra database call in get_context_data by
using the already-evaluated list stored on the view: stop calling
self.get_queryset() and use self.object_list as the source for
pagination/context. Update the get_context_data implementation (method
get_context_data on the ListView subclass) to pass queryset=self.object_list and
object_list=self.object_list into super().get_context_data(...) so you don't
re-run the queryset or the display_publish_at loop.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b5776217-96a2-46fa-80a6-ded1d21e62cd

📥 Commits

Reviewing files that changed from the base of the PR and between c6194c2 and 347d59e.

📒 Files selected for processing (7)
  • ak/views.py
  • core/mixins.py
  • core/views.py
  • libraries/views.py
  • news/views.py
  • users/views.py
  • versions/views.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • users/views.py

Comment thread core/mixins.py
Comment on lines 26 to +29
def dispatch(self, request, *args, **kwargs):
if self.v3_template_name and flag_is_active(request, "v3"):
self._v3_active = True
return self.render_v3_response()
return super().dispatch(request, *args, **kwargs)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

This bypasses existing render_v3_response() overrides.

Several supplied views still put real behavior in render_v3_response() instead of only template selection — see core/views.py Line 135, news/views.py Line 98, and libraries/views.py Line 462. After routing v3 requests straight through super().dispatch(...), those code paths never run, so v3 requests silently lose their redirect/cookie/context setup. Either keep the hook in V3Mixin.dispatch() or migrate the remaining overrides in the same PR.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/mixins.py` around lines 26 - 29, The current V3Mixin.dispatch sets
self._v3_active and immediately returns super().dispatch, which skips any
render_v3_response() overrides; change dispatch so it still sets self._v3_active
= True, then call response = super().dispatch(request, *args, **kwargs), then
invoke self.render_v3_response(request, response) (or call it only if it
exists/if _v3_active) so view-specific v3 behavior (redirects/cookies/context)
runs, and finally return the (possibly modified) response; update
V3Mixin.dispatch to use this flow and reference self._v3_active,
render_v3_response, and dispatch when locating the code to change.

Comment thread core/views.py
Comment on lines 116 to 119
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx = {}
ctx["boost_calendar"] = settings.BOOST_CALENDAR
return ctx

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't bypass V3Mixin.get_context_data() here.

Starting from {} means the v3 path never merges get_v3_context_data(), so CalendarView.get_v3_context_data() is effectively dead and v3/calendar.html loses timezone and any future shared v3 keys. Keep the super().get_context_data(**kwargs) call and then add boost_calendar.

Suggested fix
     def get_context_data(self, **kwargs):
-        ctx = {}
+        ctx = super().get_context_data(**kwargs)
         ctx["boost_calendar"] = settings.BOOST_CALENDAR
         return ctx
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx = {}
ctx["boost_calendar"] = settings.BOOST_CALENDAR
return ctx
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx["boost_calendar"] = settings.BOOST_CALENDAR
return ctx
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/views.py` around lines 116 - 119, The current
CalendarView.get_context_data replaces the V3Mixin.get_context_data by starting
from {}, so CalendarView.get_v3_context_data and shared v3 keys (like timezone)
are never merged; change get_context_data to first call
super().get_context_data(**kwargs) (invoking V3Mixin.get_context_data), then set
ctx["boost_calendar"] = settings.BOOST_CALENDAR and return ctx so
v3/calendar.html receives the merged v3 context along with the boost_calendar
flag.

Comment thread libraries/views.py
Comment on lines 127 to +131
def get_v3_context_data(self, queryset=None, **kwargs):
context = {}
queryset = self.get_queryset()
context = super().get_v3_context_data(
**kwargs, object_list=queryset, queryset=queryset
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Reuse the resolved list queryset instead of calling get_queryset() again.

ListView.get() has already populated self.object_list before context building. Re-running get_queryset() here does the same work twice, and in this class it also replays the messages.add_message(...) path when no release data exists, which can duplicate the warning on a single request. Prefer the incoming queryset or self.object_list.

Suggested fix
     def get_v3_context_data(self, queryset=None, **kwargs):
-        queryset = self.get_queryset()
+        queryset = queryset if queryset is not None else self.object_list
         context = super().get_v3_context_data(
             **kwargs, object_list=queryset, queryset=queryset
         )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def get_v3_context_data(self, queryset=None, **kwargs):
context = {}
queryset = self.get_queryset()
context = super().get_v3_context_data(
**kwargs, object_list=queryset, queryset=queryset
)
def get_v3_context_data(self, queryset=None, **kwargs):
queryset = queryset if queryset is not None else self.object_list
context = super().get_v3_context_data(
**kwargs, object_list=queryset, queryset=queryset
)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@libraries/views.py` around lines 127 - 131, The get_v3_context_data method is
re-calling get_queryset() and can duplicate work and warnings; instead use the
resolved list passed in or the already-populated self.object_list. Change
get_v3_context_data to avoid calling get_queryset() again — prefer the incoming
queryset parameter if not None, else use self.object_list — and pass that value
to super().get_v3_context_data as object_list/queryset so you don't re-run
get_queryset() or replay messages.add_message paths.

Comment thread news/views.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webpage Integration: Sign Up

1 participant