This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new 85c4b0ca5d feat: show MiB unit label next to size-based admin settings
inputs (#5066)
85c4b0ca5d is described below
commit 85c4b0ca5d6fc0b79275df9e1756b05303bba76c
Author: Xuan Gu <[email protected]>
AuthorDate: Thu May 28 13:45:22 2026 -0700
feat: show MiB unit label next to size-based admin settings inputs (#5066)
<!--
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?
<!--
Please clarify what changes you are proposing. The purpose of this
section
is to outline the changes. Here are some tips for you:
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
3. If it is a refactoring, clarify what has been changed.
3. It would be helpful to include a before-and-after comparison using
screenshots or GIFs.
4. Please consider writing useful notes for better and faster reviews.
-->
This PR adds an inline `MiB` unit label next to the size-based input
boxes in the Admin Settings page, so the unit is visible at a glance
without reading the help text below.
Demo:
<img width="985" height="440" alt="unit-added"
src="https://github.com/user-attachments/assets/71dd3629-8389-4e23-867f-89d9b21f9c09"
/>
### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned
already.
1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves
#1234`
or `Closes #1234`. If it is only related, simply mention the issue
number.
2. If there is design documentation, please add the link.
3. If there is a discussion in the mailing list, please add the link.
-->
Closes #5065
### How was this PR tested?
<!--
If tests were added, say they were added here. Or simply mention that if
the PR
is tested with existing test cases. Make sure to include/update test
cases that
check the changes thoroughly including negative and positive cases if
possible.
If it was tested in a way different from regular unit tests, please
clarify how
you tested step by step, ideally copy and paste-able, so that other
reviewers can
test and check, and descendants can verify in the future. If tests were
not added,
please describe why they were not added and/or why it was difficult to
add.
-->
Manually tested.
### Was this PR authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this
PR,
please include the phrase: 'Generated-by: ' followed by the name of the
tool
and its version. If no, write 'No'.
Please refer to the [ASF Generative Tooling
Guidance](https://www.apache.org/legal/generative-tooling.html) for
details.
-->
Generated-by: Claude Opus 4.7
---------
Co-authored-by: Meng Wang <[email protected]>
---
.../admin/settings/admin-settings.component.html | 34 +++++++++++++---------
.../admin/settings/admin-settings.component.scss | 11 +++++++
.../settings/admin-settings.component.spec.ts | 8 +++++
3 files changed, 39 insertions(+), 14 deletions(-)
diff --git
a/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.html
b/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.html
index 01ab1e4ceb..fd2fea7f75 100644
---
a/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.html
+++
b/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.html
@@ -290,13 +290,16 @@
<div class="settings-row">
<span>File Size:</span>
- <nz-input-number
- [(ngModel)]="maxFileSizeMiB"
- [nzMin]="1"
- [nzMax]="MAX_FILE_SIZE_MiB"
- [nzStep]="10"
- [nzPrecision]="0">
- </nz-input-number>
+ <div class="input-with-unit">
+ <nz-input-number
+ [(ngModel)]="maxFileSizeMiB"
+ [nzMin]="1"
+ [nzMax]="MAX_FILE_SIZE_MiB"
+ [nzStep]="10"
+ [nzPrecision]="0">
+ </nz-input-number>
+ <span class="unit">MiB</span>
+ </div>
</div>
<div class="help-text-number">
Maximum size allowed for individual file uploads. Range: 1 MiB - {{
MAX_FILE_SIZE_MiB | number }} MiB (5 TiB).
@@ -319,13 +322,16 @@
<div class="settings-row">
<span>Part Size:</span>
- <nz-input-number
- [(ngModel)]="chunkSizeMiB"
- [nzMin]="MIN_PART_SIZE_MiB"
- [nzMax]="MAX_PART_SIZE_MiB"
- [nzStep]="10"
- [nzPrecision]="0">
- </nz-input-number>
+ <div class="input-with-unit">
+ <nz-input-number
+ [(ngModel)]="chunkSizeMiB"
+ [nzMin]="MIN_PART_SIZE_MiB"
+ [nzMax]="MAX_PART_SIZE_MiB"
+ [nzStep]="10"
+ [nzPrecision]="0">
+ </nz-input-number>
+ <span class="unit">MiB</span>
+ </div>
</div>
<div class="help-text-number">
Size of each chunk during multipart upload. Range: {{ MIN_PART_SIZE_MiB }}
MiB - {{ MAX_PART_SIZE_MiB | number }}
diff --git
a/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.scss
b/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.scss
index a5d3b4a878..a33ba37317 100644
---
a/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.scss
+++
b/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.scss
@@ -91,6 +91,17 @@ details[open] .arrow {
margin-bottom: 4px;
}
+.input-with-unit {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+}
+
+.input-with-unit .unit {
+ color: #8c8c8c;
+ font-size: 13px;
+}
+
.help-text-number {
margin-left: 140px;
font-size: 12px;
diff --git
a/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.spec.ts
b/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.spec.ts
index ab4744d3cb..7217fe6f9a 100644
---
a/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.spec.ts
+++
b/frontend/src/app/dashboard/component/admin/settings/admin-settings.component.spec.ts
@@ -41,4 +41,12 @@ describe("AdminSettingsComponent", () => {
it("should create", () => {
expect(component).toBeTruthy();
});
+
+ it("renders MiB unit beside both size-based inputs", () => {
+ const units = fixture.nativeElement.querySelectorAll(".input-with-unit
.unit");
+ expect(units.length).toBe(2);
+ units.forEach((el: HTMLElement) => {
+ expect(el.textContent?.trim()).toBe("MiB");
+ });
+ });
});