Skip to content
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

Map Option #4164

Open
wants to merge 499 commits into
base: master-mysterious-egg
Choose a base branch
from
Open

Conversation

AlessandroLupo
Copy link

  • Modified html_builder to add the classs "editor_enable" to the body of the document: this is necessary to prevent Google Maps from opening when clicking on the map in edit mode.
  • Moved the css snippet regarding "editor_enable" in a the css file "map_option.inside.scss".
  • Created the files "map_option.js" and "map_option.xml".

robinlej and others added 20 commits February 28, 2025 09:23
Rewrite `AddElementOption` and `SpacingOption` to be compatible with masonry snipet

Implement `AddElementOption` button functionalities
At some point, servers started to return `image/svg+xml; charset=utf-8`
instead of `image/svg+xml` in the `content-type` header of SVG images.
Because of this, dynamic SVGs were not properly handled anymore.

This commit adapts the mimetype comparisons to cope for this extra
`charset` info inside the mimetype.

Steps to reproduce:
- Drop an image block inside a website page.
- Replace the image.
- Search for e.g. "city".
- Pick an undraw illustration.

=> The image was lost because its `src` became `false`.

closes odoo#199112

X-original-commit: e255894
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Before when applying undo/redo the container restored the current
target which is not always the target from the previous steps.

Now we restore the container correctly when applying undo/redo.
To do so, we store the container target on each step.
When an action delete an element which is the current target
of the container, the container will fallback to the ancestor
of the target.

This commit also forbid to update the container when previewing.
Updating the layout of an image gallery replaces
all the images by cloned ones. In consequence we lose the
container selection.

Now when changing layout the image gallery restore the container
selection to the cloned image equivalent to the one that was selected.

The old website fallbacked the selection to the parent
If there is no border, `hasBorder` returns an empty string which
triggers an error on `.match()`.
If you write "0 3 " in a number input, the last space creates an empty
string which causes an error.
Only accept:
- numbers 0-9
- `.` and `,`
- `-` for negative values
- spaces to separate multiple values
@robodoo
Copy link

robodoo commented Mar 6, 2025

This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged.

@AlessandroLupo AlessandroLupo requested a review from robinlej March 7, 2025 13:44
Copy link

@robinlej robinlej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work globally. 👍

I made a few comments.
Not immediately linked to your option, the background option also appears on the snippet, but it shouldn't be the case if I compare with master. Could you check how the selector was filtered out in master and why it isn't now?

Comment on lines 47 to 50
<strong>${_t("Visit us:")}</strong>
<span>${_t(
"Our office is open Monday – Friday 8:30 a.m. – 4:00 p.m."
)}</span>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 things:

  1. The styling isn't right (due to replacing <font> with <strong>)
    image

  2. The styling wasn't even right in master. There was a bug that removed the font and span tags.
    image

This should be the correct styles (except for the background-color, don't mind that):
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed now:
image

@AlessandroLupo AlessandroLupo force-pushed the master-mysterious-egg-1-alup branch from 93166af to 16ba229 Compare March 7, 2025 16:48
@ged-odoo ged-odoo force-pushed the master-mysterious-egg branch from b651514 to 9236e22 Compare March 8, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.