-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: right align bottom buttons with forms across app [WD-7985] #594
Conversation
Demo starting at https://lxd-ui-594.demos.haus |
3428809
to
7f788a2
Compare
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.
It looks so much better now with consistent width!
Some ideas to simplify below.
35d18f1
to
0bef354
Compare
0bef354
to
30452ad
Compare
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.
Found two problems with narrow screens. And a third one, but that might be nasty and can be done as a follow up as well.
- The profile selector for instances should not be full width. The up/down/remove buttons should be next to the profiles, see below comparison:
- The secondary form navigation should be scrollable, when on a small screen. To make all the form screens accessible on small screens.
- One last bit, but feel free to ignore it for a future ticket if out of scope. As this was inconsistent before. The scrollbar for the form content is sometimes on the very right of the page and sometimes in the middle at the content end. I think having the scroller in the middle is preferred. It is inconsistent mostly on the "main" form pages, and on the disk selector for instances.
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.
Maybe shorten the name to FormFooter
?
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.
- For the profile selector, I can revert to spacing from before. The buttons will align to the outer edge of the form so it still looks good. I also noticed that on really narrow screen size, even from before the arrows show above and below the selector. This is due to the arrows having fixed width regardless of the screen size. Maybe we should consider a different design for small screen sizes?
- For the secondary form navigation, the current behaviour is caused by me removing the overflow css to keep the side navigation static. It's pretty tricky to get buttons aligned perfectly when the side navigation dynamically grows due to it being a scrollable container. I have adjusted css so that the buttons align mostly with the right edge of the form, but it's not perfect. Have a look on the demo server and let me know if it's okay? Alternatively, it might be possible to introduce a empty div right next to the footer container to mimic the behaviour of the side navigation so that the actual footer can be fixed width, but it would introduce non-semantic elements and might be tricky to get the div behave just like the side navigation.
- For the inconsistent scrollbar issue, I think we should create a
ScrollableForm
component similar to theScrollableTable
component where it dynamically updates height attributes of the document body. I will create a ticket and circle back on this one later. - I think naming it
FormFooterLayout
indicates clearly that it is a wrapper instead of a self-sufficient component?
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.
- For the profile selector, I can revert to spacing from before. The buttons will align to the outer edge of the form so it still looks good. I also noticed that on really narrow screen size, even from before the arrows show above and below the selector. This is due to the arrows having fixed width regardless of the screen size. Maybe we should consider a different design for small screen sizes?
I think this is fine now.
I can look into it in a follow-up to improve it for smaller screens.
- For the secondary form navigation, the current behaviour is caused by me removing the overflow css to keep the side navigation static. It's pretty tricky to get buttons aligned perfectly when the side navigation dynamically grows due to it being a scrollable container. I have adjusted css so that the buttons align mostly with the right edge of the form, but it's not perfect. Have a look on the demo server and let me know if it's okay? Alternatively, it might be possible to introduce a empty div right next to the footer container to mimic the behaviour of the side navigation so that the actual footer can be fixed width, but it would introduce non-semantic elements and might be tricky to get the div behave just like the side navigation.
I don't fully understand. It seems to be working fine now, doesn't it? From your description it sounds like scrollbar-gutter: stable might solve the issue as it reserves space for the scrollbar even if it is not rendered.
- For the inconsistent scrollbar issue, I think we should create a
ScrollableForm
component similar to theScrollableTable
component where it dynamically updates height attributes of the document body. I will create a ticket and circle back on this one later.
Yeah, that is a good idea, let's keep it as is for now then.
- I think naming it
FormFooterLayout
indicates clearly that it is a wrapper instead of a self-sufficient component?
Sounds right.
30452ad
to
92aac9c
Compare
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.
Code and QA looks good, thanks for improving this 👍
92aac9c
to
4ce3f53
Compare
- aligned instnace creation and edit forms - aligned profile creation and edit forms - aligned project creation and edit forms - aligned network creation and edit forms - aligned storage pool creation and edit forms - aligned storage volume creation and edit forms Signed-off-by: Mason Hu <mason.hu@canonical.com>
- NOTE: had to remove styling from .form-navigation css class selector to make the side menus on forms not dynamically grow - aligned buttons for instance creation and edit forms - aligned buttons for profile creation and edit forms - aligned buttons for network creation and edit forms - aligned buttons for project creation and edit forms - aligned buttons for storage pool creation and edit forms - aligned buttons for storage volume creation and edit forms Signed-off-by: Mason Hu <mason.hu@canonical.com>
4ce3f53
to
f81145a
Compare
Done
QA
Screenshots
Example