Commit Graph

18 Commits

Author SHA1 Message Date
qsm-odoo 9eecd12db1 [IMP] *: remove useless utf-8 declaration
Part-of: odoo/design-themes#919
Related: odoo/odoo#180736
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-09-21 16:34:53 +00:00
Xavier Morel 67053ce2bf [IMP] *: website tour utils uses non-default exports
closes odoo/design-themes#884

Related: odoo/odoo#177327
Related: odoo/enterprise#68655
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2024-08-23 08:15:12 +00:00
Pierre Pulinckx (PIPU) b4c5bea2ea [REF] web_tour: prepare to change the default action in tour_compiler
Currently, in tour_compiler, to check that an element is actually
present in the DOM in a step, there are 2 possibilities.
- `isCheck: true` => Checks that the element is in the DOM.
The latter can be disabled.
- `run() {}` => Checks that the element is in the DOM (because this
is what is done by default). However, if the element is disabled,
the step will be aborted.

In the codebase, we can see a lot of `run() {} //it's a check` and
`isCheck:true`. However, the behavior is not exactly the same.
What's more, there are 2 ways to do "the same thing".
In order to clarify the turns API, it was decided to no longer put an
action (step.run) by default. (Previously, the default action was
the "click" action).
From then on, it is no longer necessary to stipulate
`step.isCheck: true` nor `run() {}`.
The corollary is that now, you must explicitly write `run: click`, if
you want the click action to be triggered on the target.

This commit sets the stage for making this change.

closes odoo/design-themes#801

Related: odoo/odoo#167743
Related: odoo/enterprise#63711
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2024-06-05 11:10:18 +00:00
Pierre Pulinckx (PIPU) 45061e7cc4 [REF] *: use iframe hoot pseudo selector in tour triggers
In this commit, we change rest of triggers in tours where an iframe is
selected (suite of #156653).
To do this, we use the :iframe HOOT pseudo-selector.
With this changes, we can now remove the getNodesFromSelector
function in odoo/addons/web_tour/static/src/tour_service/tour_utils.js
Note that in this previous function, a ([is-ready]="true") check was
made for iframe elements but was only necessary for few of them (7).
So, a stepUtils.waitIframeIsReady() has been added to check this state.

closes odoo/design-themes#783

Related: odoo/odoo#157217
Related: odoo/enterprise#58474
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2024-03-12 23:29:57 +00:00
Soukéina Bojabza 833a667000 [FIX] theme_test_custo: consider the top_menu navbar class in tests
In PR [1], the duplicated navbars ids `o_main_nav` and `top_menu` are
replaced by classes, to avoid having the same ids multiple times in the
DOM. Note that for stability, the ids are kept for the desktop view
navbar.

This commit adapts the tests so they now consider the classes and not
the ids.

[1]: https://github.com/odoo/odoo/pull/146492

task-3609531

closes odoo/design-themes#780

X-original-commit: 103e544835
Related: odoo/odoo#156013
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-03-06 11:37:50 +00:00
Robin Lejeune (role) a86d9f73df [FIX] theme_*: remove mb-2 class on orphan buttons
*: anelusia, artists, aviato, graphene, kiddo, loftspace, monglia,
notes, odoo_experts, paptic, test_custo, yes

The community PR [125824] introduces an automatic check on buttons to
add the `mb-2` class when several buttons follow each other, so that
they have space to breathe when split on multiple lines.
For consistency, this commit therefore removes most `mb-2` occurrences
on buttons within themes as long as they are alone on their line, but
keeps or adds the class when several buttons are next to each other.

[125824]: https://github.com/odoo/odoo/pull/125824

task-3369604

closes odoo/design-themes#680

Related: odoo/odoo#125824
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-08-03 19:30:56 +02:00
Pierre Pulinckx (pipu) 94b3042634 [REF] website_*: Change registerTours of tour_utils
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.

This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().

task-3292454

closes odoo/design-themes#678

Related: odoo/odoo#130248
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-02 13:20:26 +02:00
Bastien PIERRE b9d48ebe86 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/design-themes#671

Related: odoo/odoo#127414
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:31 +02:00
Robin Lejeune (role) cc958193fb [FIX] theme_test_custo: add test for the mobile/desktop theme preview
With the Milk redesign in [1], the possibility to use the mobile/desktop
switcher on a theme preview to see how it behaves/displays on those
devices didn't work anymore.

It has been fixed in [2], but in order to prevent future breaks, this
commit tests this functionality.

task-3355253

[1]: https://github.com/odoo/odoo/commit/caef16ee4e5351142ef04f02798999ccb38a56bc
[2]: https://github.com/odoo/odoo/commit/9445f61bcaee88bc6ac2fc373d7eca4e4b38c154

closes odoo/design-themes#670

X-original-commit: ed2fdd45f2
Related: odoo/odoo#127911
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-10 18:16:28 +02:00
Victor Feyens c338c17bf7 [FIX] *: clean useless content in manifests
Make sure the linting test added in community do not fail.

closes odoo/design-themes#669

X-original-commit: f78f8df161
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-07 10:52:58 +02:00
Mathieu (mano) fb611453ee [IMP] theme_test_custo: xpath new shape UI
This commit fixes the xpath that have been broken by the new
we-select-pager introducing a full height version of the shape UI in
the web_editor.

task-3266751

closes odoo/design-themes#653

Related: odoo/odoo#118253
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-12 11:17:43 +02:00
Guillaume (gdi) 1c029c860b [FIX] theme_test_custo: use new utility to enter in edit mode
This commit permits to use the new utility to enter in edit mode. This
way, we make sure that the edit mode is enabled before testing the next
step of the test. This avoids race conditions during tests.

task-3203820

closes odoo/design-themes#656

X-original-commit: 38e0c87ae3
Related: odoo/odoo#120481
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2023-05-04 20:33:57 +02:00
qsm-odoo 0049109fda [FIX] theme_test_custo: do not inherit from we options but website ones
(Otherwise you could impact other apps like mass mailing). In fact this
should have been part of [1] as before you were *required* to inherit
from web_editor.snippet_options as it was t-called inside the website
snippet_options template.

Note: this new test theme was only recently introduced with [2].

[1]: https://github.com/odoo/design-themes/commit/0ce8547d34f08eb5a27329c66e53828e7b039ef1
[2]: https://github.com/odoo/design-themes/commit/0e2497b8e84eab8957028f4d63ff0899a9fe6ab3

closes odoo/design-themes#600

X-original-commit: 4f3b5b9f29
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-06 23:14:11 +02:00
qsm-odoo 0fa75513c3 [REF] theme_test_custo: adapt following options conflicts between apps
See community commit for details.

closes odoo/design-themes#597

Related: odoo/odoo#99850
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-04 17:01:14 +02:00
qsm-odoo c95aa445fa [IMP] theme_*: ease defining only one font family to use in a theme
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

closes odoo/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>
2022-09-26 11:36:44 +02:00
qsm-odoo a05eb04897 [IMP] theme_test_custo: review website tour utils
See community commit for details.

closes odoo/design-themes#588

Related: odoo/odoo#100024
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-12 17:33:41 +02:00
Romain Derie f4a772bffe [FIX] theme_test_custo: add bigger timeout to the new test
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

closes odoo/design-themes#587

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-09 22:50:02 +02:00
Romain Derie 0e2497b8e8 [IMP] test_themes, theme_test_custo: add new test theme for tests
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.

closes odoo/design-themes#586

Related: odoo/odoo#99099
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-07 23:10:56 +02:00