Closed mvollmer closed 1 month ago
This looks a bit sad, retrying for comparison.
Yay for the new pixel test!
Very cool, thanks! Looks good, just needs the new pixel test mopped up.
This still needs a proper release note, but otherwise looks good to land. Thanks!
Completely move the short ID name to the background
I'm not a fan of this TBH. The name which we currently display is the one you'd see in virsh list
, use on the CLI, etc. I find the whole concept of adding yet another name a bit dubious TBH -- it's rather obscure, feels like "too much human-y fiddling" and redundant. libvirt calls this "title", which sounds even worse than "full name" to me at least.
I was screptical about this already, and @garrett 's comments pushed me over the line. How about we entirely drop this title/full name again, and only retain the optional description? That seems marginally more useful to me, and isn't so much "in your face" and redundant.
only retain the optional description?
Makes sense to me.
@garrett's design also makes a lot of sense to me. :-)
only retain the optional description?
Makes sense to me.
But does it then make sense to use the Rename dialog to set the description?
Good point -- dang, looks like this is back to square one wrt. design then? :cry:
That said, while "Rename" is not very discoverable, it saves the need for yet another kebab menu entry and dialog. Perhaps changing it to "Rename/Describe"?
That said, while "Rename" is not very discoverable, it saves the need for yet another kebab menu entry and dialog. Perhaps changing it to "Rename/Describe"?
To have both in one string, we'd probably want something like "Edit name and description" instead.
To handle descriptions in the table, we can either have a column that shows up when there is a description in any VM (and not there if there is none), like this:
Or we can make it optional but in the name field, as some subtext, like this:
As horizontal space is usually a premium and it doesn't make sense to be able to sort on the description (the table should be sortable, but isn't — however, this is a different topic), it probably doesn't make sense to have it in its own column. Adding it below is probably the best option here.
What do you think?
Agreed about not showing it in a separate column -- the PR also doesn't do that. It's currently shown in the VM details page (see screenshot in description). TBH I'd leave it out from the overview list -- it can be arbitrarily long (it's multi-line), and is a fringe case. I could imagine an (i) icon with a popup in the description though, that doesn't break the layout.
Sure, keeping it the description in the details page only can make sense... but then we shouldn't have an action to change it on the list. That's an either/or thing. We already have a way to edit it on the details page — where you can see it.
So I guess that means there's nothing left of this PR we want to go in, and just want to keep the status quo? (Unless I'm missing something.)
virt-xml --metadata --update
doesn't work and thus we can't update the description of a running VM. But that seems unmotivated, it's just some text without connection to anything involved in actually running the VM.
But virt-xml
can change the "offline", "stale", "persistent", whateverthisiscalled XML definition. We should probably read the description from that, and not from the "online", "running" XML.
We should probably read the description from that, and not from the "online", "running" XML.
Done. (It's called the "inactive" definition.)
This failure is a new flake... let's see.
This failure is a new flake... let's see.
One apparently can't ever use set_val
with React components. Fixed by using set_input_text. It can in fact create multiple lines, but one has to use "\r" instead of "\n".
@vollmer: Please don't use \r
and \n
in set_input_text()
or b.input_text()
any more, this isn't portable across browsers. Use b.key("Enter")
or similar.
@vollmer: Please don't use
\r
and\n
inset_input_text()
orb.input_text()
any more, this isn't portable across browsers. Useb.key("Enter")
or similar.
Hmm, can we make it so that set_input_text("\n") does the right thing? I'll make a PR.
@vollmer: Please don't use
\r
and\n
inset_input_text()
orb.input_text()
any more, this isn't portable across browsers. Useb.key("Enter")
or similar.Hmm, can we make it so that set_input_text("\n") does the right thing? I'll make a PR.
The test now dioes this:
b.set_input_text("#edit-description-dialog-description", desc1, value_check=False, blur=False)
b.key("Enter")
b.set_input_text("#edit-description-dialog-description", desc2, value_check=False, append=True)
b.wait_val("#edit-description-dialog-description", desc1 + "\n" + desc2)
It would be really nice to replace that with
b.set_input_text("#edit-description-dialog-description", desc1 + "\n" + desc2)
Not only because it is less to type, but also because this is the natural first thing to try, and it is not at all obvious what to do once you figure out that it doesn't work.
Whoops, dropped the ball on this, sorry. Let's get this back on track.
based on the discussion above, this PR leaves "title" and "id" alone. It is only about the description now.
The description of a VM is shown on the details page, and there is an action in the menu to edit it. The description of this PR is up-to-date with the code.
We were not able to find or create Copr project packit/cockpit-project-cockpit-machines-1644
specified in the config with the following error:
Packit received HTTP 500 Internal Server Error from Copr Service. Check the Copr status page: https://copr.fedorainfracloud.org/status/stats/, or ask for help in Fedora Build System matrix channel: https://matrix.to/#/#buildsys:fedoraproject.org.
Unless the HTTP status code above is >= 500, please check your configuration for:
@
)
Based on work by @Britz, thanks a lot!
This is also a proving ground for robust and convenient virt-xml invocations. I plan to renovate the rest of domain.js and other files accordingly.
The description is a
<p>
so that it doesn't get too shouty when people put a lot of text there."Edit description" action:
Machines: Support for VM descriptions
Cockpit can now show and change the descriptions of virtual machines.