Skip to content

Commit

Permalink
fix: remove duplicate classes
Browse files Browse the repository at this point in the history
  • Loading branch information
dulnan committed Nov 12, 2024
1 parent f74f5a4 commit b79c2b9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
5 changes: 0 additions & 5 deletions css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,6 @@ html {
}
}

.bk-field-list {
position: relative;
min-height: 30px;
}

.bk .bk-blokkli-item-label {
@apply flex items-center text-mono-700 text-left;
> div {
Expand Down
1 change: 0 additions & 1 deletion src/runtime/components/BlokkliField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
:class="[
attrs.class,
{
'bk-field-list': canEdit && !isNested && !isPreview,
[nonEmptyClass]: filteredList.length,
},
listClass,
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/Edit/DraggableList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
>
<div
ref="root"
class="bk-field-list-proxy-list bk-draggable-list-container bk-field-list"
class="bk-field-list-proxy-list bk-draggable-list-container"
v-bind="fieldAttributes"
>
<BlokkliItem
Expand Down
17 changes: 1 addition & 16 deletions src/runtime/helpers/domProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ export type DomProvider = {
el: Element | EventTarget,
): DraggableExistingBlock | undefined

getAllFields(): BlokkliFieldElement[]

/**
* Return the droppable markup for a draggable item.
*/
Expand Down Expand Up @@ -429,18 +427,6 @@ export default function (ui: UiProvider, debug: DebugProvider): DomProvider {
.filter(falsy)
}

const getAllFields = (): BlokkliFieldElement[] => {
const elements = [...document.querySelectorAll('.bk-field-list')]

return elements
.map((element) => {
if (element instanceof HTMLElement) {
return buildFieldElement(element)
}
})
.filter(falsy)
}

const getDropElementMarkup = (
item: DraggableItem,
checkSize?: boolean,
Expand All @@ -466,7 +452,7 @@ export default function (ui: UiProvider, debug: DebugProvider): DomProvider {
if (!block) {
throw new Error('Block does not exist: ' + uuid)
}
const el = block.element().closest('.bk-field-list')
const el = block.element().closest('.bk-draggable-list-container')
if (!(el instanceof HTMLElement)) {
throw new TypeError('Failed to locate field element for block: ' + uuid)
}
Expand Down Expand Up @@ -701,7 +687,6 @@ export default function (ui: UiProvider, debug: DebugProvider): DomProvider {
findBlock,
getAllBlocks,
findClosestBlock,
getAllFields,
getDropElementMarkup,
getBlockField,
findField,
Expand Down

0 comments on commit b79c2b9

Please sign in to comment.