Skip to content
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

Fixed align of Delete buttons for Disks #553

Merged
merged 1 commit into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/VmDisks/VmDisk.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,17 @@ class VmDisk extends React.PureComponent {

return (
<li>
<span id={`${idPrefix}`}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not remove id attributes, they are referenced from Selenium tests

<span className={style['vmdisk-item-info']} id={`${idPrefix}`}>
{name}
&nbsp;
{capacityInfo}
{bootable}
{inactive}
&nbsp;
</span>
<span className={style['vmdisk-item-delete']}>
{deleteButton}
{deletionConfirmationDialog}
</span>
{deletionConfirmationDialog}
</li>
)
}
Expand Down
21 changes: 21 additions & 0 deletions src/components/VmDisks/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
list-style-type: none;
padding: 0;
margin-bottom: 0px !important;
display: table;
Copy link
Contributor

@jniederm jniederm Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this difficult to read and debug. This actually relies on generation of virtual, DOM invisible, row and tr elements as described at Anonymous table objects css spec. I find it much more clear to openly admit that we are actually creating complete css table and use appropriate display values for li (table-row) and span (table-cell) elements.

}

.smaller {
font-size: 50%;
vertical-align: middle;
margin-left: 0.5em;
display: inline-block;
}

.light {
Expand All @@ -27,3 +29,22 @@
font-size: small;
cursor: pointer;
}

.disks-list li {
display: table-row;
}

.disks-list li > span {
display: table-cell;
}

.vmdisk-item-info > *:last-child {
margin-right: 5px;
}

.vmdisk-item-delete {
vertical-align: middle;
}
.vmdisk-item-delete button {
display: block;
}