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>
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>
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>
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>
This commit adds a line within the `new_page_templates` test in order to
allow the snippet `s_rating` to be used with `s_rating_no_title`.
task-4306631
closesodoo/design-themes#1041
Related: odoo/odoo#186130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
..cher
Defines dataset directly on website elements such that it can be
overridden by other modules if necessary.
This was done due to the override in the `test_themes` module completely
overriding all attributes of the website_switcher's dropdown items.
Runbot Error 106501
closesodoo/design-themes#1029
X-original-commit: c5f4e1c414
Related: odoo/odoo#190526
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
*: loftspace, real_estate
In commit [1], the test for the "Loftspace" and "Real Estate" themes has
been disabled, as their tour was not working.
This commit fixes the tours and reenables the test for these themes. The
issue was coming from the fact that they were trying to drop more
snippets than there really are, which made an acces to the array at an
inexisting index.
[1]: https://github.com/odoo/design-themes/commit/04f90cd883826bb8e4cbf8975aff6c14bf3c64dbclosesodoo/design-themes#978
X-original-commit: 4c3d843615
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit adds a test that highlights mismatches in grid-related
options (classes, grid-area style...).
It also fixes the remaining issues in themes about it.
task-4213996
closesodoo/design-themes#971
X-original-commit: cf227cd139
Related: odoo/odoo#182039
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Also disable the two theme tours that currently do not pass (for some
reason, they are not even starting at all). To fix later.
X-original-commit: 04f90cd883
Part-of: odoo/design-themes#971
Related: odoo/odoo#182039
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit adds a test that makes sure that inline styles do not
contain the same property several times.
task-4206845
closesodoo/design-themes#946
X-original-commit: 199bd53c11
Related: odoo/odoo#181550
Signed-off-by: Alice Gaudon (agau) <agau@odoo.com>
This commit adds a test that verifies that a specific `separator` is
used when an `attribute` tag is used with either `add` or `remove`.
task-4206845
X-original-commit: 6d1a98775e
Part-of: odoo/design-themes#946
Related: odoo/odoo#181550
Signed-off-by: Alice Gaudon (agau) <agau@odoo.com>
Some snippet may come with the `fa-stack` class which breaks the
design-themes tests.
task-4156290
Part of: task-4077427
Part-of: odoo/design-themes#919
Related: odoo/odoo#180736
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit adapts the classes whitelist in `test_new_page_templates.py`
based on the new classes added during the dynamic snippets redesign.
task-3097273
closesodoo/design-themes#897
Related: odoo/odoo#135509
Related: odoo/enterprise#68754
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This commit adds a test to ensure that assets and images referenced from
a theme do actually belong to that theme.
task-4146886
Part-of: odoo/design-themes#889
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Following the change in the way of dragging and dropping a snippet onto
the page (by selecting it from a dialog displaying the actual previews
of snippets). The themes tours have been adapted to this change in this
commit.
task-3919405
closesodoo/design-themes#817
Related: odoo/odoo#166967
Related: odoo/enterprise#66150
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
The following commit [1] added a test to verify that there are no
duplicate classes in the elements of predefined page templates.
This test worked fine until it failed when we attempted to merge a
commit in which a template is rendered with empty spaces in the class
attribute of an element. The test considered the empty spaces as classes
and therefore assumed that two identical classes existed.
This commit excludes empty spaces when retrieving classes in this test.
[1]: https://github.com/odoo/design-themes/commit/758e2ab819df37c56103b1e82f1e6358b3dba00c
task-3662985
closesodoo/design-themes#792
X-original-commit: 05cfe05280
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Commit [1] introduced a new test that uninstalls theme_buzzy. This leads
to the whole module being uninstalled because this module has all themes
as dependencies.
To fix this, we just run the test as the last test, ensuring the module
is still installed for other tests.
Ideally, tests would be independent from one another, but for now, the
order matters.
[1]: https://github.com/odoo/design-themes/commit/4cdd1db20c021ebd369b46c739591def9732eec5closesodoo/design-themes#782
X-original-commit: 45e9374699
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
This commit adds a test that makes sure templates can be rendered on
all themes and that they neither contain duplicate classes nor
contradicting ones.
Covered templates:
- snippet blocks
- configurator snippet customizations
- new page template snippet customizations
task-3562147
closesodoo/design-themes#744
X-original-commit: 758e2ab819
Related: odoo/odoo#141074
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, owl was in the linter's accepted global variables.
This allowed direct access to owl global object.
For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`
Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:
`import { xml } from "@odoo/owl";`
task-id 3498859
closesodoo/design-themes#709
Related: odoo/odoo#137517
Related: odoo/enterprise#48364
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.
Part of task~3443861
closesodoo/design-themes#686
Related: odoo/enterprise#45020
Related: odoo/odoo#130467
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit disables the warning (introduced by the community commit)
when test-themes is installed, as a lot of websites are created and are
not necessary when testing the different themes.
-- ORIGINAL COMMIT MESSAGE --
Prior to this commit, if a website does not have a domain, nothing tells
the user that this is a misconfiguration that can lead to broken
behaviours. For example, here are the steps to reproduce:
- Have two website (X and Y)
- Website Y does not have a domain
- Tab 1 has Website X selected
- User opens a new tab
- Tab 2 has Website X selected as well
- User switches tab 2 to Website Y
- No redirection happens
- User switches back to tab 1
- User opens the HTML editor for Website X
- Website X content is displayed
- User saves
- Content is saved on Website Y
This is pretty hard to fix as a lot of the python flow for Website uses
`get_current_website` which will uses the session's "force_website_id"
in priority.
In any case, we consider having multiple websites sharing the same
domain (or having no domains at all) a misconfiguration. Therefore, we
should warn the user of so.
This commit adds a tooltip on the website switcher for websites that do
not have a domain set. It also adds a notification recommending users
close other tabs if they switch website.
opw-3374214
closesodoo/design-themes#684
X-original-commit: 2e3188e1e1
Related: odoo/odoo#130448
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>