Skip to content

Do not open the option containers after dropping a snippet + Fix and improve the drag and drop from right panel and dropzones + on snippet preview resource + ImageSnippet option #4259

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

Merged
merged 4 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions addons/html_builder/static/src/core/builder_options_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class BuilderOptionsPlugin extends Plugin {
clean_for_save_handlers: this.cleanForSave.bind(this),
post_undo_handlers: this.restoreContainer.bind(this),
post_redo_handlers: this.restoreContainer.bind(this),
on_add_element_handlers: ({ elementToAdd }) => this.setTarget(elementToAdd),
};

setup() {
Expand Down Expand Up @@ -154,10 +153,6 @@ export class BuilderOptionsPlugin extends Plugin {
return this.computeContainers(this.editable.querySelector("main"));
}

setTarget(target) {
this.target = target;
}

getContainers() {
return this.lastContainers;
}
Expand Down
29 changes: 28 additions & 1 deletion addons/html_builder/static/src/core/drop_zone_plugin.inside.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
height: 10px;
background: $o-we-dropzone-bg-color;
animation: dropZoneInsert 1s linear 0s infinite alternate;
z-index: 2000;

&.oe_insert {
position: relative;
width: 100%;
border-radius: $border-radius-lg;
outline: $o-we-dropzone-border-width dashed $o-we-dropzone-accent-color;
outline-offset: -$o-we-dropzone-border-width;
z-index: 2000; // TODO use $o-we-overlay-zindex instead
}

&.o_dropzone_highlighted {
Expand All @@ -32,4 +32,31 @@
margin: 0 (-$o-we-dropzone-size/2);
}
}

&.oe_sanitized_drop_zone {
position: absolute;
top: 0px;
height: 100%;
padding: 15px;
margin: 0px;
backdrop-filter: blur(15px);
background-color: rgba($o-we-bg-lighter, 0.15);
color: white;
outline-color: $o-we-bg-lighter;
z-index: 1999; // TODO

> p {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: calc(100% - 30px);
text-shadow: 0px 0px 4px black;
font-size: 20px;
}
}
}

// TODO for mass_mailing only ?
body.oe_dropzone_active .note-editable {
overflow: hidden;
}
Loading