Skip to content

Commit 7c4da85

Browse files
committed
[MIG] web_responsive: Migrate to v12 and refactor
This migration includes a full refactoring to make this module more maintainable. Some things that have changed: - Removed external libraries. - Change Less for Scss. - Reduce ES and XML to the minimal required needs. - Implement as much features as possible with just Scss. - Remove copyright from `__init__.py` files. - Trigger the new hotkeys system from Odoo v12 with `Shift+Alt` instead of just `Alt`, and restore some good old hotkeys (`E` for "Edit", `D` for "Discard", and `A` for "Apps menu"). See odoo/odoo#30068 on the matter. - Control panel breadcrumbs are collapsed into a single backwards icon. - Add FA icons to most common buttons in control panel. - Hide text in XS for those buttons, to have a slicker phone experience. - Lots of gifs in the README!
1 parent 90586c2 commit 7c4da85

33 files changed

+1218
-5717
lines changed

web_responsive/README.rst

+70-38
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,74 @@ Web Responsive
1414
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
1515
:alt: License: LGPL-3
1616
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
17-
:target: https://github.com/OCA/web/tree/11.0/web_responsive
17+
:target: https://github.com/OCA/web/tree/12.0/web_responsive
1818
:alt: OCA/web
1919
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_responsive
20+
:target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_responsive
2121
:alt: Translate me on Weblate
2222
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/162/11.0
23+
:target: https://runbot.odoo-community.org/runbot/162/12.0
2424
:alt: Try me on Runbot
2525

2626
|badge1| |badge2| |badge3| |badge4| |badge5|
2727

28-
This module provides a mobile compliant interface for Odoo Community web.
28+
This module adds responsiveness to web backend.
2929

30-
Features:
30+
Features for all devices:
3131

32-
* New navigation with an App drawer
33-
* Keyboard shortcuts for easier navigation
34-
* Display kanban views for small screens if an action or field One2x
35-
* Set chatter side (Optional per user)
36-
* Quick search
32+
* New navigation with an app drawer
33+
34+
.. image:: https://user-images.githubusercontent.com/973709/48417193-09a1e080-e74a-11e8-8a0c-e73eb689b2fb.gif
35+
36+
* Quick menu search from the app drawer
37+
38+
.. image:: https://user-images.githubusercontent.com/973709/48417213-17576600-e74a-11e8-846a-57691e82636b.gif
39+
40+
Features for mobile:
41+
42+
* App-specific submenus are shown on full screen when toggling them from the
43+
"hamburger" menu
44+
45+
.. image:: https://user-images.githubusercontent.com/973709/48417297-51286c80-e74a-11e8-9a47-22c810b18c43.gif
46+
47+
* View type picker dropdown displays confortably
48+
49+
.. image:: https://user-images.githubusercontent.com/973709/50964322-e3d55580-14c6-11e9-8249-48db9539600f.gif
50+
51+
* Top app bar is always visible, but the control panel is hidden when
52+
scrolling down, to save some vaulable vertical space
53+
54+
.. image:: https://user-images.githubusercontent.com/973709/50964496-5cd4ad00-14c7-11e9-9261-fd223a329d02.gif
55+
56+
* Form status bar action and status buttons are collapsed in dropdowns.
57+
Other control panel buttons use icons to save space.
58+
59+
.. image:: https://user-images.githubusercontent.com/973709/50965446-e08f9900-14c9-11e9-92d6-dda472cb6557.gif
60+
61+
* Breadcrumbs navigation is collapsed with a "back arrow" button.
62+
63+
.. image:: https://user-images.githubusercontent.com/973709/50965168-1d0ec500-14c9-11e9-82a0-dfee82ed0861.gif
64+
65+
Features for computers:
66+
67+
* Keyboard shortcuts for easier navigation, **using <kbd>Ctrl+Alt+[key]</kbd>**
68+
combination instead of just <kbd>Alt+[key]</kbd>.
69+
70+
.. image:: https://user-images.githubusercontent.com/973709/48417578-ff341680-e74a-11e8-8881-017709e912bc.png
71+
72+
See https://github.com/odoo/odoo/issues/30068 to understand why.
73+
74+
* Autofocus on search menu box when opening the drawer
75+
76+
.. image:: https://user-images.githubusercontent.com/973709/48417213-17576600-e74a-11e8-846a-57691e82636b.gif
77+
78+
* Set chatter on the side of the screen, optional per user
79+
80+
.. image:: https://user-images.githubusercontent.com/973709/48417270-41108d00-e74a-11e8-9172-cba825d027ed.gif
81+
82+
* Full width form sheets
83+
84+
.. image:: https://user-images.githubusercontent.com/973709/48417428-ac5a5f00-e74a-11e8-8839-5bc538c54c1d.png
3785

3886
**Table of contents**
3987

@@ -45,44 +93,28 @@ Usage
4593

4694
The following keyboard shortcuts are implemented:
4795

48-
* Toggle App Drawer - `ActionKey <https://en.wikipedia.org/wiki/Access_key#Access_in_different_browsers>` + ``A``
49-
* Navigate Apps Drawer - Arrow Keys
50-
* Type to select App Links
51-
* ``esc`` to close App Drawer
96+
* Toggle app drawer - ``Alt + H``
97+
* Navigate app search results - Arrow keys
98+
* Choose app result - ``Enter``
99+
* ``Esc`` to close app drawer
52100

53101
Known issues / Roadmap
54102
======================
55103

56-
Note: Data added to the footer ``support_branding`` is not shown while using
57-
this module.
58-
59-
* Provide full menu search feature instead of just App search
60-
* Drag drawer from left to open in mobile
61-
* Figure out how to test focus on hidden elements for keyboard nav tests
62-
* If you resize the window, body gets a wrong ``overflow: auto`` css property
63-
and you need to refresh your view or open/close the app drawer to fix that.
64-
* Override LESS styling to allow for responsive widget layouts
65-
* Adding ``oe_main_menu_navbar`` ID to the top navigation bar triggers some
66-
great styles, but also `JavaScript that causes issues on mobile
67-
<https://github.com/OCA/web/pull/446#issuecomment-254827880>`_
68-
* Sticky header and footer in list view only works on certain browsers:
69-
https://caniuse.com/#search=sticky (note that the used feature is in
70-
`thead`).
71-
* On Android (FireFox) - clicking the search icon does not
72-
focus the search input.
73-
* On Android (FireFox & Chrome) - clicking the search query input will
74-
show the on screen keyboard for a split second, but the App Drawer
75-
immediately closes and the keyboard closes with it.
76-
* Filter menu items completely on client-side, to make it smoother and allow
77-
users to filter on complete paths of menus and not only on the last item.
104+
* To view the full experience in a device, the page must be loaded with the
105+
device screen size. This means that, if you change the size of your browser,
106+
you should reload the web client to get the full experience for that
107+
new size. This is Odoo's own limitation.
108+
* App navigation with keyboard.
109+
* Make it more beautiful. Maybe OCA-branded?
78110

79111
Bug Tracker
80112
===========
81113

82114
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
83115
In case of trouble, please check there if your issue has already been reported.
84116
If you spotted it first, help us smashing it by providing a detailed and welcomed
85-
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_responsive%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
117+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_responsive%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
86118

87119
Do not contact contributors directly about support or help with technical issues.
88120

@@ -118,6 +150,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
118150
mission is to support the collaborative development of Odoo features and
119151
promote its widespread use.
120152

121-
This module is part of the `OCA/web <https://github.com/OCA/web/tree/11.0/web_responsive>`_ project on GitHub.
153+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/12.0/web_responsive>`_ project on GitHub.
122154

123155
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

web_responsive/__init__.py

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# Copyright 2018 Alexandre Díaz
2-
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3-
41
from . import models

web_responsive/__manifest__.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
{
66
"name": "Web Responsive",
7-
"summary": "It provides a mobile compliant interface for Odoo Community "
8-
"web",
9-
"version": "11.0.2.0.0",
7+
"summary": "Responsive web client, community-supported",
8+
"version": "12.0.1.0.0",
109
"category": "Website",
11-
"website": "https://laslabs.com/",
10+
"website": "https://github.com/OCA/web",
1211
"author": "LasLabs, Tecnativa, Alexandre Díaz, "
1312
"Odoo Community Association (OCA)",
1413
"license": "LGPL-3",
@@ -18,11 +17,11 @@
1817
],
1918
"data": [
2019
'views/assets.xml',
20+
'views/res_users.xml',
2121
'views/web.xml',
22-
'views/inherited_view_users_form_simple_modif.xml',
2322
],
2423
'qweb': [
25-
'static/src/xml/app_drawer_menu_search.xml',
24+
'static/src/xml/apps.xml',
2625
'static/src/xml/form_view.xml',
2726
'static/src/xml/navbar.xml',
2827
],

web_responsive/i18n/es.po

+46-27
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,71 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Odoo Server 10.0\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2016-12-23 02:13+0000\n"
12-
"PO-Revision-Date: 2018-08-02 06:36+0000\n"
13-
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>\n"
11+
"POT-Creation-Date: 2019-01-10 10:49+0000\n"
12+
"PO-Revision-Date: 2019-01-10 10:50+0000\n"
13+
"Last-Translator: Jairo Llopis <yajo.sk8@gmail.com>\n"
1414
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
1515
"Language: es\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
18-
"Content-Transfer-Encoding: \n"
18+
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20-
"X-Generator: Weblate 3.1.1\n"
20+
"X-Generator: Poedit 2.2\n"
2121

2222
#. module: web_responsive
23-
#: model:ir.ui.view,arch_db:web_responsive.webclient_bootstrap
24-
msgid "<span class=\"sr-only\">Toggle App Drawer</span>"
25-
msgstr ""
26-
"<span class=\"sr-only\">Mostrar/ocultar selector de aplicaciones</span>"
23+
#: model:ir.model.fields,field_description:web_responsive.field_res_users__chatter_position
24+
msgid "Chatter Position"
25+
msgstr "Posición del chatter"
2726

2827
#. module: web_responsive
29-
#: model:ir.ui.view,arch_db:web_responsive.webclient_bootstrap
30-
msgid "<span class=\"sr-only\">Toggle Navigation</span>"
31-
msgstr "<span class=\"sr-only\">Mostrar/Ocultar navegación</span>"
28+
#. openerp-web
29+
#: code:addons/web_responsive/static/src/xml/form_view.xml:57
30+
#: code:addons/web_responsive/static/src/xml/form_view.xml:96
31+
#, python-format
32+
msgid "Create"
33+
msgstr "Crear"
3234

3335
#. module: web_responsive
34-
#: model:ir.ui.view,arch_db:web_responsive.menu
35-
msgid "Apps"
36-
msgstr "Aplicaciones"
36+
#. openerp-web
37+
#: code:addons/web_responsive/static/src/xml/form_view.xml:71
38+
#: code:addons/web_responsive/static/src/xml/form_view.xml:110
39+
#, python-format
40+
msgid "Discard"
41+
msgstr "Descartar"
3742

3843
#. module: web_responsive
39-
#: model:ir.model.fields,field_description:web_responsive.field_res_users_chatter_position
40-
msgid "Chatter Position"
41-
msgstr "Posición del chatter"
44+
#. openerp-web
45+
#: code:addons/web_responsive/static/src/xml/form_view.xml:50
46+
#, python-format
47+
msgid "Edit"
48+
msgstr "Editar"
4249

4350
#. module: web_responsive
44-
#: model:ir.model,name:web_responsive.model_ir_http
45-
msgid "HTTP routing"
46-
msgstr "Enrutado HTTP"
51+
#: selection:res.users,chatter_position:0
52+
msgid "Normal"
53+
msgstr "Normal"
4754

4855
#. module: web_responsive
49-
#: model:ir.ui.view,arch_db:web_responsive.menu
50-
msgid "More <b class=\"caret\"/>"
51-
msgstr "Más <b class=\"caret\"/>"
56+
#. openerp-web
57+
#: code:addons/web_responsive/static/src/xml/form_view.xml:27
58+
#, python-format
59+
msgid "Quick actions"
60+
msgstr "Acciones rápidas"
5261

5362
#. module: web_responsive
54-
#: selection:res.users,chatter_position:0
55-
msgid "Normal"
56-
msgstr "Normal"
63+
#. openerp-web
64+
#: code:addons/web_responsive/static/src/xml/form_view.xml:64
65+
#: code:addons/web_responsive/static/src/xml/form_view.xml:103
66+
#, python-format
67+
msgid "Save"
68+
msgstr "Guardar"
69+
70+
#. module: web_responsive
71+
#. openerp-web
72+
#: code:addons/web_responsive/static/src/xml/apps.xml:29
73+
#, python-format
74+
msgid "Search menus..."
75+
msgstr "Buscar menús..."
5776

5877
#. module: web_responsive
5978
#: selection:res.users,chatter_position:0

web_responsive/i18n/web_responsive.pot

+32-36
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 11.0\n"
7+
"Project-Id-Version: Odoo Server 12.0\n"
88
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2019-01-10 10:49+0000\n"
10+
"PO-Revision-Date: 2019-01-10 10:49+0000\n"
911
"Last-Translator: <>\n"
1012
"Language-Team: \n"
1113
"MIME-Version: 1.0\n"
@@ -14,71 +16,65 @@ msgstr ""
1416
"Plural-Forms: \n"
1517

1618
#. module: web_responsive
17-
#: model:ir.ui.view,arch_db:web_responsive.menu
18-
msgid "<i>Searching:</i>"
19-
msgstr ""
20-
21-
#. module: web_responsive
22-
#: model:ir.ui.view,arch_db:web_responsive.menu
23-
msgid "<span class=\"hidden-xs\">\n"
24-
" &amp;nbsp;|&amp;nbsp;\n"
25-
" </span>"
19+
#: model:ir.model.fields,field_description:web_responsive.field_res_users__chatter_position
20+
msgid "Chatter Position"
2621
msgstr ""
2722

2823
#. module: web_responsive
29-
#: model:ir.ui.view,arch_db:web_responsive.webclient_bootstrap
30-
msgid "<span class=\"sr-only\">Toggle App Drawer</span>"
24+
#. openerp-web
25+
#: code:addons/web_responsive/static/src/xml/form_view.xml:57
26+
#: code:addons/web_responsive/static/src/xml/form_view.xml:96
27+
#, python-format
28+
msgid "Create"
3129
msgstr ""
3230

3331
#. module: web_responsive
34-
#: model:ir.ui.view,arch_db:web_responsive.webclient_bootstrap
35-
msgid "<span class=\"sr-only\">Toggle Navigation</span>"
32+
#. openerp-web
33+
#: code:addons/web_responsive/static/src/xml/form_view.xml:71
34+
#: code:addons/web_responsive/static/src/xml/form_view.xml:110
35+
#, python-format
36+
msgid "Discard"
3637
msgstr ""
3738

3839
#. module: web_responsive
39-
#: model:ir.ui.view,arch_db:web_responsive.menu
40-
msgid "Apps"
40+
#. openerp-web
41+
#: code:addons/web_responsive/static/src/xml/form_view.xml:50
42+
#, python-format
43+
msgid "Edit"
4144
msgstr ""
4245

4346
#. module: web_responsive
44-
#: model:ir.model.fields,field_description:web_responsive.field_res_users_chatter_position
45-
msgid "Chatter Position"
47+
#: selection:res.users,chatter_position:0
48+
msgid "Normal"
4649
msgstr ""
4750

4851
#. module: web_responsive
4952
#. openerp-web
50-
#: code:addons/web_responsive/static/src/xml/form_view.xml:35
53+
#: code:addons/web_responsive/static/src/xml/form_view.xml:27
5154
#, python-format
52-
msgid "More"
55+
msgid "Quick actions"
5356
msgstr ""
5457

5558
#. module: web_responsive
56-
#: model:ir.ui.view,arch_db:web_responsive.menu
57-
msgid "More <b class=\"caret\"/>"
58-
msgstr ""
59-
60-
#. module: web_responsive
61-
#: model:ir.ui.view,arch_db:web_responsive.menu
62-
msgid "No Search Supplied."
59+
#. openerp-web
60+
#: code:addons/web_responsive/static/src/xml/form_view.xml:64
61+
#: code:addons/web_responsive/static/src/xml/form_view.xml:103
62+
#, python-format
63+
msgid "Save"
6364
msgstr ""
6465

6566
#. module: web_responsive
66-
#: selection:res.users,chatter_position:0
67-
msgid "Normal"
67+
#. openerp-web
68+
#: code:addons/web_responsive/static/src/xml/apps.xml:29
69+
#, python-format
70+
msgid "Search menus..."
6871
msgstr ""
6972

7073
#. module: web_responsive
7174
#: selection:res.users,chatter_position:0
7275
msgid "Sided"
7376
msgstr ""
7477

75-
#. module: web_responsive
76-
#. openerp-web
77-
#: code:addons/web_responsive/static/src/xml/form_view.xml:54
78-
#, python-format
79-
msgid "Task"
80-
msgstr ""
81-
8278
#. module: web_responsive
8379
#: model:ir.model,name:web_responsive.model_res_users
8480
msgid "Users"

0 commit comments

Comments
 (0)