mengw15 commented on code in PR #8590:
URL: https://github.com/apache/texera/pull/8590#discussion_r4044771626
##########
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:
Fair — it now asserts through the rendered directive: the tooltip on
`.computing-units-dropdown-button` carries the expected title for a long name,
a short one and nothing selected, and both `.unit-name-text[nz-tooltip]` and a
tooltip on the badge are asserted absent. Verified by removing the binding and
by reintroducing the nested tooltip: each makes the test fail.
##########
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:
Added above — before/after of the toolbar and the form view, taken after
these sizing changes: the two pickers at matching width and height, and the gap
between them unchanged while a unit is running.
--
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]