-
Notifications
You must be signed in to change notification settings - Fork 55
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(images): Implement design for image table MAASENG-4360 #5628
feat(images): Implement design for image table MAASENG-4360 #5628
Conversation
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.
Looks good! However, there is an easy miss in the design, where when aligning the "Release title" to the left, the other column headers chould not move, as in all column headers should be left-aligned properly.

Managing to shift the second header as the same amount as the width of the now display: none
.select
should align all headers correctly.
@abuyukyi101198 I tried to just shift the second header "Architecture" but it didn't shift the rest of them, so I did it this way. |
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.
The alignment seems to shift in later headers. CSS may not be enough to fix the alignment.
th:not(.release):not(.group-select) { | ||
padding-left: 2rem; | ||
} |
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.
Since this is a generic component, we cannot directly refer to image-specific classes like .release
. It seems that the alignment is not solvable with pure CSS. Maybe we can add an empty th
element after the first visible header programmatically. I'm not a huge fan of this solution, but CSS just doesn't seem to work.
In GenericTable.tsx
:
<DynamicTable className="p-generic-table" variant={variant}>
<thead>
{table.getHeaderGroups().map((headerGroup) => (
<tr key={headerGroup.id}>
{headerGroup.headers.filter(filterHeaders).map((header, index) => (
<>
<TableHeader header={header} key={header.id} />
{index === 2 ? <th className="select-alignment" /> : null} <-- add this aligner th
</>
))}
</tr>
))}
</thead>
And in GenricTable/_index.scss
:
.group-select,
.select,
.select-alignment { <-- add select-alignment
width: 2rem;
}
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.
LGTM!
Done
QA steps
Fixes
Resolves MAASENG-4360
Screenshots