roshiiiz opened a new pull request, #6263:
URL: https://github.com/apache/texera/pull/6263
<!--
Thanks for sending a pull request (PR)! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
[Contributing to
Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
2. Ensure you have added or run the appropriate tests for your PR
3. If the PR is work in progress, mark it a draft on GitHub.
4. Please write your PR title to summarize what this PR proposes, we
are following Conventional Commits style for PR titles as well.
5. Be sure to keep the PR description updated to reflect all changes.
-->
### What changes were proposed in this PR?
This PR fixes a UI rendering issue with the JVM Memory slider in the
computing unit creation modals. Because the slider steps are non-linear (2, 4,
128, 256), the UI component was previously spacing them proportionally, causing
the tick marks to clump together awkwardly. This PR ensures the steps are
spaced evenly across the slider while correctly displaying the actual Gigabyte
sizes in the hover tooltip.
**Changes made:**
- Updated `computing-unit.util.ts` to map the JVM memory sizes to sequential
indices (0, 1, 2, 3...) to force perfect, even spacing across the slider
component.
- Added a `jvmMemoryTipFormatter` function in
`user-computing-unit.component.ts` and `computing-unit-selection.component.ts`
to dynamically translate the raw slider index back into the literal memory
string (e.g., "256G") for the tooltip.
- Adjusted the `[nzMin]` and `[nzMax]` properties and bound the
`[nzTipFormatter]` in the corresponding `.html` templates for both the
Workspace and User Dashboard computing unit modals.
### Any related issues, documentation, discussions?
Issue##3375
### How was this PR tested?
Tested manually in a local development environment:
- Booted the local dashboard and backend via `docker-compose`.
- Opened the "Create Computing Unit" modal in both the User Dashboard and
the Workspace "Power Button" dropdown.
- Switched the Computing Unit type to "Kubernetes" to display the JVM memory
slider.
- Interacted with the slider and verified that the spacing is perfectly
distributed, and the black tooltip correctly displays the literal memory size
(2G, 4G, 128G, 256G) when hovering/clicking.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity (DeepMind)
**Before:**
<img width="1600" height="786" alt="WhatsApp Image 2026-07-08 at 05 07 27"
src="https://github.com/user-attachments/assets/d73dcc23-5111-4301-9155-e4a90c1ead08"
/>
**After**
<img width="1918" height="942" alt="Issue 3375"
src="https://github.com/user-attachments/assets/3ace999b-87d1-4608-8d66-eb7a7f5e29b3"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]