As mass_mailing will soon use the `html_builder` instead of the legacy editor,
some useful options currently exclusive to `website` can be moved to be globally
available.
task-4247642
closesodoo/design-themes#1133
X-original-commit: ff3b83713f
Related: odoo/odoo#224122
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
Co-authored-by: Damien Abeloos <abd@odoo.com>
Co-authored-by: Thomas Josse <thjo@odoo.com>
*: theme_artists, theme_buzzy, theme_nano
Before, the timeline (*) dots were invisible when using preset 4
because they shared the same color as the background (`text-o-color-1`
on `o-color-1` background).
The fix in the relative PR implements a solution that ensures dots are
always visible by using button primary colors for all presets.
Thus, this commit adapts xpath to ensure compatibility with the changes.
task-4922302
closesodoo/design-themes#1126
Related: odoo/odoo#221505
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The testing suite tests, among other things, that a s_xxx_yyy class can
only be used on a sub-element (or the same element) of a s_xxx one (or
being on the root element, as being the name of the snippet).
This commit now also allows s_something_xxx (so prefixing instead of
suffixing) when on the same element. E.g. "s_newsletter_benefits_popup"
alongside the "s_popup" class for the new "s_newsletter_benefits_popup"
snippet.
Related to task-4306887
Part of task-4077427
closesodoo/design-themes#1130
Related: odoo/odoo#186820
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit whitelists dynamic snippet layout classes in the themes test
for blog posts and events. These layouts are now individually accessible
via the snippet selection dialog, with a separate snippet available for
each layout.
This commit also updates conflicting padding class rules to allow
combinations like `p-size(i) p[s|e|t|...]-size(j)` in snippets, while
still preventing invalid combinations such as `p-size(i) p-size(j)`.
task-4280375
closesodoo/design-themes#1127
Related: odoo/odoo#190514
Related: odoo/enterprise#75556
Signed-off-by: Serge Bayet (seba) <seba@odoo.com>
* theme_artists, theme_avantgarde, theme_beauty, theme_bistro, theme_buzzy,
theme_clean, theme_graphene, theme_kea, theme_kiddo, theme_monglia,
theme_nano, theme_odoo_experts, theme_orchid, theme_real_estate,
theme_treehouse, theme_vehicle, theme_zap
**Problem**
Some snippets contain shapes whose ID starts with `web_editor` instead of
`html_builder`. These IDs are not listed in imageShapeDefinitions [1], and
this generates a traceback when trying to apply shape tranformations.
**How to reproduce**
1. Insert the snippet `s_images_constellation`
2. Click on the bottom left image having the "Double Pill" shape
3. Click on any "Transform" button under the "Shape" row in the "Image" section
4. Problem: traceback pops up
**Solution**
This commit replaces `web_editor` with `html_builder` in themes.
See also the changes made to snippets [2] and the migration script [3].
[1] addons/html_builder/static/src/plugins/image/image_shapes_definition.js
[2] https://github.com/odoo/odoo/pull/218837
[3] https://github.com/odoo/upgrade/pull/8076
task-4367641
closesodoo/design-themes#1117
Related: odoo/odoo#218837
Related: odoo/enterprise#90482
Related: odoo/upgrade#8076
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This commit replaces pixel (`px`) values with `rem` units. Using `px`
was causing issues with some SCSS calculations, specifically the
checkbox roundness computation that we implemented in the community
counterpart of this branch.
task-4643128
closesodoo/design-themes#1113
Related: odoo/odoo#216826
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: theme_anelusia, theme_artists, theme_avantgarde, theme_beauty,
theme_buzzy, theme_clean, theme_kea, theme_kiddo, theme_monglia,
theme_odoo_experts, theme_orchid, theme_real_estate,
theme_test_custo, theme_vehicle, theme_zap
When `html_builder` was introduced, some data attributes related to
images have changed. Unfortunately, the attributes on static data were
not adapted accordingly. Because of this, both namings might appear in
this version.
This commit migrates images and background images attributes to use
the new attributes.
Dataset changes:
- copy `originalId` to `attachmentId`
- rename `originalMimetype` to `formatMimetype`
task-4367641
closesodoo/design-themes#1112
Related: odoo/odoo#218348
Related: odoo/enterprise#89768
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This commit switches the default image format from JPEG to WebP for all
design-themes images. WebP offers superior compression compared to JPEG,
resulting in smaller file sizes and faster website loading times.
Additionally, this change helps avoid warnings from performance tools
regarding image optimization.
See also: odoo/odoo#168862
task-3167548
closesodoo/design-themes#805
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since [this commit], the website builder has been rewritten. Due to it,
`we-` options are deprecated. This commit adapts all the `xpath` to old
options into the new way of doing. This commit also adapts the
`theme_menu_hierarchies` tour for it to work with the new builder.
[this commit]: https://github.com/odoo/odoo/commit/9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2
Related to task-4367641
runbot-223813
runbot-223815
closesodoo/design-themes#1087
Related: odoo/odoo#211725
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Scenario:
- install theme_cobalt or theme_paptic
- go to a website blog post
- put a word in bold
Result: the bold is not shown bolder than the text
Issue: Inter font in theme_cobalt and theme_paptic loads weights 400,
600 and 800. The blog post normal font weight is 300 since 2019 (in
odoo/odoo@bb0cdec459) and so both normal
font-weight and bold inside it are shown with weight 400 which make bold
not differentiated.
Fix: add 300 weight to Inter font.
Note: in 18.0, Inter font already has weight 300 in theme_odoo_experts,
theme_enark, theme_vehicle, theme_bookstore, theme_nano, theme_clean and
website but it is still missing for cobalt and paptic themes.
opw-4818737
closesodoo/design-themes#1094
X-original-commit: 55ddb9fea8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The "Test" key is unnecessary in the tour registry, as it has already been
removed from the Tour Schema (see PR[1]). Also, refactor the tour
definitions to follow the updated step structure.
[1]:https://github.com/odoo/odoo/pull/182887
task-4702436
closesodoo/design-themes#1086
X-original-commit: 0295bf1567
Signed-off-by: Serge Bayet (seba) <seba@odoo.com>
When running the test test_website_theme_preview, we have the following error:
`tour.steps has to be a function that returns TourStep[]`
runbot-111646
runbot-163139
closesodoo/design-themes#1069
X-original-commit: a3eb65d3ea
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The test was incorrectly flagging inner classes that follow our naming
convention (e.g. "s_floating_blocks_wrapper" for "s_floating_blocks"
snippet). This made maintaining the whitelist tedious and error prone.
The change enables proper enforcement of our conventions while
simplifying whitelist maintenance: a snippet subclass starting with "s_"
should be prefixed by the main snippet class name (e.g.
"s_super_snippet_item" might be added on an inner element of
"s_super_snippet"). The test just checks any element class is
prefixed by any class of any parent (or itself) (for "s_" classes).
Related to task-4373543
closesodoo/design-themes#1054
Related: odoo/odoo#189299
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This allows more flexibility on the use of `align-self-*-*` classes
combination to better handle responsiveness in some scenario.
Related to task-4373543
Part-of: odoo/design-themes#1054
Related: odoo/odoo#189299
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: theme_artists, theme_buzzy, theme_loftspace, theme_yes
The community "s_features" snippet for a specific new page template was
broken (missing all its classes). This commit adapts the related
themes overrides following the fix of that snippet (note that these
overrides were also broken by themselves).
Related to task-4373543
Part-of: odoo/design-themes#1054
Related: odoo/odoo#189299
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The snippet was switched to grid mode in this theme but the padding
classes on columns were not removed.
Related to task-4373543
Part-of: odoo/design-themes#1054
Related: odoo/odoo#189299
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: artists, cobalt, enark, graphene, kea, kiddo, loftspace, monglia, nano,
notes, odoo_experts, orchid, paptic, real_estate, vehicle, yes
Steps to reproduce:
1. Enable a second language in the website (e.g., French).
2. Add a "Text" block (in edit mode) > Save the page.
3. Translate a text paragraph to french > Save.
4. In edit mode again, add a link to a word in the paragraph > Save.
5. The translation in French is lost, and sometimes the whole French
translation is used for the text before or after the link.
This is actually a limitation in the translation implementation. If we
initially have `text_1_en text_2_en text_3_en` translated to French this
way:
terms en_US: `["text_1_en text_2_en text_3_en"]`
terms fr_BE: `["text_1_fr text_2_fr text_3_fr"]`
After adding a link: `text_1_en<a...>text_2_en</a>text_3_en`, and since
the links are not translated as a whole, we should get:
terms en_US: `["text_1_en", "text_2_en", "text_3_en"]`
terms fr_BE: `["text_1_fr text_2_fr text_3_fr"]`
Which means the current translation will be lost, and the result will
depend on the outcome of `get_close_matches()`. Which explains why when
the link is added to the first words of the paragraph, the system still
maps the rest of the paragraph to its "full old translation".
The goal of this commit is to make this behavior less aggressive by
forcing the links added in paragraphs [1] to be translated as a whole.
This way, the `get_close_matches()` will map the new content with a link
to its old translation (without a link), and then, the user can set the
link in the "the most meaningful part of the translation" in the
translate mode.
[1]: We should use the "translate as a whole" feature carefully with
links, since there are already some situations where it's causing
issues (see the fix in [2]). So we only force them inside paragraphs.
[2]: https://github.com/odoo/odoo/commit/9bd60ca93510e410a0136b8b433f596330900593
Remark: This commit also sets the `o_translate_inline` class by default
on paragraph links in website templates.
opw-3984439
closesodoo/design-themes#1055
Related: odoo/odoo#204453
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
*: theme_bewise, theme_cobalt, theme_kiddo, theme_loftspace,
theme_monglia, theme_nano, theme_notes, theme_odoo_experts,
theme_orchid, theme_paptic, theme_yes, theme_zap
Multiple snippet template where changed to ensure that the title is not
considered as a column and allowing changing the nb of columns again.
This commit adapts all the xpath that were impacted by those changes.
task-4310468
closesodoo/design-themes#1047
Related: odoo/odoo#195409
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The author field was made required by the previous commit, this commit
add the missing field in all manifests.
The upgrade-code script `18.2-01-manifest-author.py` was used. See
related community branch (same commit title).
task-4485983
closesodoo/design-themes#1044
Related: odoo/odoo#196408
Related: odoo/enterprise#78513
Related: odoo/documentation#11956
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
The `o_cc3` is rendering a white color depending on the the palette.
Using `o_cc5` ensure a white text on most palettes.
task-4381722
closesodoo/design-themes#1021
Signed-off-by: Christopher du Toit (chto) <chto@odoo.com>
*: artists, nano, notes, vehicle
This commit adapt the occurrences of the `s_form_aside` snippet across
themes.
task-4135499
part of task-4077427
closesodoo/design-themes#1007
Related: odoo/odoo#184094
Signed-off-by: Ivan Klapka (ivkl) <ivkl@odoo.com>
*: anelusia, artists, avantgarde, aviato, beauty, bewise, bistro,
bookstore, buzzy, clean, cobalt, enark, graphene, kea, kiddo, loftspace,
monglia, nano, notes, odoo_experts, orchid, paptic, real_estate,
treehouse, vehicle, yes, zap
This commit aims to fix a wrong implementation of gradients on the
`s_big_number` snippet within the context of the web editor.
Prior to this commit, the `s_big_number` snippet was using a gradient
composed of the right color, but being declared as `RGB` values.
While this is working as expected and looking like it uses the right
`--o-color-*`, it's indeed working with the specific color applied in
first place. If a user changes the color palette of the website, the
snippet will look terrible as it doesn't adapt to the new palette.
This commit fixes the issue by using the right implementation with CSS
variables.
It also reviews a wrong structure using `<div>` while it should use the
right html tag.
task-4202371
closesodoo/design-themes#930
Related: odoo/odoo#180983
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
theme_anelusia, theme_artists, theme_buzzy, theme_nano, theme_yes
This commit adapt the `s_timeline_images` snippet to the themes.
task-4105285
Part of task-4077427
closesodoo/design-themes#995
Related: odoo/odoo#184760
Signed-off-by: Ivan Klapka (ivkl) <ivkl@odoo.com>