Copilot commented on code in PR #8590:
URL: https://github.com/apache/texera/pull/8590#discussion_r4044685946
##########
frontend/src/app/workspace/component/power-button/computing-unit-selection.component.scss:
##########
@@ -205,10 +205,12 @@
.warehouse-dropdown-button {
display: inline-flex;
align-items: center;
- min-width: 220px;
- max-width: 280px;
- // The gap between this picker and the computing-unit one that follows it;
- // the computing-unit trigger has none because nothing follows it.
+ // One width for both pickers. Sized to content between a min and a max, they
+ // came out different — this one short ("Warehouse"), the computing-unit one
+ // long — which reads as a mistake when they sit side by side.
+ width: 240px;
Review Comment:
This fixed-width change, together with the avatar resizing below, visibly
changes both toolbar pickers, but the PR provides no before/after image of the
resulting layout. Please add side-by-side screenshots or a GIF as required for
visible frontend changes by `AGENTS.md:212-215`; the text-width measurements do
not show the new picker dimensions or toolbar fit.
##########
frontend/src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts:
##########
@@ -1579,9 +1579,29 @@ describe("PowerButtonComponent", () => {
});
describe("status helpers", () => {
+ it("the trigger's tooltip names the picker, the unit and its status", ()
=> {
+ // Two pickers sit side by side showing nothing but a name, and the
+ // trigger ellipsises that name at 220px: one tooltip carries all of it,
+ // rather than one on the badge and another on the name.
+ expect(component.computingUnitButtonTooltip).toBe("Computing Unit");
+
+ component.selectedComputingUnit = makeComputingUnit({
+ name: "a-very-long-unit-name-that-truncates",
+ status: "Running",
+ });
+ expect(component.computingUnitButtonTooltip).toBe(
+ "Computing Unit: a-very-long-unit-name-that-truncates (Running)"
+ );
+
+ component.selectedComputingUnit = makeComputingUnit({ name: "cu",
status: "Pending" });
+ expect(component.computingUnitButtonTooltip).toBe("Computing Unit: cu
(Pending)");
+ });
Review Comment:
This test only exercises the getter, so it would still pass if the new
`nz-tooltip` binding were removed or if a nested tooltip were reintroduced.
Since the user-visible behavior is specifically one tooltip on the trigger,
please verify the directive on `.computing-units-dropdown-button` and the
absence of tooltip directives on the name and badge, following the warehouse
test below.
--
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]