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

Feature/scroll to top #65

Closed
wants to merge 5 commits into from
Closed

Feature/scroll to top #65

wants to merge 5 commits into from

Conversation

Daodu111
Copy link

@Daodu111 Daodu111 commented Oct 3, 2024

Fixes

Description

This pull request adds a scroll-to-top element to enhance user experience on longer pages. The new feature allows users to easily navigate back to the top of the page with a single click.

Technical details

I implemented a scroll-to-top button using HTML and CSS only and it appears after scrolling down a little distance

Screenshots

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@Daodu111 Daodu111 requested review from a team as code owners October 3, 2024 00:26
@Daodu111 Daodu111 requested review from TimidRobot, possumbilities, MuluhGodson and dhruvkb and removed request for a team October 3, 2024 00:26
Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for vocabulary-docs ready!

Name Link
🔨 Latest commit 0edcd9f
🔍 Latest deploy log https://app.netlify.com/sites/vocabulary-docs/deploys/6704d0fd5978f30008a32b9e
😎 Deploy Preview https://deploy-preview-65--vocabulary-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this file shouldn't have been commited

Copy link
Author

Choose a reason for hiding this comment

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

I’ll remove it and create a PR again. Hope that would help and also I want to ask if the function works as requested?

@@ -970,6 +969,7 @@ <h1>Title Here</h1>
</pre>



Copy link
Contributor

Choose a reason for hiding this comment

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

why the extra space?

Copy link
Author

Choose a reason for hiding this comment

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

I’ll also work on this as soon as possible

@possumbilities
Copy link
Contributor

possumbilities commented Oct 3, 2024

Hi @Daodu111 Thank you for the contribution! After looking at it further, I'm not sure that this meets the criteria outlined in the Issue.

For example:

The element would likely not be present on smaller screens which already have some measure of functionality related to this baked into their operating system level UX; but for larger viewport sizes this could be much more helpful to include.

Additionally, this does not utilize CSS pseudo elements like :before or :after

It also includes a new icon outside the standard icon library implementation, and should follow how icons are included within the framework already.

And I believe you need to include the scroll-to-top on an existing specimen or create a new one for display/testing purposes. One could argue adding it to the archive-page context might suffice since it has sufficient height, has two columns, and might benefit from such a button. A longer context like blog-post might work as well or in addition.

I think the approach needs to be changed in several areas before it could proceed. I'll leave it open for now to leave room for you to adjust it.

<li><a href="#">Blog</a></li>
<li><a href="#">Support Us</a></li>
<li><a class="attention" href="https://summit.creativecommons.org/">Global Summit 2023</a></li>
<li><a href="#" class="active">Who We Are</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

these changes are not related to this PR.

@Daodu111 Daodu111 closed this by deleting the head repository Oct 8, 2024
@possumbilities possumbilities self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Feature] Add a scroll-to-top element to UX for longer page contexts
3 participants