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

8252236: TabPane: must keep header of selected tab visible #300

Closed
wants to merge 3 commits into from

Conversation

@kleopatra
Copy link
Collaborator

@kleopatra kleopatra commented Sep 10, 2020

the issue is that the header of the selected tab is not always visible (or kept visible, see report for details)

  • initially
  • after changing side
  • after resizing stage/tabPane
  • after modifying the list of tabs

Fixed in TabPaneSkin to notify its TabHeaderArea (== collaborator that is responsible for layout the tabs) whenever its scroll might need an update.

Added tests that fail before and pass after the fix.

Note that there still are issues while/after dragging, which are separated into JDK-8253352


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8252236: TabPane: must keep header of selected tab visible

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jfx pull/300/head:pull/300
$ git checkout pull/300

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 10, 2020

👋 Welcome back fastegal! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Sep 10, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 10, 2020

Webrevs

@kevinrushforth kevinrushforth requested review from kevinrushforth and arapte Sep 10, 2020
@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Sep 10, 2020

/reviewers 2

@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2020

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@arapte
Copy link
Member

@arapte arapte commented Sep 14, 2020

In a bid to find more scenarios like you did mention description, I observed two more scenarios when selected tab does not stay in view.

  1. Inserting tabs before or removing tabs after selected tab or moving the selected tab, causes the selected tab to go out of view.
  2. Rotating TabPane can also take the selected tab out of view. I am little doubtful if it a legitimate issue. The rotations I tried clipped TabPane and TabPane header.
    I think rotation issue can be kept out of scope of this issue, can be filed as a follow on. I leave to it to you to take a call.

About 1, I did quickly verify that it gets fixed by adding invalidateScrollOffset(); call in TabHeaderArea.removeTab(), TabHeaderArea.addTab() and TabHeaderArea.moveTab().
Also If we fix it here, then bug summary might need a change. It currently reflects only initial tab.

@kleopatra
Copy link
Collaborator Author

@kleopatra kleopatra commented Sep 14, 2020

good catch and many thanks for the evaluation - now all I'll have to do is to write tests to catch them :) Will also update the bug summary as you suggest.

Agree, that the second can be regarded as off scope, as it seems to effect both header and content - will not do anything in this fix.

@kleopatra kleopatra changed the title 8252236: TabPane - initial select tab not working properly 8252236: TabPane: must keep header of selected tab visible Sep 18, 2020
@kleopatra
Copy link
Collaborator Author

@kleopatra kleopatra commented Sep 18, 2020

Widened scope of the issue to include problems after modifying the list of tabs: added fix and tests.

Separated dragging issues into a new bug (there's an unrelated isssue when dragging over the leading edge, fixing that might have effects on the trailing edge, so didn't do much to fix the issue/s on the latter except ensuring the visibility after drop).

Copy link
Member

@arapte arapte left a comment

Looks good to me, left a minor comment.

@arapte
arapte approved these changes Sep 24, 2020
Copy link
Member

@arapte arapte left a comment

Looks good to me.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

The fix looks good. Thanks for the additional, well-documented tests!

@openjdk
Copy link

@openjdk openjdk bot commented Oct 2, 2020

@kleopatra This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for more details.

After integration, the commit message for the final commit will be:

8252236: TabPane: must keep header of selected tab visible

Reviewed-by: arapte, kcr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 8 new commits pushed to the master branch:

  • 77a183e: 8209788: Left/Right/Ctrl+A keys not working in editor of ComboBox if popup showing
  • d10f948: 8252811: The list of cells in a VirtualFlow is cleared every time the number of items changes
  • 47e67b4: 8253123: Switch FX build to use JDK 15 as boot JDK
  • 13ab2cb: 8252446: Screen.getScreens() is empty sometimes
  • b2e2000: 8252546: Move ObservableValue's equality check and lazy evaluation descriptions to @implSpec
  • 976a763: 8240499: Enforce whitespace checking for additional source files
  • d6dee34: 8252547: Correct transformations docs in Node
  • 0514116: 8246745: ListCell/Skin: misbehavior on switching skin

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Oct 2, 2020
@kleopatra
Copy link
Collaborator Author

@kleopatra kleopatra commented Oct 3, 2020

/integrate

@openjdk openjdk bot closed this Oct 3, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Oct 3, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Oct 3, 2020

@kleopatra Since your change was applied there have been 8 commits pushed to the master branch:

  • 77a183e: 8209788: Left/Right/Ctrl+A keys not working in editor of ComboBox if popup showing
  • d10f948: 8252811: The list of cells in a VirtualFlow is cleared every time the number of items changes
  • 47e67b4: 8253123: Switch FX build to use JDK 15 as boot JDK
  • 13ab2cb: 8252446: Screen.getScreens() is empty sometimes
  • b2e2000: 8252546: Move ObservableValue's equality check and lazy evaluation descriptions to @implSpec
  • 976a763: 8240499: Enforce whitespace checking for additional source files
  • d6dee34: 8252547: Correct transformations docs in Node
  • 0514116: 8246745: ListCell/Skin: misbehavior on switching skin

Your commit was automatically rebased without conflicts.

Pushed as commit 5b42b64.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@kleopatra kleopatra deleted the kleopatra:bug-fix-8252236 branch Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants