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

8343336: Add persistentScrollBars preference #1618

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mstr2
Copy link
Collaborator

@mstr2 mstr2 commented Oct 31, 2024

This PR adds another accessibility preference that is available on all supported desktop platforms:

  1. Windows: Settings -> Accessibility -> Visual Effects -> Always show scroll bars
  2. macOS: System Settings -> Appearance -> Show scroll bars
  3. Ubuntu: Settings -> Accessibility -> Seeing -> Always show scroll bars

When the OS setting is changed, all platforms report updates that can be observed in JavaFX.
The manual test application test/manual/events/PlatformPreferencesChangedTest can be used to test the feature.

/reviewers 2
/csr


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8343451 to be approved
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issues

  • JDK-8343336: Add persistentScrollBars preference (Enhancement - P4)
  • JDK-8343451: Add persistentScrollBars preference (CSR)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1618/head:pull/1618
$ git checkout pull/1618

Update a local copy of the PR:
$ git checkout pull/1618
$ git pull https://git.openjdk.org/jfx.git pull/1618/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1618

View PR using the GUI difftool:
$ git pr show -t 1618

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1618.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 31, 2024

👋 Welcome back mstrauss! 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
Copy link

openjdk bot commented Oct 31, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Ready for review label Oct 31, 2024
@openjdk
Copy link

openjdk bot commented Oct 31, 2024

@mstr2
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot added the csr Need approved CSR to integrate pull request label Oct 31, 2024
@openjdk
Copy link

openjdk bot commented Oct 31, 2024

@mstr2 has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@mstr2 please create a CSR request for issue JDK-8343336 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@mlbridge
Copy link

mlbridge bot commented Oct 31, 2024

Webrevs

@andy-goryachev-oracle
Copy link
Contributor

This looks like a useful data point.

I am curious as to what are the criteria for including or excluding a particular preference? What is our long term goal - should we support all the preferences available on a particular platform, or the intersection, or what? May be it's something to discuss first on the mailing list.

@mstr2
Copy link
Collaborator Author

mstr2 commented Oct 31, 2024

My thinking is that a particular preference should be useful and almost universally supported on the desktop platforms to make it into JavaFX API. The number of preferences we might consider are pretty limited, so I don't expect Platform.Preferences to explode in size and scope.

I think this is a minor addition that doesn't change anything substantial about Platform.Preferences, and as such doesn't need a major discussion since the arguments are basically the same since the introduction of platform preferences. However, if you or others are interested in having a discussion, we can of course do that.

@mstr2 mstr2 changed the title 8343336: Add reducedScrollBars preference 8343336: Add persistentScrollBars preference Oct 31, 2024
@mstr2
Copy link
Collaborator Author

mstr2 commented Oct 31, 2024

Changed the naming from reducedScrollBars to persistentScrollBars, as this matches the logic of the OS settings more closely.

@kevinrushforth
Copy link
Member

My thinking is that a particular preference should be useful and almost universally supported on the desktop platforms to make it into JavaFX API.

This seems like the right criteria to me.

The number of preferences we might consider are pretty limited, so I don't expect Platform.Preferences to explode in size and scope.

Good.

I think this is a minor addition that doesn't change anything substantial about Platform.Preferences, and as such doesn't need a major discussion since the arguments are basically the same since the introduction of platform preferences. However, if you or others are interested in having a discussion, we can of course do that.

With this explanation, I agree.

@kevinrushforth
Copy link
Member

Reviewers: @andy-goryachev-oracle @lukostyra

(I'll look over the public API and the CSR)

* @defaultValue {@code false}
* @since 24
*/
ReadOnlyBooleanProperty persistentScrollBarsProperty();
Copy link
Member

Choose a reason for hiding this comment

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

Do you also plan to add new platform-specific preferences or do you think this is unnecessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added the respective platform-specific keys to the Preferences documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csr Need approved CSR to integrate pull request rfr Ready for review
Development

Successfully merging this pull request may close these issues.

3 participants