-
Notifications
You must be signed in to change notification settings - Fork 13
Attach disk modal + ModalForm
#2746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Nice. Would like to see at least one existing one converted to see how much fiddliness we're saving. Don't necessarily need to convert them all, but it's probably not too hard. |
* calling code. We could do that internally with `cloneElement` instead, but | ||
* then in the calling code, the field would not infer `TFieldValues` and | ||
* constrain the `name` prop to paths in the values object. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment has been wrong for two years 😁
variant="info" | ||
content="Once an image has been promoted it is visible to all projects in a silo" | ||
/> | ||
</ModalForm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty satisfying. Feels a lot harder to mess up.
2cbd293
to
f591a2b
Compare
e708c9f
to
1cecbcc
Compare
Yeah I tried without
Hmm, it does on the side pane also but less obvious because its not sticking out. Since it automatically focuses the first input and focusing options the listbox. Not sure what the solution is here? Perhaps it shouldn't be opening on focus, and instead if the user presses a key when its focused (or clicks ofc). Should explore this further. |
…console into attach-disk-modal
<ModalForm | ||
form={form} | ||
onDismiss={onDismiss} | ||
submitLabel="Attach floating IP" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to think about our approach to labels here? As in do we use the full version as it is, or just use the verb for. Aka "attach", "create", "save"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just the verb, otherwise it's too long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought I like the nouns. I'll try this as Attach IP
to make it shorter.
</form> | ||
</Modal.Section> | ||
</Modal.Body> | ||
<Modal.Footer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the SideModelForm
and FullPageForm
we let the user pass in the buttons directly. This way is more foolproof, but maybe worth considering unifying our approach.
This would be a departure from the side modal – and I think it's generally helpful to hit the first input on open. Might be worth prodding at the listbox to see if there's a way we can require input or the user to press enter to open? |
Thinking of this behaviour: |
Oh, very good point. So we are using the https://headlessui.com/react/combobox#opening-the-dropdown-on-focus console/app/ui/lib/Combobox.tsx Lines 149 to 159 in 1d8c3b7
Turning it off produces the below behavior. The options don't show on focus — they only show up when you either type something or click the button. Not sure how I feel about it. I might just be used to the current behavior. It probably says something that 2025-04-18-listbox-non-immediate.mp4 |
Yeah, it feels kinda sad to me to click on a combobox and not see the things listed, and it doesn't feel very intuitive that you have to start typing when you might not know what you're looking for. Clicking the button doesn't feel that intuitive either. Between that and the things being open by default, I think I would choose the latter. You should try it — all you have to do is comment out |
oxidecomputer/console@99a1f00...46e244f * [46e244fd](oxidecomputer/console@46e244fd) oxidecomputer/console#2818 * [9811a9c7](oxidecomputer/console@9811a9c7) element=null on root redirect route to silence warnings * [b8e9f385](oxidecomputer/console@b8e9f385) oxidecomputer/console#2821 * [f097ec96](oxidecomputer/console@f097ec96) oxidecomputer/console#2819 * [585fe913](oxidecomputer/console@585fe913) oxidecomputer/console#2815 * [973d332a](oxidecomputer/console@973d332a) oxidecomputer/console#2817 * [ad61a081](oxidecomputer/console@ad61a081) oxidecomputer/console#2816 * [239e34b9](oxidecomputer/console@239e34b9) oxidecomputer/console#2806 * [376f172f](oxidecomputer/console@376f172f) oxidecomputer/console#2805 * [5c7c8b5b](oxidecomputer/console@5c7c8b5b) oxidecomputer/console#2746 * [1d8c3b76](oxidecomputer/console@1d8c3b76) bump playwright, use more cores to run e2es locally * [f493cb35](oxidecomputer/console@f493cb35) oxidecomputer/console#2772 * [819b99a6](oxidecomputer/console@819b99a6) chore: type error after RR 7.5. this is why we make PRs * [c1134cff](oxidecomputer/console@c1134cff) chore: react-router 7.5.0 * [c1f0d78b](oxidecomputer/console@c1f0d78b) chore: vite 6.3.0 + vitest 3.1.1 * [79c6bc53](oxidecomputer/console@79c6bc53) oxidecomputer/console#2803 * [f454f5ee](oxidecomputer/console@f454f5ee) oxidecomputer/console#2804 * [ccfa5a58](oxidecomputer/console@ccfa5a58) fix deploy-dogfood script when used with a tag * [6196fa48](oxidecomputer/console@6196fa48) invalidate anti-affinity group member lists on instance action success
oxidecomputer/console@99a1f00...46e244f * [46e244fd](oxidecomputer/console@46e244fd) oxidecomputer/console#2818 * [9811a9c7](oxidecomputer/console@9811a9c7) element=null on root redirect route to silence warnings * [b8e9f385](oxidecomputer/console@b8e9f385) oxidecomputer/console#2821 * [f097ec96](oxidecomputer/console@f097ec96) oxidecomputer/console#2819 * [585fe913](oxidecomputer/console@585fe913) oxidecomputer/console#2815 * [973d332a](oxidecomputer/console@973d332a) oxidecomputer/console#2817 * [ad61a081](oxidecomputer/console@ad61a081) oxidecomputer/console#2816 * [239e34b9](oxidecomputer/console@239e34b9) oxidecomputer/console#2806 * [376f172f](oxidecomputer/console@376f172f) oxidecomputer/console#2805 * [5c7c8b5b](oxidecomputer/console@5c7c8b5b) oxidecomputer/console#2746 * [1d8c3b76](oxidecomputer/console@1d8c3b76) bump playwright, use more cores to run e2es locally * [f493cb35](oxidecomputer/console@f493cb35) oxidecomputer/console#2772 * [819b99a6](oxidecomputer/console@819b99a6) chore: type error after RR 7.5. this is why we make PRs * [c1134cff](oxidecomputer/console@c1134cff) chore: react-router 7.5.0 * [c1f0d78b](oxidecomputer/console@c1f0d78b) chore: vite 6.3.0 + vitest 3.1.1 * [79c6bc53](oxidecomputer/console@79c6bc53) oxidecomputer/console#2803 * [f454f5ee](oxidecomputer/console@f454f5ee) oxidecomputer/console#2804 * [ccfa5a58](oxidecomputer/console@ccfa5a58) fix deploy-dogfood script when used with a tag * [6196fa48](oxidecomputer/console@6196fa48) invalidate anti-affinity group member lists on instance action success
Attach disk has only one item, would work better as a regular modal. This does that and adds a complementary
ModalForm
component to match theSideModalForm
.