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

Fix z-order for text field/area placeholder #615

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Conversation

rock3r
Copy link
Collaborator

@rock3r rock3r commented Sep 30, 2024

This changes the order in which the placeholder and actual text field are laid out in the TextField and TextArea code. Since the two have the same zIndex (the default value, 0f) their placement order is reflected in the drawing order: the last placed is drawn last, on top of the rest.

This fixes a minor cosmetic issue, where the placeholder would be drawn on top of the cursor when the TextArea/TextField is empty.

Fixes #610

This changes the order in which the placeholder and actual text field
are laid out in the TextField and TextArea code. Since the two have the
same zIndex (the default value, 0f) their placement order is reflected
in the drawing order: the last placed is drawn last, on top of the rest.

This fixes a minor cosmetic issue, where the placeholder would be drawn
on top of the cursor when the TextArea/TextField is empty.
@rock3r rock3r added the consistency Our UI presentation is not consistent with IJ label Sep 30, 2024
@rock3r rock3r requested a review from hamen September 30, 2024 09:42
@rock3r rock3r self-assigned this Sep 30, 2024
@rock3r rock3r enabled auto-merge (squash) September 30, 2024 09:43
@rock3r rock3r merged commit 6c1317e into main Sep 30, 2024
1 check passed
@rock3r rock3r deleted the cursor-goes-in-front branch September 30, 2024 10:00
@kateliu20
Copy link

Thank you!!

@rock3r
Copy link
Collaborator Author

rock3r commented Sep 30, 2024

You're welcome 🤗 it's available in 0.25

@kateliu20
Copy link

Is jewel 0.25 compatible with IJ 241? Just want to make sure.

github-merge-queue bot pushed a commit to slackhq/foundry that referenced this pull request Sep 30, 2024
I had an issue with the placeholder being in front of the cursor text
and spoke with Sebastiano from Jewel about it. He ended up filing this
issue: JetBrains/jewel#610 which got resolved
here JetBrains/jewel#615, which is available in
Jewel 0.25. This passes checks and the text area looks nicer now:
Before:
<img width="331" alt="Screenshot 2024-09-30 at 4 13 06 PM"
src="https://github.com/user-attachments/assets/9827ece9-07f5-4e08-a599-b9dcb2232e05">

After:
<img width="331" alt="Screenshot 2024-09-30 at 4 13 35 PM"
src="https://github.com/user-attachments/assets/027a0ed4-b681-4428-a028-5370ccc35579">

<!--

  ⬆ Put your description above this! ⬆

  Please be descriptive and detailed.
  
Please read our [Contributing
Guidelines](https://github.com/tinyspeck/foundry/blob/main/.github/CONTRIBUTING.md)
and [Code of Conduct](https://slackhq.github.io/code-of-conduct).

Don't worry about deleting this, it's not visible in the PR!
-->
@rock3r
Copy link
Collaborator Author

rock3r commented Sep 30, 2024

Yes. Just make sure you use the -241 artefacts.

The supported IJP versions table in the readme is up to date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consistency Our UI presentation is not consistent with IJ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InputField — placeholder should be drawn behind cursor
3 participants