LibraryPanels: Increase max description length to 2048 chars (#46601)

This commit is contained in:
kay delaney 2022-03-24 12:14:56 +00:00 committed by GitHub
parent 9bf82c37e3
commit 8329cd59f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -54,4 +54,8 @@ func addLibraryElementsMigrations(mg *migrator.Migrator) {
mg.AddMigration("add unique index library_element org_id_uid", migrator.NewAddIndexMigration(libraryElementsV1, &migrator.Index{
Cols: []string{"org_id", "uid"}, Type: migrator.UniqueIndex,
}))
mg.AddMigration("increase max description length to 2048", migrator.NewTableCharsetMigration("library_element", []*migrator.Column{
{Name: "description", Type: migrator.DB_NVarchar, Length: 2048, Nullable: false},
}))
}

View File

@ -60,6 +60,7 @@ export const PanelTypeCard: React.FC<Props> = ({
e.stopPropagation();
onDelete();
}}
className={styles.deleteButton}
aria-label="Delete button on panel type card"
/>
)}
@ -94,8 +95,8 @@ const getStyles = (theme: GrafanaTheme2) => {
}
`,
itemContent: css`
overflow: hidden;
position: relative;
width: 100%;
padding: ${theme.spacing(0, 1)};
`,
current: css`
@ -117,12 +118,14 @@ const getStyles = (theme: GrafanaTheme2) => {
width: 100%;
`,
description: css`
display: block;
text-overflow: ellipsis;
overflow: hidden;
color: ${theme.colors.text.secondary};
font-size: ${theme.typography.bodySmall.fontSize};
font-weight: ${theme.typography.fontWeightLight};
width: 100%;
max-height: 4.5em;
`,
img: css`
max-height: 38px;
@ -133,6 +136,9 @@ const getStyles = (theme: GrafanaTheme2) => {
badge: css`
background: ${theme.colors.background.primary};
`,
deleteButton: css`
margin-left: auto;
`,
};
};