Commit Graph
23 Commits
Author SHA1 Message Date
Pierre Paridans eef262abf4 [FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours

[FIX][TMP] account: CogMenu selector in tours

[FIX][TMP] web*: Breadcrumb targetting in tours

Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).

add classname on last breadcrumb item

[FIX][TMP] project: View buttons selector in tours (moved away from CP)

[FIX][TMP] project: Kanban selectors in tours (quick create)

[FIX][TMP] *: SearchBar selectors in tours (toggle menu)

[FIX][TMP] *: ButtonBox selector in tours

[WIP][IMP] web: add toggleSearchBarMenu in search helpers

adapt and unskip 3 list tests

adapt and unskip calendar tests

unskip web_tour test that actually pass

post rebase fix

allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later

post rebase fixes

fix

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Brieuc-brd 0f065ed8ea [IMP] web,mail: pivot & chatter design adaption
Part-of: odoo/odoo#116641
2023-05-12 22:59:18 +02:00
Romeo Fragomeli c8ca9da7bc [IMP] web: move views' buttons into the view itself
Were previously in the ControlPanel.

Part-of: odoo/odoo#116641
2023-05-12 22:59:17 +02:00
Jorge Pinna Puissant 886f3de768 [IMP] web,*: force props validation for components
*: base_automation, lunch, mail, mrp, project, web_editor, website

This commit adds a warning if the props validation is not set for a
component.

The props validation is important to tell how a component should be
used, by looking at its code, it's a good documentation of the component.
It's also critical, to test if the component is correctly used, if all
the obligatory props are passed and that there are of the correct type.

For more information, see: https://github.com/odoo/owl/blob/master/doc/reference/props.md#props-validation

closes odoo/odoo#103723

Related: odoo/enterprise#33044
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-10-26 16:07:18 +02:00
stefanorigano (SRI) 5234fad374 [IMP] web, base: adapt for dark-mode
This commit adapts several components in order to correctly handle
color-scheme variations.

It also allows user_menu to handle switch entries 

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 9622839cc9 [IMP] web: PivotRenderer, after BS5 cleanup
Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
Julien Mougenot e8124d2e38 [FIX] web,*: Fix style in sample data views
This commit defines new rules to disable elements in views using sample
data.

Previously, this was done by setting a 'o_view_sample_data' class on the
view and then setting another class 'o_sample_data_disabled' on elements
which had to be disabled.

Now, the logic determining which elements are disabled has been moved to
each view's SCSS file to avoid polluting the templates with redundant
class assignations. A mixin (o-sample-data-disabled) has been defined in
the SCSS utils to have the same rules on these elements.

closes odoo/odoo#101485

X-original-commit: 3e413c96ff2dff60de22e1d5e1fed7070ac2943d
Related: odoo/enterprise#31960
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-28 21:26:32 +02:00
stefanorigano (SRI) bd2a1110a0 [REM] *: drop o_cursor_default & o_cursor_pointer classes
Drop custom cursor classes in favor of Bootstrap default ones.
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:12 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli 68a3bd651f [REF] *: BS5: Migrate tables
- avoid black border in table of BS5

In BS5 there is a new rule:
```css
.table > :not(:first-child) {
    border-top: 2px solid currentColor;
}
```
This rule generate unwanted border in our visual, so we change the color
to the old one we have in BS4 and in some case set the `border-top` to
´none´.

PS: another solution is to use the `table-borderless` class, but then
we have `tr` flickering for the height in list view (edit mode).

- table background-color :
  * BS4:
  the background color is set with the `background-color` property
  * BS5:
  it's set with a box shadow and the `--table-accent-bg` CSS variable

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:19 +02:00
8a5721bc7d [REF] web: remove LegacyComponent
Before this commit, components used `el` and `trigger` but this works
thanks to LegacyComponent. LegacyComponent has been introduced to ease
the transition from owl 1 to owl 2.

This commit replaces the uses of `el` by `useRef` and `trigger` by
adding callback in props. Without these owl 1 features, components
no longer need to extend LegacyComponent.
This commit also adapts the tests to use `getFixture` instead of `el`.

closes odoo/odoo#85903

Related: odoo/enterprise#25032
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-03-08 09:08:54 +00:00
stefanorigano (SRI) 28f910f5be [REF] *: odoo_ui_icons
Following new policies in terms of product design-language, this commit
will partially revert 546477d reducing the number of `oi` icons.

It will also improve rendering when icons are rendered at our default
font-size (13px), avoiding blur effects when icons use thin lines.

Since fontAwesome will coexists with `oi` longer than expected, the
commit will also review size utility-classes in order to get consistent
result when used in conjunction with fa's ones (notably `fa-lg`).

Part-of: odoo/odoo#85651
2022-03-03 14:19:44 +00:00
Brieuc-brd 25945391e2 [FIX] web: remove unwanted bg in tables
Changes made in the commit 27bd6a681037d2794dac2453d7064be3a8d5bb36
apply a white background in every tables and create visual issues
(e.g. the `o_inspector_table` on the right in `documents`).

This commit removes this global rule and applies a `bg-white` only to
the pivot view.

task-2731553

closes odoo/odoo#85642

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-02 18:46:08 +00:00
Brieuc-brd 3463583f1f [IMP] web: revamp pivot view
This commit simplifies the SCSS of the Pivot View.
It also adds the possibility to detect if the Pivot View is embedded in
another one (eg. if the view is embedded in the Dashboard view). This
last change was made to adapt the size of the Pivot table depending of
the context.

task-2731553

closes odoo/odoo#82575

Related: odoo/enterprise#23701
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-02-18 09:49:27 +00:00
+2 6d13271aac [REF] web: adapt code to owl 2
Owl 2 changelog: https://github.com/odoo/owl/blob/a9f29c4caad4f32d06be1ec4780572825781cd9b/CHANGELOG.md

Part-of: odoo/odoo#80156
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-02-10 07:46:12 +00:00
Samuel Degueldre 57a02f0a14 [REF] web: remove dropdown-item-selected event
In owl 2, the t-on directive is no longer supported on components. The
way to handle events on components is to give them a callback as a prop.
This already works in owl 1, so this commit prepares the code for an
easier migration in the future by removing the "dropdown-item-selected"
event and converting the code that was using it to use the new paradigm.

closes odoo/odoo#80684

Related: odoo/enterprise#22722
Signed-off-by: Géry Debongnie <ged@odoo.com>
2021-12-14 12:40:19 +00:00
Bruno Boi e8bbc5cd44 [FIX] web: pivot style in right-to-left
Headers of columns and rows are not properly aligned on RTL direction.

After this commit, they will be.

closes odoo/odoo#78261

X-original-commit: 2fb992d3ced438fd012d7702bdfbe23cce6000a6
Related: odoo/enterprise#21645
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-13 06:03:58 +00:00
Bruno Boi 2bd8bb4d7b [FIX] web: align pivot row groupby menus to right
The row groupby menus are always aligned on the left, but when a
multiple levels of groupby has been selected, it feels weird and
counterintuitive to see them aligned on the left whereas the row
labels are right aligned.

This commit makes sure that the alignment is coherent between the menu
and the row labels.

X-original-commit: b11b760365c45409b8ea10dee2a58c2e677e9d61
Part-of: odoo/odoo#78261
2021-10-13 06:03:57 +00:00
b63ee52552 [FIX] *: remove scss 'extend' from dropdown components
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.

Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.

In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.

Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.

// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
  <button class="dropdown-item" type="button">Action</button>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
  <li class="o_dropdown_item">
     <span>Action</span>
  </li>
  <li class="o_dropdown_item">
     <a href="#">Another action</a>
  </li>
</ul>

// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
  <span class="dropdown-item">Action</span>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)

closes odoo/odoo#77649

X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2021-10-04 07:57:00 +00:00
Aaron Bohy e830968efe [REF] web: views: factorize sample data logic
This commit factorizes the sample data logic to the Model and
useModel hook. That way, nothing as to be done in concrete models
anymore.

This commit also ensures that searchParams given to the view are a
deep copy of what relies in the SearchModel. Before this commit,
the PivotModel cloned them in its "load" method. It is now done
in the SearchModel for every views.

X-original-commit: 0f43b7994b6963644cea5b694ba6b07df7af8989
Part-of: odoo/odoo#76576
2021-09-15 15:22:25 +00:00
Aaron Bohy fbf9960dde [REF] web: several small refactorings of pivot and graph
- PivotModel: methods are protected, not private
 - PivotModel: rename meta into metaData (same as in GraphModel)
 - GraphView: use the "useEffect" hook
 - PivotView and GraphView typo: ArchParser is a class

X-original-commit: 71059a4887cf208552e4932ed2f3b6f53d75c369
Part-of: odoo/odoo#76576
2021-09-15 15:22:24 +00:00
Lucas Perais (lpe) 9d0f1fd07e [FIX] web: pivot: apply table-reponsive
Otherwise the experience in mobile won't be nice.

closes odoo/odoo#76390

X-original-commit: 9e36d2eda46febda16118cd56d541b6c90501c53
Related: odoo/enterprise#20796
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-09-14 06:01:22 +00:00
d1e227b07b [IMP] web,*: new PivotView component
Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-09-07 10:04:38 +00:00