Before this commit some top option buttons were badly positioned
(see Carousel options).
task-2312878
closesodoo/odoo#56353
X-original-commit: 196c2e72ba5b212eccd2bba7ad33c870e0a40c70
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Now any set of widgets and rows can be placed in a we-collapse element
so that those elements can be foldable. The first element inside (or
the mentioned "string" on the we-collapse element itself) is used as the
always shown element (with a toggler on its left to toggle the
visibility of the other items).
we-collapse inside other we-collapse is supported as well.
Limitations / Other infos:
- The use of '⌙' and   characters is not automatic (yet?).
Sometimes it actually make sense to use them without a we-collapse or
to not use them in a we-collapse.
- The use of we-collapse is limited to widgets inside the same option.
So unfortunately, there is no current way to add all bg image options
in a folable section as those contain many different options. Maybe
in the future.
Part of https://github.com/odoo/odoo/pull/56350closesodoo/odoo#56352
X-original-commit: d9c450ac97de40c71aebd487cff725bfda6a577b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
It was already working but not perfectly aligned.
Part of https://github.com/odoo/odoo/pull/56350
X-original-commit: 95239e523b194777b58e8dd9a409a93404b44c6d
Because of the way browsers render SVGs as background images, background
SVGs will sometimes not perfectly hug the top or bottom of their
containers because of rounding in the calculation of the width from the
height, or height from the width.
This commit fixes a number of the shapes displaying this behaviour, by
making their viewbox a perfect square, this means that whenever the
width or height of the SVG is determined by the brower, it will use the
same number for the height or width respectively because the aspect
ratio is exactly one, rather than using the closest integer
approximation of the aspect ratio, which causes those artifacts.
task-2319484
closesodoo/odoo#56200
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit adds webgl image filter to the existing image options,
including a custom filter that lets the user access color-correction
options (saturation, brightness, contrast, sepia, ...) as well as
blending modes for color filters.
Part of https://github.com/odoo/odoo/pull/53114
task-2279190
closesodoo/odoo#53114
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When compositing filters, it is often the case that you only want to
partially apply a filter. This commit adds an optional "amount"
parameter to the colorMatrix filter, and computes a weighted average
between the identity matrix and the passed in colorMatrix. This
parameter defaults to 1, meaning the effect is applied in full if no
amount is specified.
This is a change in the webgl-image-filter library, currently awaiting
merge into upstream at https://github.com/phoboslab/WebGLImageFilter/pull/25
Part of https://github.com/odoo/odoo/pull/53114
task-2279190
This commit adds a trash icon on the snippet overlay to delete the
snippet without using the left panel button.
task-2314805
closesodoo/odoo#55612
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
11px was set as default font-size when achieving 5 or 6 edition levels
in the sidebar was the norm. Thanks to the snippet's cleanup, resulting
in a reduced number of editable elements, we can now increase the
default fon-size and, consequentially, all general spacings.
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
*: website
Since [1], the thumbnails of the saved snippets were not right anymore,
all fallbacking to the default image. This is because snippets thumbs
now use svg files instead of png and the snippet saving feature did not
allow it. This commit fixes that and makes the feature more robust.
- Allow to use any original thumbnail, and not only for website app.
- Remove useless defaut image, a fallback for when the feature is broken
is useless.
- Identify snippets by key instead of by main class (possible since
the new `data-snippet` attribute on snippets).
[1]: https://github.com/odoo/odoo/commit/b7fe2bdae2f45372c0d538767a226a413b806f3fclosesodoo/odoo#55896
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, all the data-oe-* attributes were removed from
the snippet panel on editor loading. Some were actually added then
removed by the same function... probably for historic reasons. All of
this is now useless, this commit takes also the opportunity to modernize
that all code section and removes other code which was there for
compatibility reasons too.
Now, the data-oe-* on snippets thumbs are kept (as some will actually
be used by upcoming commits). This commit just makes sure no data-oe-*
is left on the snippet bodies themselves.
Part of https://github.com/odoo/odoo/pull/55272
task-2309832
*: web_editor, website_blog
Unfortunately, this feature revealed a new batch of flaws in the
editor widgets system so some hacks were made to make it work. We will
always have the time to improve the pure technical side later.
This commit also separates the notion of color filter from the notion
of parallax. A color filter can now be applied independantly, when
there is either a background image or a background video. Applying a
color filter on top of a background video is actually a new feature.
Applying a color filter on top of a background image is actually now
achievable by two different ways: this new color filter layer or by
applying the color transformation on the image itself via the related
option. Depending on the user case, both could make sense at the same
time, but more importantly: having a CSS color filter is useful for
using those for default Odoo content (e.g. like the current contact us
page where we use a cover banner with an image with a black filter on
top of it: doing that without CSS color filter would mean to alter the
image directly which would not be ok when the user changes the image).
Also, sometimes you want the unfiltered image on a page and the exact
same one but filtered on another (for example: forum images).
Note: this commit also "fixes" an issue: the optimization feature for
images when parallax was enabled was not available before.
Part of https://github.com/odoo/odoo/pull/47313
task-46147
Since v13, snippet's thumbs are rendered as background images using the
't-snippet' instruction.
This code was kept for back-compatibility.
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
This commit adds a new snippet option allowing the user to choose one of
a series of SVG shapes as their background, or to be overlaid over the
background image of a snippet and to customize the colors of those
shapes.
Part of https://github.com/odoo/odoo/pull/53017
task-2210790
closesodoo/odoo#53017
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website_blog
Previously, background colors, images, and videos could all be applied
on the same section, such that the image can be used as a fallback for
the video, and the color as a fallback for the image. However, if you
wanted to change the background color behind the background image, the
background image would be removed. The background image and background
video also shared the same widget to pick the image or video.
This commit adds a background-type toggler, where the user can toggle
the background color, image and video individually. It also makes the
video picker into its own UserValueWidget, such that the user can pick
both an image and video without overriding the other.
Part of https://github.com/odoo/odoo/pull/53017
task-2210790
Before this commit, the enabled state of we-button element was a
"pressed-like" background + a check icon. This check icon was then
explicitely removed for we-button extension such as checkboxes and
button groups' buttons. Now, the enabled state does not contains that
check icon by default and it is explicitely added for selects' buttons.
Part of https://github.com/odoo/odoo/pull/53017
task-2210790
Before this commit, the 'snippet_option_update' event was triggered
whether or not it was a preview update. In the preview update case,
nothing was done, ever. This commit removes the preview notification.
If it ever becomes useful, it can be restored at that moment.
This commit actually solves a bug introduced by [1]: that snippet update
notification is now triggered after a setTimeout delay to allow events
to bubble before the UI update it will trigger (in non preview mode).
The side effect this had was that, between each preview, the execution
chain was deferred of a setTimeout delay between each step (even though
previews do not update the UI). This was enough to allow for a paint
refresh.
So before this commit, if option C was selected, then the user hovered
option A then option B, the option C was visually re-enabled between A
and B. This won't be the case anymore after this commit.
Long story short: restore no-flickering when previewing options.
[1]: https://github.com/odoo/odoo/commit/2616c8950fd615561e720660bcc39e018f4061e4
Part of https://github.com/odoo/odoo/pull/55588closesodoo/odoo#55588
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website
Before this commit, editor widgets were updated by 3 successive calls
to methods 'setValue', 'updateUI' and '_updateUI'. The last two were
in charge of updating the UI depending of the value that was set, only
in specific condition (like "if the widget is not focused", "or not
previewed", ...).
This is now in fact useless: 'setValue' can be in charge of the UI
update. Indeed, when a value is set on a widget there is no reason to
not update its UI anymore. This was useful when the UI was updated on
preview, which is not the case anymore. This could also be useful for
widget with multiple options attached to them... but in those rare cases
updating the UI multiple times (one time per option method) should not
be a problem.
Part of https://github.com/odoo/odoo/pull/55588
*: web_editor
This will more probably change again in the future but this is a first
step towards a hierarchized 'options' tab for the editor panel.
Part of https://github.com/odoo/odoo/pull/55529
Commit [1] introduced a flickering when any modal was opened on the
frontend. Indeed, it introduced the possibility to go into "fullscreen"
mode, which makes the Odoo UI navbar and sidebar disappear. This is
animated: the padding of the `<body/>` element is using a CSS
transition... but when a Bootstrap modal opens, the padding-right is
changed to compensate the scrollbar removal. This change now being
animated, it creates a flickering.
A generic solution was made: only animate what is animated for the
duration of the fullscreen mode switch.
[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660closesodoo/odoo#55210
X-original-commit: ccadb20c82a651e9ef87e818b898f3e9a081cacd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Previously, you could only add a tag on a blog post from the backend.
Here we're adding a way to add them from the left-panel so that it's
easier for the user to add them.
The long term goal will not be to reimplement complex view of the
backend. This is actually already past the limit: we will need a way
to instantiate views from the backend in the frontend in the future.
Part of https://github.com/odoo/odoo/pull/52759
task-2267693
closesodoo/odoo#52759
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>