fix: remove duplicate back-to-top button (#1894)#1932
Conversation
Wrap localStorage.setItem in syncBookmark and clearAllBookmarks with try/catch to prevent uncaught errors when storage quota is exceeded. Alert the user when bookmark operations cannot be persisted.
The .sr-only utility class was defined twice in the internal stylesheet (lines 204 and 436). Removed the duplicate at line 436 to keep the codebase DRY.
Changed from old Twitter blue (#1DA1F2) to X brand black (#000000) to maintain visual consistency with other social media icons.
|
Someone is attempting to deploy a commit to the s3dfx-cyber's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
|
Warning Review limit reached
More reviews will be available in 27 minutes and 46 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
💬 Faster Reviews & AssignmentsHi @saurabhhhcodes, for faster coordination and smoother communication, consider joining our Discord community: Useful Channels
|
|
👋 Thanks for opening a PR, @saurabhhhcodes!Your PR has entered the 🚦 PR Review Pipeline.
🔄 Review Flow
A pipeline status comment may appear automatically as your PR progresses. ✅ Contributor Checklist
|
|
🤖 TENET Agent Review📋 SummaryThis pull request primarily addresses the removal of a duplicate "back-to-top" button, including its associated HTML, CSS, and JavaScript. Beyond this core fix, the PR introduces several valuable enhancements: improved error handling for 🔐 Security FindingsNo security issues found. 🧹 Code Quality
✅ What's Done Well
📝 Overall VerdictAPPROVE - The PR introduces valuable security, robustness, and accessibility improvements while cleaning up redundant code. |
There was a problem hiding this comment.
3 issues found across 5 files
Confidence score: 4/5
src/components/footer.htmlchangesPrivacy Policyto open in a new tab, which introduces a user-facing navigation behavior change unrelated to the back-to-top fix and could surprise users or trigger policy/accessibility review late—revert this link behavior or move it to a dedicated PR before merging.src/styles.cssupdates the Twitter hover color from#1DA1F2to#000000, creating an unintended branding/UI shift that can slip through under an unrelated bugfix scope—remove this style edit from this PR or split it into a separate styling change.src/js/app.js(renderCompare()) adds an imagealtattribute outside the stated scope; while likely beneficial, mixed-purpose edits increase review noise and make regressions harder to trace after merge—keep this PR focused and land the accessibility tweak in its own follow-up PR.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/styles.css">
<violation number="1" location="src/styles.css:524">
P2: Out-of-scope style change: Twitter hover branding color changed from #1DA1F2 to #000000 in a PR scoped to removing a duplicate back-to-top button. Please remove this unrelated change or move it to a separate PR.</violation>
</file>
<file name="src/js/app.js">
<violation number="1" location="src/js/app.js:949">
P2: Out-of-scope change: the only edit in this file adds an `alt` attribute to an image in `renderCompare()`, which is unrelated to the PR purpose of removing a duplicate back-to-top button. Unrelated edits should be moved to a separate PR.</violation>
</file>
<file name="src/components/footer.html">
<violation number="1" location="src/components/footer.html:113">
P2: Unrelated behavior change: `Privacy Policy` link opens in new tab, which is out of scope for a back-to-top duplication fix.</violation>
</file>
Architecture diagram
sequenceDiagram
participant User as User
participant Browser as Browser
participant DOM as DOM
participant JS as Application JS
participant LS as localStorage
Note over User,LS: Duplicate Back-to-Top Button Removal
User->>Browser: Scrolling page
Browser->>DOM: fire scroll event
alt Scroll > 300px (NEW: No duplicate button logic)
DOM->>JS: CHANGED: No back-to-top show/hide listener
Note over JS: Previously: window.addEventListener('scroll', toggle back-to-top)
end
Note over User,LS: Bookmark feature improvement
User->>Browser: Click bookmark button
Browser->>DOM: Click event
DOM->>JS: toggleBookmark(orgName, shouldAdd)
JS->>LS: localStorage.setItem('bookmarks', ...)
alt Storage quota exceeded (NEW: Error handling)
LS-->>JS: QuotaExceededError
JS->>DOM: alert('Could not save bookmark...')
JS->>JS: return early (skip bookmark update)
else Success
LS-->>JS: ok
JS->>JS: refreshOrgGridAfterBookmarkChange()
JS->>JS: renderWatchlist()
JS->>JS: updateAIInsights()
end
Note over User,LS: Clear all bookmarks with error handling
User->>Browser: Click clear bookmarks
Browser->>DOM: Click event
DOM->>JS: confirm dialog
alt User confirms
JS->>LS: localStorage.setItem('bookmarks', '[]')
alt Storage error (NEW)
LS-->>JS: error
JS->>DOM: alert('Could not clear bookmarks...')
else Success
LS-->>JS: ok
JS->>JS: applyFilters()
JS->>JS: renderWatchlist()
JS->>JS: updateAIInsights()
end
end
Note over User,LS: Mentor chip hover effects (NEW)
User->>Browser: Hover mentor link chip
Browser->>DOM: Apply CSS transitions (transform, background, border-color, box-shadow)
Note over User,Browser: Privacy link opens new tab (CHANGED)
User->>Browser: Click "Privacy Policy"
Browser->>Browser: Open in new tab (target="_blank") with noopener noreferrer
Note over User,DOM: Compare page image accessibility (NEW)
User->>Browser: View compare section
DOM->>DOM: <img> now includes alt text (org name)
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| background: #1DA1F2; | ||
| border-color: #1DA1F2; | ||
| box-shadow: 0 0 12px rgba(29, 161, 242, 0.5); | ||
| background: #000000; |
There was a problem hiding this comment.
P2: Out-of-scope style change: Twitter hover branding color changed from #1DA1F2 to #000000 in a PR scoped to removing a duplicate back-to-top button. Please remove this unrelated change or move it to a separate PR.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/styles.css, line 524:
<comment>Out-of-scope style change: Twitter hover branding color changed from #1DA1F2 to #000000 in a PR scoped to removing a duplicate back-to-top button. Please remove this unrelated change or move it to a separate PR.</comment>
<file context>
@@ -521,49 +521,12 @@ body{background:var(--bg);color:var(--ink);font-family:'Plus Jakarta Sans',sans-
- background: #1DA1F2;
- border-color: #1DA1F2;
- box-shadow: 0 0 12px rgba(29, 161, 242, 0.5);
+ background: #000000;
+ border-color: #000000;
+ box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
</file context>
| item.innerHTML = safeHTML` | ||
| <div class="w-10 h-10 rounded-lg bg-orange-100 dark:bg-orange-950/40 flex items-center justify-center mx-auto mb-3 overflow-hidden"> | ||
| <img src="${logoUrl}" data-org-name="${org.name}" class="w-full h-full object-contain" /> | ||
| <img src="${logoUrl}" data-org-name="${org.name}" alt="${org.name} logo" class="w-full h-full object-contain" /> |
There was a problem hiding this comment.
P2: Out-of-scope change: the only edit in this file adds an alt attribute to an image in renderCompare(), which is unrelated to the PR purpose of removing a duplicate back-to-top button. Unrelated edits should be moved to a separate PR.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/js/app.js, line 949:
<comment>Out-of-scope change: the only edit in this file adds an `alt` attribute to an image in `renderCompare()`, which is unrelated to the PR purpose of removing a duplicate back-to-top button. Unrelated edits should be moved to a separate PR.</comment>
<file context>
@@ -946,7 +946,7 @@ function renderCompare() {
item.innerHTML = safeHTML`
<div class="w-10 h-10 rounded-lg bg-orange-100 dark:bg-orange-950/40 flex items-center justify-center mx-auto mb-3 overflow-hidden">
- <img src="${logoUrl}" data-org-name="${org.name}" class="w-full h-full object-contain" />
+ <img src="${logoUrl}" data-org-name="${org.name}" alt="${org.name} logo" class="w-full h-full object-contain" />
</div>
<p class="font-bold text-sm truncate">${org.name}</p>
</file context>
| <div class="flex items-center gap-4 flex-wrap justify-center"> | ||
| <a class="text-xs font-bold uppercase tracking-widest text-zinc-500 hover:text-primary dark:text-zinc-400 transition-colors mr-2" | ||
| href="privacy.html">Privacy Policy</a> | ||
| href="privacy.html" target="_blank" rel="noopener noreferrer">Privacy Policy</a> |
There was a problem hiding this comment.
P2: Unrelated behavior change: Privacy Policy link opens in new tab, which is out of scope for a back-to-top duplication fix.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/components/footer.html, line 113:
<comment>Unrelated behavior change: `Privacy Policy` link opens in new tab, which is out of scope for a back-to-top duplication fix.</comment>
<file context>
@@ -110,7 +110,7 @@ <h3 class="text-xs font-bold uppercase tracking-widest text-zinc-900 dark:text-z
<div class="flex items-center gap-4 flex-wrap justify-center">
<a class="text-xs font-bold uppercase tracking-widest text-zinc-500 hover:text-primary dark:text-zinc-400 transition-colors mr-2"
- href="privacy.html">Privacy Policy</a>
+ href="privacy.html" target="_blank" rel="noopener noreferrer">Privacy Policy</a>
<a class="social-link github" href="https://github.com/S3DFX-CYBER/GSoC-Org-Finder-" target="_blank"
rel="noopener noreferrer" aria-label="GitHub Repository">
</file context>
| href="privacy.html" target="_blank" rel="noopener noreferrer">Privacy Policy</a> | |
| href="privacy.html">Privacy Policy</a> |
✅ Merge Conflicts ResolvedThanks @saurabhhhcodes, this PR is mergeable again. |




Fixes #1894