Skip to content

Conversation

@divyaverma-01
Copy link

@divyaverma-01 divyaverma-01 commented Oct 9, 2025

Description

This PR introduces a “Back to Top” button on the Awesome-Go website to improve user experience and navigation, especially on long pages.

Changes Made:

  • Updated index.tmpl.html to include the “Back to Top” button markup.
  • Modified awesome-go.css to style the button (positioning, hover effects, and smooth scroll).
  • Verified functionality locally using go run main.go and browser testing.

Notes:

  • No Go packages were modified or added.
  • This change only affects the website front-end (HTML/CSS).
  • The out/ directory remains ignored as per .gitignore.

Related issue

fixes #5846

Checklist

  • I have read the Contribution Guidelines
  • I have read the Maintainers Note
  • I have verified that this change does not impact any Go packages.
  • The modification follows the existing website style and structure.
  • Tested locally and confirmed working as expected.

Summary by CodeRabbit

  • New Features

    • Added a back-to-top button with smooth, clickable scrolling; appears after scrolling and includes hover feedback.
  • Style

    • Reformatted CSS for consistency without changing visual appearance.
  • Chores

    • Streamlined analytics script loading and initialization.
    • Standardized script tag formatting for third-party libraries.

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

Automated Quality Checks (from CONTRIBUTING minimum standards)

  • Repo link: missing
  • pkg.go.dev: missing
  • goreportcard: missing
  • coverage: missing

These checks are a best-effort automation and do not replace human review.

@coderabbitai

This comment was marked as resolved.

Copy link
Contributor

@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

🧹 Nitpick comments (2)
tmpl/index.tmpl.html (2)

92-94: Add an explicit accessible label.

Screen readers will only announce the bare ▲ glyph. Add an aria-label (or visually hidden text) so the purpose is announced clearly.

-    <button onclick="scrollToTop()" id="backToTopBtn" title="Go to top">
+    <button
+      type="button"
+      onclick="scrollToTop()"
+      id="backToTopBtn"
+      title="Go to top"
+      aria-label="Back to top"
+    >

100-120: Use addEventListener and set the initial state.

Overwriting window.onscroll makes this fragile if another handler is added, and the button stays hidden on load when landing mid-page. Hook with addEventListener and call scrollFunction() once after attaching.

-      window.onscroll = function () {
-        scrollFunction();
-      };
+      window.addEventListener("scroll", scrollFunction);
+      scrollFunction();
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df3b620 and 4682a1c.

📒 Files selected for processing (2)
  • tmpl/assets/awesome-go.css (3 hunks)
  • tmpl/index.tmpl.html (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis

@bhaves19h
Copy link

This PR introduces a “Back to Top” button to enhance user experience and navigation on long pages of the Awesome-Go website.

Changes Made:

Updated index.tmpl.html to include the button markup.

Modified awesome-go.css to add button styles (positioning, hover effects, smooth scrolling).

Verified functionality locally using go run main.go and browser testing.

Notes:

No Go packages were modified or added.

The change only affects the website’s front-end (HTML/CSS).

The out/ directory remains ignored as per .gitignore.

Related Issue:
Fixes #5846

Checklist:

I have read the Contribution Guidelines.

I have read the Maintainers’ Note.

I have verified that this change does not impact any Go packages.

The modification follows the existing website style and structure.

Tested locally and confirmed working as expected.

Summary by CodeRabbit:

New Feature: Added a back-to-top button with smooth scroll and hover feedback.

Style: Reformatted CSS for consistency.

Chores: Streamlined analytics script loading and standardized third-party script tags.

padding: 6px;
}

/* Add this CSS to your awesome-go.css file */
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am going to modify your code before merging it, are you fine with that?

Or you can do the following changes and then I will merge it after further review.

  • Formatting changes should be removed OR add separate commits for formatting and the back-to-top changes.
  • Remove these LLM generated comments. only leave any helpful comments.

Copy link
Owner

avelino commented Oct 17, 2025

Hi @divyaverma-01, the automated checks for this PR failed. Please review the build logs and fix the issues. Specifically, the PR Quality Checks/quality-check failed. Please address this and re-request a review.

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.

Add a Back to top button

4 participants