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

8345348: CSS Media Queries #1655

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

Conversation

mstr2
Copy link
Collaborator

@mstr2 mstr2 commented Dec 2, 2024

Implementation of CSS media queries.


Progress

  • Change must not contain extraneous whitespace
  • Change requires a CSR request matching fixVersion jfx24 to be approved (needs to be created)
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)

Issue

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1655

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 2, 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 Dec 2, 2024

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

* @defaultValue {@link Platform.Preferences#getColorScheme()}
* @since 24
*/
private final ObjectProperty<ColorScheme> colorScheme = new MediaProperty<>(
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible for two different scenes to have different color schemes or any other properties derived from the platform preferences?

would it make more sense to use the platform preferences properties directly?

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 think we need a way for applications to override the OS preferences. Most applications that offer light and dark themes also allow users to switch between them independently from the OS. The advantage of allowing Scene to override those properties is that an application can mix and match light and dark themes (so to answer your question: yes, different scenes can have different color schemes).

This might be useful for stylistic or compatibility reasons. For example, an application might use third-party UI components in tool windows that don't work well with a dark theme (maybe even Swing content), so these windows would use a color scheme that is different from the main window.

mstr2 added 2 commits December 2, 2024 23:58
# Conflicts:
#	modules/javafx.graphics/src/main/java/com/sun/javafx/application/preferences/PlatformPreferences.java
@mstr2 mstr2 changed the title CSS Media Queries 8345348: CSS Media Queries Dec 2, 2024
@mstr2 mstr2 marked this pull request as ready for review December 2, 2024 23:31
@mstr2
Copy link
Collaborator Author

mstr2 commented Dec 2, 2024

/reviewers 2 reviewer
/csr

@openjdk openjdk bot added the rfr Ready for review label Dec 2, 2024
@openjdk
Copy link

openjdk bot commented Dec 2, 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 2 Reviewers).

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

openjdk bot commented Dec 2, 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-8345348 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@mlbridge
Copy link

mlbridge bot commented Dec 2, 2024

Webrevs

@kevinrushforth kevinrushforth self-requested a review December 13, 2024 18:20
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.

2 participants