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

opening a new file scrolls file bar to the newly opened file #69

Merged

Conversation

aarora4
Copy link
Contributor

@aarora4 aarora4 commented Jul 11, 2019

Signed-off-by: aarora4 lazyc78@gmail.com
Checked by Michael Roffo

Signed-off-by: aarora4 <lazyc78@gmail.com>
ngAfterViewChecked() {
const changes = this.iterableDiffer.diff(this.data);
if (changes) {
this.componentRef.directiveRef.scrollToRight();
Copy link
Member

Choose a reason for hiding this comment

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

This is half right: you scroll to right when opening.
But if I close, although it selects the one all the way to the left (which is fine), it doesn't scroll to the left.
I suggest listening on editorControl for a close event and doing scrollToLeft() if possible.

Signed-off-by: aarora4 <lazyc78@gmail.com>
Signed-off-by: aarora4 <lazyc78@gmail.com>
return;
}

this.componentRef.directiveRef.scrollToElement(`.tabs-file-list > li:nth-child(${i + 1})`);
Copy link
Member

Choose a reason for hiding this comment

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

I have a new problem with this branch: I can't scroll my list (though my list can be auto-scrolled by closing & opening), and am having trouble clicking to change tabs for some tabs near the left or right sides.
I think it's this line of code, but not certain. Basically, you only would want to auto-scroll if there has been a change in the quantity, but here it's just after view check, which I believe could be for a different reason.

Signed-off-by: aarora4 <lazyc78@gmail.com>
Copy link
Member

@1000TurquoisePogs 1000TurquoisePogs left a comment

Choose a reason for hiding this comment

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

OK, with latest fixes this seems good!

@1000TurquoisePogs 1000TurquoisePogs changed the base branch from staging to feature/staging-int July 15, 2019 16:46
@1000TurquoisePogs 1000TurquoisePogs merged commit 2b58770 into zowe:feature/staging-int Jul 15, 2019
@NolanRogers NolanRogers added this to the 1.4.0 milestone Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants