rusackas commented on a change in pull request #15853:
URL: https://github.com/apache/superset/pull/15853#discussion_r677833335
##########
File path: superset-frontend/src/views/CRUD/utils.tsx
##########
@@ -271,32 +268,37 @@ export function shortenSQL(sql: string, maxLines: number)
{
return lines.join('\n');
}
+export const PAGE_SIZE = 5;
+
const breakpoints = [576, 768, 992, 1200];
export const mq = breakpoints.map(bp => `@media (max-width: ${bp}px)`);
-export const CardContainer = styled.div`
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(31%, 31%));
- ${mq[3]} {
- grid-template-columns: repeat(auto-fit, minmax(31%, 31%));
- }
- ${mq[2]} {
- grid-template-columns: repeat(auto-fit, minmax(48%, 48%));
- }
- ${mq[1]} {
- grid-template-columns: repeat(auto-fit, minmax(50%, 80%));
- }
- grid-gap: ${({ theme }) => theme.gridUnit * 8}px;
- justify-content: left;
- padding: ${({ theme }) => theme.gridUnit * 6}px;
- padding-top: ${({ theme }) => theme.gridUnit * 2}px;
+export const CardContainer = styled.div<{
+ showThumbnails?: boolean | undefined;
+}>`
+ ${({ showThumbnails, theme }) => `
+ overflow: hidden;
+ display: grid;
+ grid-gap: ${theme.gridUnit * 12}px ${theme.gridUnit * 5.5}px;
+ grid-template-columns: repeat(auto-fit, 300px);
+ max-height: ${showThumbnails ? '314' : '140'}px;
+ margin-top: ${theme.gridUnit * -6.25}px;
+ padding: ${
+ showThumbnails
+ ? `${theme.gridUnit * 8.75}px ${theme.gridUnit * 9}px`
+ : `${theme.gridUnit * 8.25}px ${theme.gridUnit * 9}px`
+ };
+ `}
`;
export const CardStyles = styled.div`
cursor: pointer;
a {
text-decoration: none;
}
+ .ant-card-cover > div {
+ height: 168px;
Review comment:
```suggestion
/* Height is calculated based on 300px width, to keep the same aspect
ratio as the 800*450 thumbnails */
height: 168px;
```
... a comment might be useful to explain where the value comes from here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]