opentelemetry.io icon indicating copy to clipboard operation
opentelemetry.io copied to clipboard

✅ [Outreachy] scroll to top button

Open bintus-ux opened this issue 1 year ago • 8 comments

Fix for issue number #5310

Desktop View

Registry _ OpenTelemetry - Google Chrome 10_5_2024 11_48_26 AM

Mobile View

Registry _ OpenTelemetry - Google Chrome 10_5_2024 11_49_57 AM

bintus-ux avatar Oct 05 '24 18:10 bintus-ux

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: bintus-ux / name: Ezerike Caleb Chikere (957765263eeb39cd980dfa9026c9a6445ba98f25, e96665dbe8f7dcb5e8861a74d1301bbe95603fae, 55422f0142bf2f1b9c6fd2cc7160d7a07df2aed2, 6ffa8bf1a658b40cd91d8c13a7712a7365702588, abf71896d8528949690e6a777aea9e5a0dcf10d6, 3214531454355e49dbd769605eadfdd78ec6d3fd, 77bc340de25d5c522206e584f53a06fc3aa900fa, 78146e6483362e54b91029dcce91e40ef4841046, 2decbe26891af6c30d17af671b4db7fb7a9e94e6, 0c7af1e16bc686e951bc46ff9a5a6767c23ff9c9, 4f80e5f4f22559508b4cca60ad65aab76bc3d1ab, f721bee9c7b0c884c0ebcc61607010ef0818e34d, 6b172dcbcb9b49e5407e783d80751f93e24c4a9e, d954b078a613876f7b6d3de895d9e1d87fcc3de1, 7abaa9a9dfadcba42ec312fc7f5c9f510e333bf6, 1c63e6e127bf478d9c1476ec379e0c5bb190921c, 809781ce1e4752df93149c541b99347a5e58f423, ddb416ed9b86e371f84e2fc6d7c47050ec125c8a, 55a83b6c45ec4fcea57d07194b57ebdf4bc7adf5, 00244a00501ee83ea4ea55658e746af04ed6a897, 4be5ccead8137e0868c4b24f840c5509d29092f4, 9e9441768f92bf287d81283cfc51a91ea64c338e, 64a675d3ab2008c8e7cb7ae3469770472ea58cbe, 97bd65bfd799002fbc172f4f2d217a1310e5060b, 0ad8f064af7d4dfb7669874184bb0a589cc5d5ca, 7965ddf57f5864fa60e486bb3aeeba4df9eeee05, fa1437fed26ab0b9a197e004e6c397c9a3651d93, b69e31609fa343ae816c89fb76f0022ef4f503fa, 4959ae576b2e502d215e44f604baf1f6a911e991, b15841d6d7b831239ad7fb4821f879ceb59da6b0, 634895e147ab0b257891317568df04fc7008e061, 56ffccab29b3fb68e8858e9d59ca68726540b968, d3614103950d9f84f3ebf1ef2b88474a992c4861, 274b7008d88c9a859e4833a394b5857e10626f31, a0219f9c1dab4e59948f3bec97374357f9c9c3b6, 3a5a396b6b81684748c3db6746dcc45a3d7848c8, 50035a74e9d09c2d6ea31b8f827c7601ee3f34e0, 39c0d50713e9cb8ef938708b42443d54dbbd9467, d22d89e79b845db85fde5dabe52ff91bfd13c957, 7dbfc28c089b7ab0462bcec05b1cb6e3cb48ac87, de390206b1b5bba8e342daaa9743617e3d37f411, c8e93f7e1fb63aa9b7cec5c62ec83bb329dd5b21, 5b8dae9b942c572b19daa720660394d65942db4d, 0274e4e611ecb8273b5373aeb116caf040931532)
  • :white_check_mark: login: svrnm / name: Severin Neumann (9510a79ab17ffb9ebda56e2634d87551cb8a4703)

@svrnm could you please test and review

bintus-ux avatar Oct 07 '24 09:10 bintus-ux

@svrnm Issues have been resolved , please kindly review once again.

bintus-ux avatar Oct 07 '24 12:10 bintus-ux

Screenshot 2024-10-09 at 11 00 14

Can you see if it is possible to make sure that the button "stops" above the page footer when scrolling down?

svrnm avatar Oct 09 '24 09:10 svrnm

On Wed, 9 Oct 2024 at 10:03 AM Severin Neumann @.***> wrote:

Screenshot.2024-10-09.at.11.00.14.png (view on web) https://github.com/user-attachments/assets/0e0bc8ed-b956-4a5e-ac2f-fbe2a31f83bc

Can you see if it is possible to make sure that the button "stops" above the page footer when scrolling down?

— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry.io/pull/5331#issuecomment-2401754483, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5F4OZ5EQ6IOBIN55OAASSTZ2TWOFAVCNFSM6AAAAABPNR34GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBRG42TINBYGM . You are receiving this because you were mentioned.Message ID: @.***>

Noted. On it.

bintus-ux avatar Oct 09 '24 09:10 bintus-ux

Screenshot 2024-10-09 at 11 00 14

Can you see if it is possible to make sure that the button "stops" above the page footer when scrolling down?

Done mentor @svrnm , Now the scroll to top buton keeps a 40px distance away from the footer on approaching its viewport. Video attached below.

https://github.com/user-attachments/assets/2bb24e4d-241a-498a-b519-3e49265b7049

bintus-ux avatar Oct 09 '24 14:10 bintus-ux

Thank you @bintus-ux! This looks really good, I consider this as done! After the outreachy application phase we will take another look and see if we can merge this PR.

svrnm avatar Oct 14 '24 07:10 svrnm

On Mon, 14 Oct 2024 at 8:11 AM Severin Neumann @.***> wrote:

Thank you @bintus-ux https://github.com/bintus-ux! This looks really good, I consider this as done! After the outreachy application phase we will take another look and see if we can merge this PR.

— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry.io/pull/5331#issuecomment-2410223615, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5F4OZZZFD2N57WPC4ZDSHDZ3NVCFAVCNFSM6AAAAABPNR34GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJQGIZDGNRRGU . You are receiving this because you were mentioned.Message ID: @.***>

Appreciate the kind words mentor!❤️🤗

bintus-ux avatar Oct 14 '24 07:10 bintus-ux

Alright noted, if you decide I adjust I’m glad to do so.

On Fri, 8 Nov 2024 at 11:35 AM Patrice Chalin @.***> wrote:

@.**** commented on this pull request.

Initial drive-by comments.

In layouts/shortcodes/ecosystem/registry/search-form.html https://github.com/open-telemetry/opentelemetry.io/pull/5331#discussion_r1834113017 :

+

  • <button
  •  id="scrollToTopBtn"
    
  •  class="btn rounded-circle position-fixed"
    
  •  style="background-color: #007bff; color: white; bottom: 40px; right: 40px; display: none; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); z-index: 1000;"
    
  •  aria-label="Scroll to top"
    
  •  title="Scroll to top">
    
  •  <i class="fas fa-arrow-up"></i>
    

+

Move the styling into the _registry.scss file.

In assets/scss/_registry.scss https://github.com/open-telemetry/opentelemetry.io/pull/5331#discussion_r1834113979 :

@.*** screen and (max-width: 768px) {

  • .scroll-to-top-btn {
  • bottom: 20px;
  • right: 20px;
  • padding: 10px;
  • } +}

.scroll-to-top-btn doesn't appear to be used (and if it were, why define it inside a media query?).

In layouts/partials/hooks/body-end.html https://github.com/open-telemetry/opentelemetry.io/pull/5331#discussion_r1834115676 :

+{{ $js := resources.Get "js/scrollToTop.js" | minify | fingerprint }} +

We don't want to unconditionally minify and fingerprint (those should be done in production only). I'd rather that this be part of the main JS script. But I'll have to get back to you on that.

— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry.io/pull/5331#pullrequestreview-2423351843, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5F4OZ2C5FVETA3AUXSI2QTZ7SHYDAVCNFSM6AAAAABPNR34GSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMRTGM2TCOBUGM . You are receiving this because you were mentioned.Message ID: @.***>

bintus-ux avatar Nov 08 '24 10:11 bintus-ux

@bintus-ux - can you make the style fixes? I'll get back to you for the JS.

chalin avatar Nov 08 '24 11:11 chalin

Noted, on it! On Fri, 8 Nov 2024 at 12:53 PM Patrice Chalin @.***> wrote:

@bintus-ux https://github.com/bintus-ux - can you make the style fixes? I'll get back to you for the JS.

— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry.io/pull/5331#issuecomment-2464542361, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5F4OZ74TDAEYNZEFGZLHXTZ7SQ33AVCNFSM6AAAAABPNR34GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRUGU2DEMZWGE . You are receiving this because you were mentioned.Message ID: @.***>

bintus-ux avatar Nov 08 '24 11:11 bintus-ux

@bintus-ux can you try out if you can get the scroll to top work on other pages as well? Maybe we can have it side wide?

svrnm avatar Nov 11 '24 14:11 svrnm

Ok noted, will have that setup.

On Mon, 11 Nov 2024 at 3:30 PM Severin Neumann @.***> wrote:

@bintus-ux https://github.com/bintus-ux can you try out if you can get the scroll to top work on other pages as well? Maybe we can have it side wide?

— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry.io/pull/5331#issuecomment-2468314666, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5F4OZ26IZRYUFC52BQEP5T2AC5R3AVCNFSM6AAAAABPNR34GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYGMYTINRWGY . You are receiving this because you were mentioned.Message ID: @.***>

bintus-ux avatar Nov 11 '24 16:11 bintus-ux

Got it, on it.

On Mon, 11 Nov 2024 at 6:35 PM Patrice Chalin @.***> wrote:

@.**** requested changes on this pull request.

In layouts/shortcodes/ecosystem/registry/search-form.html https://github.com/open-telemetry/opentelemetry.io/pull/5331#discussion_r1837003626 :

@@ -92,6 +92,16 @@

+

  • <button
  •  id="scrollToTopBtn"
    
  •  class="scroll-btn btn rounded-circle position-fixed"
    

Consider moving the effects of "rounded-circle position-fixed" into the .scroll-btn class definition.

In layouts/partials/hooks/body-end.html https://github.com/open-telemetry/opentelemetry.io/pull/5331#discussion_r1837001657 :

+{{ $js := resources.Get "js/scrollToTop.js" | minify | fingerprint }} +

Actually, just use the {{ partial "script.html" ... }} partial as is done for the other .js files in the lines above this one.

— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry.io/pull/5331#pullrequestreview-2427831011, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5F4OZ2AEFH7L2BZM2O2YY32ADTFTAVCNFSM6AAAAABPNR34GSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMRXHAZTCMBRGE . You are receiving this because you were mentioned.Message ID: @.***>

bintus-ux avatar Nov 11 '24 17:11 bintus-ux

Hello @svrnm , i might need your help please, appears i might have broken deploy by trying to access submodule themes/docsy to reach the footer.html file , please how do i resolve, thanks.

bintus-ux avatar Nov 12 '24 12:11 bintus-ux

Hello @svrnm , i might need your help please, appears i might have broken deploy by trying to access submodule themes/docsy to reach the footer.html file , please how do i resolve, thanks.

Run npm run fix:submodule locally this should restore the right versions of your code. Note that you should never touch into the docsy code. If there is any blocker to roll this out across the website we can still start with the registry and see later how and where we want to have it as well.

svrnm avatar Nov 12 '24 14:11 svrnm

Hello @svrnm , i might need your help please, appears i might have broken deploy by trying to access submodule themes/docsy to reach the footer.html file , please how do i resolve, thanks.

Run npm run fix:submodule locally this should restore the right versions of your code. Note that you should never touch into the docsy code. If there is any blocker to roll this out across the website we can still start with the registry and see later how and where we want to have it as well.

I don’t know if it’s a blocker as in order to access the footer.html file which is where I could implement the scroll-to-top to effect on the website it resulted in the issue accessing themes/docsy

bintus-ux avatar Nov 12 '24 14:11 bintus-ux

Hello @svrnm , i might need your help please, appears i might have broken deploy by trying to access submodule themes/docsy to reach the footer.html file , please how do i resolve, thanks.

Run npm run fix:submodule locally this should restore the right versions of your code. Note that you should never touch into the docsy code. If there is any blocker to roll this out across the website we can still start with the registry and see later how and where we want to have it as well.

I don’t know if it’s a blocker as in order to access the footer.html file which is where I could implement the scroll-to-top to effect on the website it resulted in the issue accessing themes/docsy

I’ve run the command and pushed my changes but the deploy checks don’t re-run @svrnm

bintus-ux avatar Nov 12 '24 18:11 bintus-ux

Hello @svrnm , i might need your help please, appears i might have broken deploy by trying to access submodule themes/docsy to reach the footer.html file , please how do i resolve, thanks.

Run npm run fix:submodule locally this should restore the right versions of your code. Note that you should never touch into the docsy code. If there is any blocker to roll this out across the website we can still start with the registry and see later how and where we want to have it as well.

I don’t know if it’s a blocker as in order to access the footer.html file which is where I could implement the scroll-to-top to effect on the website it resulted in the issue accessing themes/docsy

I’ve run the command and pushed my changes but the deploy checks don’t re-run @svrnm

your submodules are still broken, we can try to get it fixed via a bot

svrnm avatar Nov 13 '24 13:11 svrnm

/fix:submodule

svrnm avatar Nov 13 '24 13:11 svrnm

You triggered fix:submodule action run at https://github.com/open-telemetry/opentelemetry.io/actions/runs/11818050526

opentelemetrybot avatar Nov 13 '24 13:11 opentelemetrybot

fix:submodule failed or was cancelled. For details, see https://github.com/open-telemetry/opentelemetry.io/actions/runs/11818050526.

opentelemetrybot avatar Nov 13 '24 13:11 opentelemetrybot

I am super sorry if i broke something.

bintus-ux avatar Nov 13 '24 13:11 bintus-ux

I am super sorry if i broke something.

you didn't. Submodules are challenging from time to time, that's why we have some helpers to fix issues with them.

I pulled your PR and fixed it locally on my end. Make sure you run "git pull" on your end before doing any more changes

svrnm avatar Nov 13 '24 13:11 svrnm

I am super sorry if i broke something.

you didn't. Submodules are challenging from time to time, that's why we have some helpers to fix issues with them.

I pulled your PR and fixed it locally on my end. Make sure you run "git pull" on your end before doing any more changes

Appreciate so much, thanks!!!

bintus-ux avatar Nov 13 '24 13:11 bintus-ux

@svrnm I pulled your changes as you said, ran the npm run fix:format and merged with main. Deployment fails as i am already done with my scroll-to-top changes

bintus-ux avatar Nov 13 '24 15:11 bintus-ux

@bintus-ux there seems to be something broken in the PR and the git commit history, I tried to rebase it but I get a lot of merge conflicts that are hard to resolve. Please do the following:

  • Backup your local version of this PR and the cloned repo
  • Go to https://github.com/bintus-ux/opentelemetry.io/ and make sure that it is in sync with upstream
  • Clone your fork freshly
  • Copy your changes from the backup into your freshly cloned directory
  • Run npm run fix:all
  • Create a new branch
  • Push that new branch into a new PR

If that new PR has everything we need we can close down this one

svrnm avatar Nov 14 '24 11:11 svrnm

@bintus-ux there seems to be something broken in the PR and the git commit history, I tried to rebase it but I get a lot of merge conflicts that are hard to resolve. Please do the following:

  • Backup your local version of this PR and the cloned repo
  • Go to https://github.com/bintus-ux/opentelemetry.io/ and make sure that it is in sync with upstream
  • Clone your fork freshly
  • Copy your changes from the backup into your freshly cloned directory
  • Run npm run fix:all
  • Create a new branch
  • Push that new branch into a new PR

If that new PR has everything we need we can close down this one

Appears the best solution, will do that now, thank you.

bintus-ux avatar Nov 14 '24 11:11 bintus-ux

Sorry to still be dwelling on this issue, i did as you said, my fork was in sync with upstream before i recloned it,manually copied my changes into the codebase and ran npm run fix:all which popped up this clone errors for opentelemetry-go @svrnm

scrollToTop js - opentelemetry io-2  WSL_ Ubuntu-24 04  - Visual Studio Code 11_18_2024 8_19_03 AM scrollToTop js - opentelemetry io-2  WSL_ Ubuntu-24 04  - Visual Studio Code 11_18_2024 8_18_49 AM scrollToTop js - opentelemetry io-2  WSL_ Ubuntu-24 04  - Visual Studio Code 11_18_2024 8_19_12 AM

bintus-ux avatar Nov 18 '24 08:11 bintus-ux

Sorry to still be dwelling on this issue, i did as you said, my fork was in sync with upstream before i recloned it,manually copied my changes into the codebase and ran npm run fix:all which popped up this clone errors for opentelemetry-go @svrnm

can you delete that folder and try it once again?

svrnm avatar Nov 18 '24 08:11 svrnm