Fix relationship picker styles and improve grid sizing

This commit is contained in:
Andrew Kingston 2024-04-25 08:34:33 +01:00
parent 238b43a59a
commit 54621b1539
3 changed files with 6 additions and 14 deletions

View File

@ -75,14 +75,12 @@
.relationship-container { .relationship-container {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 20px; gap: var(--spacing-m);
} }
.relationship-part { .relationship-part {
flex-basis: 70%; flex: 1 1 auto;
} }
.relationship-type { .relationship-type {
flex-basis: 30%; flex: 0 0 128px;
} }
</style> </style>

View File

@ -46,7 +46,6 @@
let open = false let open = false
let editIsOpen = false let editIsOpen = false
let timeout let timeout
let popover
let migrationModal let migrationModal
let searchValue let searchValue
let input let input
@ -104,11 +103,6 @@
dispatch("edit-column", column.schema) dispatch("edit-column", column.schema)
} }
const cancelEdit = () => {
popover.hide()
editIsOpen = false
}
const onMouseDown = e => { const onMouseDown = e => {
if (e.button === 0 && orderable) { if (e.button === 0 && orderable) {
timeout = setTimeout(() => { timeout = setTimeout(() => {
@ -234,7 +228,7 @@
} }
const debouncedUpdateFilter = debounce(updateFilter, 250) const debouncedUpdateFilter = debounce(updateFilter, 250)
onMount(() => subscribe("close-edit-column", cancelEdit)) onMount(() => subscribe("close-edit-column", close))
</script> </script>
<Modal bind:this={migrationModal}> <Modal bind:this={migrationModal}>
@ -476,7 +470,7 @@
} }
.content { .content {
width: 300px; width: 360px;
padding: 20px; padding: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -10,7 +10,7 @@ export const DefaultRowHeight = SmallRowHeight
export const NewRowID = "new" export const NewRowID = "new"
export const BlankRowID = "blank" export const BlankRowID = "blank"
export const RowPageSize = 100 export const RowPageSize = 100
export const FocusedCellMinOffset = 48 export const FocusedCellMinOffset = ScrollBarSize * 3
export const ControlsHeight = 50 export const ControlsHeight = 50
// Popovers // Popovers