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

Bug or by designed ? Sidebars don't stick on main page, but on "detailed" page only? #131

Closed
techhubhub opened this issue Jan 31, 2024 · 15 comments

Comments

@techhubhub
Copy link

For example, Sidebars doesn't stick well on https://theme-cards.hbstack.dev (it kind of works)
but on stick well on https://theme-cards.hbstack.dev/blog/2023/11/diagrams-and-charts/
it should keep the same consistence.

@razonyang
Copy link
Member

It's expected, the sidebar will be sticky until reaching the footer, same as detail pages.

@techhubhub
Copy link
Author

image

as shown, on page https://theme-cards.hbstack.dev/ it doesn't work.

working now, but but reaching the footer.
image

Not reaching the footer. (maybe I misunderstood what you meant)
image

@razonyang
Copy link
Member

Cloud you please provide full screenshot, OS and browser (version)?

@razonyang razonyang reopened this Jan 31, 2024
@techhubhub
Copy link
Author

Google Chrome
Version 121.0.6167.85 (Official Build) (x86_64)
1

2 3

@razonyang
Copy link
Member

The first screenshot already reached the footer (not the page end), so I am closing this.
image

@LITUATUI
Copy link
Contributor

Following the discussion #265 can you reopen this issue? Thanks!

@razonyang razonyang reopened this Mar 31, 2024
@LITUATUI
Copy link
Contributor

LITUATUI commented Mar 31, 2024

The problem here is that the sidebar widgets aren't scrolling down until reaching the footer, which makes the sidebar partly hidden, even when there's space to show it fully.

PushEVs_sidebar2

However, the sidebar seems to be working as it should on the demonstration site. No empty space at the bottom of the sidebar.

@LITUATUI
Copy link
Contributor

I noticed that if I add more things to the sidebar, for example another banner, the sidebar will have all its vertical space utilized and then scroll down till the footer as it should.

PushEVs_OK

But then we get that ugly scrollbar for the sidebar.

@razonyang
Copy link
Member

razonyang commented Apr 1, 2024

The main reason I don't think it's worth is that, the user doesn't focus on (care about) the sidebar when they already reached the footer. There are some popular sites do the same. For example,

However, the sidebar seems to be working as it should on the demonstration site. No empty space at the bottom of the sidebar.

That's because there has enough content to take full height of sidebar, there will be always empty space if you don't have enough content.

But then we get that ugly scrollbar for the sidebar.

I didn't get the ugly, if you mean the gap between of the ad and sidebar, then it should be a duty of the ad block, you can assign a margin or padding to the ad block.

Decision

Although I don't think it would be useful, I'll provide a module to achieve that, since Flexible and Customizable is one of this framework's features and goals.

Please note that, it may not happen too fast.

@LITUATUI
Copy link
Contributor

LITUATUI commented Apr 1, 2024

When the visitor reached the footer, I prefer to give him options to either leave by clicking an affiliate banner or stay by reading another article. That's why a visible sidebar with its widgets is a most.

Do you think that adding this npm package to the theme's dependencies is useful? Or this for individual widgets?

@razonyang
Copy link
Member

razonyang commented Apr 1, 2024

Do you think that adding this npm package to the theme's dependencies is useful? Or this for individual widgets?

I don't know, but I'm not going to introduce any extra dependencies.

@razonyang
Copy link
Member

@LITUATUI I've implemented a simple solution for this, but naming is difficult, I'd name the module as sticky-till-the-end if no further suggestions, let me know if you have any ideas of naming.

Will release the module in those two days.

@LITUATUI
Copy link
Contributor

LITUATUI commented Apr 2, 2024

Thanks @razonyang. That name works for me, it's clear in what it does.

@razonyang
Copy link
Member

Preview:

sticky-till-the-end.mp4

To achieve this, you'd need to import github.com/hbstack/blog/modules/sticky-till-the-end and github.com/hbstack/docs/modules/sticky-till-the-end for blog and docs layout respectively.

I'm closing this now, please open another issue if there is a bug.

@razonyang
Copy link
Member

Please put those modules under theme-cards module, otherwise cards theme will be overridden.

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

No branches or pull requests

3 participants