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

Scroll to view only when the item is not in view #773

Merged
merged 2 commits into from Dec 5, 2013

Conversation

madhuracj
Copy link
Contributor

This is an alternative fix for https://sourceforge.net/p/phpmyadmin/bugs/4169/.
The auto scrolling will not happen if the item is visible in the navigation. So when the user click a link in navigation no auto scrolling will happen.
However if a user selects a database/table from main panel and it is not visible in navigation, auto scrolling will bring it to view, since expanding the highlighting an item that is out of view it not useful.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling a21a18c on madhuracj:QA_4_1 into fc8e587 on phpmyadmin:QA_4_1.

@atul516
Copy link
Contributor

atul516 commented Dec 4, 2013

Hi Madhura,
My opinion is that we put auto-expanding and auto-scrolling particularly to emulate the pre-4.0 behavior i.e. a user clicking on a db in navigation would see its tables listed below it without being bothered with expanding/scrolling/collapsing. So, scrolling the newly chosen database to the top of view was taken as norm.

So as, we could keep the new navi tree with all its advantages without disturbing the old-style users much..

@lem9
Copy link
Contributor

lem9 commented Dec 4, 2013

Hi Atul,
I'm not sure to follow; do you agree with Madhura's patch?

@madhuracj
Copy link
Contributor Author

Marc,

Atul like to see the auto-scrolling feature enabled for database selection and with my first commit any auto-scrolling was limited to cases where the selected item is out of view. So I've added a new commit 9b40496 that forces auto-scrolling for databases.

So now the behavior is

  1. When a database is selected (from navigation or main) it is expanded and scrolled to top
  2. When a table is selected from navigation no scrolling (since it's in view)
  3. When a table is selected from main auto scrolling if its not in view

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling 9b40496 on madhuracj:QA_4_1 into fc8e587 on phpmyadmin:QA_4_1.

@atul516
Copy link
Contributor

atul516 commented Dec 5, 2013

Thanks @madhuracj
Marc,
The improvement is to scroll to tables/views only when they get selected from the main panel and are out-of-view in navi panel.

@lem9
Copy link
Contributor

lem9 commented Dec 5, 2013

Ok, feel free to merge but next time, your commits need to be signed (git commit -s) to indicate you agree to the DCO, see CONTRIBUTING.md.

atul516 added a commit that referenced this pull request Dec 5, 2013
Scroll to view only when the item is not in view
@atul516 atul516 merged commit 3410f22 into phpmyadmin:QA_4_1 Dec 5, 2013
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

Successfully merging this pull request may close these issues.

None yet

4 participants