The Masonry snippet has been modified to be only in grid mode
and its templates have therefore been changed.
This commit adapts the themes that modify the Masonry templates to be
in accordance with these changes.
See community counterpart for details.
task-2973198
closesodoo/design-themes#601
X-original-commit: ef84cdf84d
Related: odoo/odoo#102525
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, if a theme wanted to define a main font for their
theme and let the "headings", "navbar" and "buttons" ones use the same
they had to add this in their map:
```
'font': XXX,
'headings-font': null,
'navbar-font': null,
'button-font': null,
```
Indeed, without setting the "null" values, those font would use YYY
which is the first font defined in the theme config, which might be
different from XXX. And if forcing XXX 4 times, like most themes do at
the moment, if the user wanted to change them all, he had to change the
4 ones instead of the main one.
Now, only the 'font' value use the first font defined in the theme
config if not explicitly set. So forcing the null values is not
necessary, it will be the default behavior.
The advantage is thus also functional, as most theme forced all their 4
fonts so changing the main one did not change the others.
task-2993054
closesodoo/design-themes#593
X-original-commit: fc64bce81e
Related: odoo/odoo#101068
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
New test was introduced with [1] but it actually sometimes lead to
timeout errors.
That's a common issue since we merged the frontend in the backend and
some tour (like this one) now have to start both the backend and the
frontend (in the iframe).
10 seconds is not enough to load both, it often miss just half a second.
[1]: https://github.com/odoo/design-themes/commit/0e2497b8e84eab8957028f4d63ff0899a9fe6ab3
runbot-4684
closesodoo/design-themes#587
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit introduces a new theme for tests purpose.
The goal is to be able to create records and simulate a real use case
without only testing through unit tests in python.
For instance, with this commit, we now fully test:
- menu creation
- page creation
- new header & footer template
- new image shape & background shape
This will be extended later to be able to test other stuff too, maybe
like changing the website logo (not supported yet). Also, our existing
standalone test in themes should use this theme instead of nano to not
rely on a real theme that might change.
Courtesy of NMI as this theme is partly based on his job.
closesodoo/design-themes#586
Related: odoo/odoo#99099
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The callstack is:
- _pre_dispatch() (http_routing)
- super()
- _frontend_pre_dispatch()
- super()
- _frontend_pre_dispatch() (website) -> Set the website on request
But in `test_themes` we were forcing the website in a `_pre_dispatch()`
override, after calling `super()`.
It means that the call to `_frontend_pre_dispatch()` was actually done
without having yet forced the website in session. get_current_website()
would then not consider the `fw` param as not yet in session, and the
request.website would be set to 1, the default one.
Later in the business code, there would be a mismatch between
`request.website` and `get_current_website()`.
closesodoo/design-themes#582
Related: odoo/odoo#98200
Related: odoo/enterprise#30691
Related: odoo/upgrade#3808
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Migrate Bootstrap to version 5.1.3
some highlights of BS5 changes:
- Browser support: Internet Explorer is definitely gone (Goodbye! We won't miss you) ; not a huge change on the backend as we didn't supported it anymore anyway.
- Bootstrap's Javascript components doesn't use jQuery anymore! A compatibility layer is present but with some quirks, so avoid to use it if possible ; less jQuery is less overhead!
- The color contrast system in BS5 relies directly on WCAG 2.0 contrast algorithm (https://www.w3.org/TR/WCAG20-TECHS/G18.html). Some visual elements (like texts/buttons/...) may have a slightly different contrast than before.
- Background color classes ('bg-') only set the background color and don't change the foreground (aka. text) color anymore. We backported the '.text-bg-' from Bootstrap 5.2 to restore the previous behavior ; or use separate background ('.bg-') and foreground ('.text-') depending on your usecase.
- Media Breakpoint's usage has changed
- More and more CSS utility classes are introduced: use them in your templates instead of adding more custom CSS rules.
- Bootstrap still provides a quite powerful grid system, but please use it as intended by the framework (I'm looking at you '.col' without its parent '.row'). Also while keeping the same API, it was internally changed ; the main issue that you can encounter is that columns no longer apply 'position: relative', which could be solved by adding the '.position-relative' class when needed.
- BS5 doesn't allow to use multiple components on the same element (ie. adding a tooltip on a dropdown). It generates this kind of error: "Bootstrap doesn't allow more than one instance per element.
- Badge usage has changed a bit: '.badge' still exist but is now extended using utility classes (text and background colors, border-radius for pills) instead of specific '.badge-*' classes.
- '.input-group-{append,prepend}' are gone! You can now just add buttons and '.input-group-text' as direct children of the '.input-group'.
- Popover/alert components' close button use the new class '.btn-close'.
- Dropdown: the '.show' class is not added anymore to the parent group of dropdown ; some CSS selectors may still need some love.
- All data attributes of BS5 are now prefixed by 'bs-' (ie. 'data-toggle' is now 'data-bs-toggle').
Bootstrap documentation
https://getbootstrap.com/docs/5.1/migration
Task ID: 2766483
closesodoo/design-themes#580
Related: odoo/enterprise#29195
Related: odoo/odoo#95450
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
> Media query mixins parameters have changed for a more logical approach
> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).
https://getbootstrap.com/docs/5.1/migration/#sass
Task ID: 2766483
Part-of: odoo/design-themes#580
This commit fixes the previously hardcoded color customisations in theme
Avantgarde's snippets, by using proper color variables, which allow the
snippet customisations to change dynamically.
While theoretically unstable (changing views), this was judged safe
enough for 15.0 (it would require someone to xpath a theme.ir.ui.view in
this specific theme, targeting an inline style to break; and it does not
change the current websites at all (just new dropped snippets)).
closesodoo/design-themes#579
X-original-commit: 65baa9bb4a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit removes the tooltips shown when hovering over a theme in
the website switcher dropdown. This feature will be reimplemented later,
patching the WebsiteSwitcherSystray component.
It also adapts the ?fw= url parameter to force a website id during the
tours.
task-2687506
closesodoo/design-themes#572
Related: odoo/odoo#89223
Related: odoo/enterprise#28448
Related: odoo/upgrade#3464
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Now, `_post_copy()` is only called when the module is installed for the
first time on a website, not when the module is updated.
See counterpart commit in community for more details.
opw-2824045
closesodoo/design-themes#571
X-original-commit: 0e324061d1
Related: odoo/odoo#93109
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit fixes the "Contact" header and the "default" header that
were not displaying correctly (in related themes) in the web editor
panel as expected.
task-2713578
closesodoo/design-themes#557
X-original-commit: f403f252bc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit improves the global layout of theme_odoo_experts to give
more variety with the others corporate themes (buzzy, graphene, clean,
etc.).
The purpose is to have a theme that can be used to present an
application and to promote the new category of device shapes.
task-2666049
closesodoo/design-themes#525
Related: odoo/odoo#79068
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
See [1], `enable_view()` is now in charge of disabling the already possibly
existing template header (and/or footer).
Disabling `website.template_header_default` was not enough, any of the other
template could have been selected by the user before updating the theme.
Note that when installing a theme the first time on a website, the error won't
occur as `_reset_default_config()` will be called through `_theme_remove()`.
[1]: https://github.com/odoo/odoo/pull/81181
Fixes https://github.com/odoo/upgrade/pull/3048
task-2593407
opw-2680866
opw-2685951
opw-2685124
opw-2679040
closesodoo/design-themes#548
X-original-commit: 9a289ea574
Related: odoo/odoo#81953
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit:
- The assets were not enabled or disabled when installing themes because
we searched for assets with the "key" field instead of the "name" field.
- The "Ripple Effect" was not correctly installed on several themes.
Because the variable and the assets were not both activated. Even if the
variable is not used, it is still necessary for the proper functioning
of the option (e.g. _computeWidgetState).
task-2686370
closesodoo/design-themes#546
X-original-commit: 77b2b97f3d
Related: odoo/odoo#81833
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In Safari (14+) the CSS workaround to make block "readable" over any bg
is broken. By replacing the current CSS workaround by an appropriate
SVG filter in each themes svg, the problem will be fixed.
This commit will add the svg filter.
task-2667028
closesodoo/design-themes#538
X-original-commit: 545cf002ea
Related: odoo/odoo#81190
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This is a backport of [1] which at the same time finally enables the
test to be able to test all theme tours. Notice that the tours should
be improved so that each step properly checks that the previous step
actually had an effect (as those tours are normally made to display to
the user and were not designed for testing). However, this is already
really useful as only checking if *entering* edit mode in each theme
does not crash is already covering most issues that can be created when
designing a theme at the moment.
[1]: https://github.com/odoo/design-themes/commit/52fef46388ec880af78c5a5f3e6152c4510548f4closesodoo/design-themes#535
X-original-commit: 208f6134a6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit introduces a redesign of the Kiddo theme.
It also moves 6 svg icons from the "static/src/img/snippets/" to
"static/shapes" to allow the use of the dynamic colors in the Web
Editor.
task-2687297
closesodoo/design-themes#529
Related: odoo/odoo#80658
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit removes the modified size for large (lg) buttons. They were
far too big. It also slightly changes the medium buttons accordingly.
This is not supposed to change anymore in stable versions but in this
case the big buttons were causing issues in eCommerce pages.
closesodoo/design-themes#528
X-original-commit: 65aefeb3e9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: theme_kea, theme_orchid, theme_nano
The theme customization of the cover snippet was not perfect for those
themes. In particular for the Kea theme where the text was not forced to
white anymore (leaving the default black) and the background filter was
pratically removed, leaving the snippet's text properly contrast with
light brackgrounds but be barely visible with dark backgrounds.
Unfortunately, the Kea theme is the most used currently, alongside the
"Software company" industry... which uses a dark background for the
cover image.
closesodoo/design-themes#527
X-original-commit: 1b4b65ff81
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, it was possible to edit the scroll button of the
cover snippet in Yes theme.
task-2656662
closesodoo/design-themes#523
X-original-commit: 9e62a84326
Related: odoo/odoo#78637
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Removing the container padding in some cases may be fine but cannot
be done because would create horizontal scrollbars in full-width mode
or simply on mobile devices.
To further improve with task-2241779
closesodoo/design-themes#515
X-original-commit: 2ed70c99c9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit injects for each theme a "preferred" palette into the
website's UI palette list ("Theme" tab).
It also removes '$o-palette-priority-prefix' overrides, letting website
handling the palettes order.
task-2656337
closesodoo/design-themes#514
X-original-commit: 0539787e23
Related: odoo/odoo#77857
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Many themes were overriding the yiq threshold, thus having an impact
on which of the dark or light text is used over a particuler background
by default. This is a tricky value to change and only made some sense
when the Odoo themes were defining their own color palettes. Now that
all palettes can be used in all themes, it makes no sense to change the
yiq threshold as it induces inconsistent behavior for a same palette
used in different themes. Besides, leaving the value by default is most
of the time what you want and when it is not entirely correct, the user
has full control over the color combination text colors anyway.
task-2655730
closesodoo/design-themes#507
X-original-commit: f244035809
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit updates the theme to improve the design with new colors, new
pictures and new snippet customizations.
task-2545207
X-original-commit: bbdfbba0d5
Part-of: odoo/design-themes#501
This commit updates the theme to improve the design with new colors, new
pictures and new snippet customizations.
task-2555035
X-original-commit: 2a2da47270
Part-of: odoo/design-themes#501
This commit updates the theme to improve the design with new colors, new
pictures and new snippet customizations.
task-2542281
X-original-commit: e18a0ff128
Part-of: odoo/design-themes#501
This commit updates the theme to improve the design with new colors, new
pictures and new snippet customizations.
task-2551125
X-original-commit: 42638dcf22
Part-of: odoo/design-themes#501