Skip to content

Commit

Permalink
[FIX] web: form's title should take all width in edit mode
Browse files Browse the repository at this point in the history
Form sheet's title (with class .oe_title) when in editable mode has a
maximum width. The goal according to FP is to make a clear
differentiation between the main title/name of a record and its other
fields.

An issue with the existing rule in the Project application is that the
"title" row (with class .oe_title) not only contains the name of the
task but also its priority and state.

The aforementioned rule should then be applied only on the "name" part
and not to the whole row to prevent the "state" from moving between
read_only and editable modes.

To do so the maximum width is "moved" from the row element to the task
name's element.

Sadly the current stylesheet in this project is still a regular CSS
file, preventing us from using the SCSS expression coming from
`addons/web/static/src/scss/form_view.scss`.

Task ID: 1946570

closes odoo#33845

Signed-off-by: Adrien Dieudonné (adr) <[email protected]>
  • Loading branch information
pparidans committed Jun 3, 2019
1 parent 1fd9d1e commit 8040f85
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions addons/project/static/src/css/project.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,16 @@
margin-top: 6px;
margin-right: 8px;
}

.o_form_project_tasks.o_form_editable .oe_title {
max-width: initial;
}

.o_form_project_tasks.o_form_editable .oe_title .o_task_name {
/*
* should be (coming from addons/web/static/src/scss/form_view.scss):
* max-width: map-get($container-max-widths, md) - (2 * $o-horizontal-padding);
*/
max-width: 688px;
margin-right: auto;
}

0 comments on commit 8040f85

Please sign in to comment.