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] Minor display issues #14

Closed
giannoug opened this issue Aug 5, 2019 · 5 comments
Closed

[Bug] Minor display issues #14

giannoug opened this issue Aug 5, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@giannoug
Copy link

giannoug commented Aug 5, 2019

Version

1.0

Reproduction link

https://demos.creative-tim.com/black-dashboard-pro-react/

Operating System

Windows 10

Device

Desktop

Browser & Version

Version 75.0.3770.142 (Official Build) (64-bit)

Steps to reproduce

I'm describing three different bugs below:

  1. In a page with not enough content, no matter the content, the page will always have a scroll bar. This is bad experience to the user.

Example link: https://demos.creative-tim.com/black-dashboard-pro-react/#/admin/user-profile

  1. When scrolling, the icon above the sidebar doesn't stay above it and scrolls with the page. It doesn't happen with Black Dashboard PRO HTML version. Check the icon above the sidebar:

WORKING -> https://demos.creative-tim.com/marketplace/black-dashboard-pro/examples/dashboard.html
NOT WORKING -> https://demos.creative-tim.com/black-dashboard-pro-react/#/admin/dashboard

  1. A small sidebar appears on the bottom of the sidebar when the it is expanded.

Example (open the sidebar and look at the bottom of it): https://demos.creative-tim.com/black-dashboard-pro-react/#/admin/dashboard

What is expected?

  1. No scrolling is shown when content fits the page
  2. The icon should stay on top of the menu bar
  3. No scrolling bar is shown

What is actually happening?

  1. Scrolling occurs
  2. The icon scrolls with the content
  3. You can see a scrollbar that vanishes when you click it.

Solution

Additional comments

@einazare einazare added bug Something isn't working help wanted Extra attention is needed question Further information is requested and removed help wanted Extra attention is needed labels Aug 7, 2019
@einazare
Copy link
Contributor

einazare commented Aug 7, 2019

Hello there, @giannoug ,

Thank you for your interest in working with our products.

In a page with not enough content, no matter the content, the page will always have a scroll bar. This is bad experience to the user.

This is actually browser default behavior. You need to have a scroll effect, for users that modify the browser height. If we were to add for example:

overflow: hidden;

And one user would make the browser windows smaller, it would not have a scroll bar. Take a look at the following images:
Screen Shot 2019-08-07 at 11 42 03 AM
Screen Shot 2019-08-07 at 11 43 28 AM
Hope this clarifies a bit your concern.

When scrolling, the icon above the sidebar doesn't stay above it and scrolls with the page. It doesn't happen with Black Dashboard PRO HTML version. Check the icon above the sidebar:

I can see that the icon is staying above the Sidebar. Maybe I didn't understand your question correctly. Could you please provide some additional comments on this? Maybe some images?
Screen Shot 2019-08-07 at 11 48 18 AM
Screen Shot 2019-08-07 at 11 48 42 AM

A small sidebar appears on the bottom of the sidebar when the it is expanded.

Go inside this file: src/components/Sidebar/Sidebar.jsx and change

ps = new PerfectScrollbar(this.refs.sidebar);

to

ps = new PerfectScrollbar(this.refs.sidebar, {
        suppressScrollX: true,
        suppressScrollY: false
      });

Will wait for your response.

Best,
Manu

@giannoug
Copy link
Author

giannoug commented Aug 7, 2019

This is actually browser default behavior. You need to have a scroll effect, for users that modify the browser height.

You don't need to show a scrollbar and allow the page to scroll when the content fits the page.
For example look at this page: https://demos.creative-tim.com/black-dashboard-pro-react/#/auth/login

I can see that the icon is staying above the Sidebar. Maybe I didn't understand your question correctly. Could you please provide some additional comments on this? Maybe some images?

mpompa

When you scroll, the icon leaves with the content on the React version (left). On the HTML version (right) it stays on top of the sidebar.

Go inside this file: src/components/Sidebar/Sidebar.jsx and change

Thanks that worked!

@einazare
Copy link
Contributor

einazare commented Aug 7, 2019

Hello again, @giannoug ,

You don't need to show a scrollbar and allow the page to scroll when the content fits the page.
For example look at this page: https://demos.creative-tim.com/black-dashboard-pro-react/#/auth/login

We are sorry about this, but we can't modify this.

When you scroll, the icon leaves with the content on the React version (left). On the HTML version (right) it stays on top of the sidebar.

Maybe this is a bug only on windows devices. Since I am not at the office until next Monday I will not be able to test this. I will come back then with a fix.

Best,
Manu

@giannoug
Copy link
Author

giannoug commented Aug 7, 2019

We are sorry about this, but we can't modify this.

I was able to fix this by changing
.footer { padding: 24px 30px; }
to
.footer { padding: 24px 30px 0 30px; }

Since I am not at the office until next Monday I will not be able to test this. I will come back then with a fix.

Thanks!

@einazare
Copy link
Contributor

Hello again, @giannoug ,

Thank you for your patience.
I've found out why the second issue is happening.
It is because we are using perfect-scrollbar to make a nice scrollbar on Windows devices, something like the scrollbar from the MacOS. This means that the event listener for the scroll on the window selector will not get fired - the scroll is not happening on the window element on Windows devices.
Please add the following line of code inside src/layouts/Admin/Admin.jsx, after if (navigator.platform.indexOf("Win") > -1) {:

this.refs.mainPanel.addEventListener("ps-scroll-y", this.showNavbarButton);

Hope this helps.

Please leave the issue opened.

Best,
Manu

@einazare einazare removed the question Further information is requested label Aug 12, 2019
@einazare einazare closed this as completed Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants