Commit Graph

154 Commits

Author SHA1 Message Date
Elisabeth Dickinson
24cef029dc [IMP] odoo_theme: show the "On this page" section in mobile
When the page gets too small for the "On this page" section (local tree
of content) to fit on the page, the section is now moved above the menu
(global tree of content) rather than being hidden.

task-2800970

closes odoo/documentation#2201

X-original-commit: c0040fa532
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-14 07:41:06 +02:00
Antoine Vandevenne (anv)
646fc412d0 [FIX] homepage: fix the link to the external API page
The page was moved from odoo.rst to external_api.rst with commit
0fc52188.

task-2870501

closes odoo/documentation#2143

X-original-commit: f6cd947d6b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-02 13:12:53 +02:00
Martin Trigaux
3901e3b241 [FIX] odoo_theme: correctly consider baseurl
urlBase was only containing the domain name, not the /documentation/

closes odoo/documentation#2062

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-20 12:11:29 +02:00
Martin Trigaux
a81e0623b0 [IMP] odoo_theme: introduce fallback URLs for the page switchers
When a user clicks on the link of an alternate page in the version or
language switcher, we now check if the page referenced by the target URL
exists or not. If not, we generate a series of fallback URLs from the
target URL and check whether the targeted resource exists or not, until
we read the root of the documentation. As soon as we find a valid URL,
we redirect the user to it.

This is inspired by the behaviour of docs.python.org's version and
language switchers.

task-2534669

closes odoo/documentation#2052

X-original-commit: 25e863a64c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-19 23:16:49 +02:00
wan
28fe18157e [ADD] extension: allow to build graphs using graphviz
X-original-commit: e00b5e35c7
Part-of: odoo/documentation#1969
2022-05-09 14:03:24 +02:00
Jeremy Kersten
8b5db69cae [IMP] odoo_theme: allow to add plausible script
export PLAUSIBLE_SCRIPT=https://plausible.io/js/script.js
export PLAUSIBLE_DOMAIN=yourdomain.com

closes odoo/documentation#1955

X-original-commit: 4c526eb02f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-05-09 11:25:42 +02:00
Antoine Vandevenne (anv)
493d45d687 [IMP] odoo_theme: hide the "Edit on GitHub" button for pages in legal/
closes odoo/documentation#1815

X-original-commit: ff79ca3a6b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-08 15:52:36 +02:00
Donatienne Pirlot
ba4f9d6354 [FIX] upgrade: small fixes
task-2684744

closes odoo/documentation#1769

X-original-commit: 6a316ca86e
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2022-03-29 12:00:14 +02:00
Antoine Vandevenne (anv)
17b5636645 [FIX] odoo_theme: fix CSS issues and warnings
closes odoo/documentation#1717

X-original-commit: cb7a41b75b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-18 16:07:38 +01:00
Antoine Vandevenne (anv)
990ca4f7ca [REM] extensions: remove the 'switcher' extension
The 'sphinx-tabs' extension is better in every aspect:
- Synchronize selected tabs (group tabs feature).
- No need for extra `code-block` directive (code tabs feature).
- Better looking.
- No custom Python, JS, or CSS.

task-2787415

X-original-commit: 269173caac
Part-of: odoo/documentation#1692
2022-03-11 14:44:46 +00:00
Elisabeth Dickinson
66d3bf35d0 [IMP] scss: content tabs refining
This commit removes unnecessary negative margins and makes code-blocks
inside content tabs lose their bottom margin and border.

closes odoo/documentation#1673

X-original-commit: ac28acee4a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-08 16:31:09 +00:00
Elisabeth Dickinson
f0707ad049 [IMP] scss: make alert full width of parent
Before this commit, the alerts would all have different widths according
to their content, some stretching and getting pushed under the
"on this page" menu. This way all alerts are aligned.

X-original-commit: b76a566522
Part-of: odoo/documentation#1673
2022-03-08 16:31:09 +00:00
Carlos Valverde
9c56734a3a [IMP] documentation: content tabs design
This commit improves current css style added by default to the Odoo
Documentation's content tabs.

This design improvement has been made by following the current theme's
style, especially in terms of palette and borders.

Tabs are responsive and have been optimised in order to have a
cross-browser compatibility.

--
Task-2755240

closes odoo/documentation#1666

X-original-commit: 7250f88b8d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-08 10:16:45 +00:00
Elisabeth Dickinson
1c2ea73923 [IMP] odoo_theme: switch admonitions' display type to inline-block
When placing an image before an admonition block and setting its
alignment to left or right, the admonition block would hide the image.
The reason for this is the use of "float" on the image. In order for
the image to reappear, we change the admonition's `display: block` to
`display: inline-block`.

task-2582954

closes odoo/documentation#1595

X-original-commit: c30f2735b8
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-15 08:50:29 +00:00
Antoine Vandevenne (anv)
dce73864eb [IMP] conf: show all relevant versions in the version switcher
From now on, the master branch and the latest released SaaS branch are
always shown. SaaS branches are labeled "Odoo Online".

The list of the versions shown in the switcher is hard-coded to force
their ordering.

The class `dropdown-toggle` is always added to the version|language
switcher regardless of whether other versions|languages are available,
as a quick fix to a CSS issue that occurs when the class is missing.

closes odoo/documentation#1583

X-original-commit: 3febaffd75
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-11 15:19:39 +00:00
wan
0222285869 [ADD] extensions: add a custom example admonition
closes odoo/documentation#1506

X-original-commit: 434bb66492
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-28 11:20:03 +00:00
Géry Debongnie
2b2611e462 [IMP] developer: rename addons/js => backend/frontend
The terminology did not really make sense for a lot of these sub pages.
This change should have been done long ago, but was probably delayed
because some people in Odoo call the web client the "backend", which is
really misleading.

This commit also renames the title "Reference Guides" to "Reference",
since this section does not contain any guides anyway.

Part-of: odoo/documentation#1260
2021-11-02 14:00:09 +00:00
Antoine Vandevenne (anv)
be1653cc51 [MERGE] Forward-port of branch 13.0 to 14.0 2021-07-07 15:39:35 +02:00
Fabien Pinckaers
16418c020b [IMP] *: introduce tables of contents in top-level app pages 2021-07-07 14:56:38 +02:00
Martin Trigaux
192d9349c1 [MERFE] Froward port of 13.0 to 14.0 2021-06-14 16:11:22 +02:00
Martin Trigaux
c38dbf59ce [MERGE] Forward port of 12.0 into 13.0 2021-06-14 16:04:49 +02:00
Martin Trigaux
207bfd6684 [IMP] extension: mark HTML content as translatable 2021-06-14 15:01:01 +02:00
Antoine Vandevenne (anv)
b30f28a3c4 [MERGE] Forward-port of branch 13.0 to 14.0 2021-06-09 12:22:50 +02:00
Antoine Vandevenne (anv)
251438d569 [MERGE] Forward-port of branch 12.0 to 13.0 2021-06-09 12:10:06 +02:00
Elisabeth Dickinson
c8750ae032
[FIX] odoo_theme: fix header display on small screen widths
The highlight-link was pushing the header height to be on two lines.
It is now absolutely positioned below the searchbar instead of to its right.
The switchers now push themselves to the right instead of being pushed by the searchbar-wrapper.
2021-06-09 11:22:58 +02:00
Antoine Vandevenne (anv)
5469c2fb2c [MERGE] Forward-port of branch 13.0 to 14.0 2021-06-07 09:15:53 +02:00
Antoine Vandevenne (anv)
a8cfd6c6c5 [MERGE] Forward-port of branch 12.0 to 13.0 2021-06-07 09:09:43 +02:00
Antoine Vandevenne (anv)
10e0a48ac0 [IMP] contributing: flatten hierarchy of "documentation" pages
The content of the introduction guide is moved to the parent page which
is itself renamed to "Write documentation". The homepage's quick links
are adapted accordingly.

The chance is also taken to move media files in the appropriate folder.

task-2558998
2021-06-04 17:44:23 +02:00
Elisabeth Dickinson
49baf6b4d7
[IMP] odoo_theme: fix layout on esoteric screens 2021-06-04 17:27:11 +02:00
Antoine Vandevenne (anv)
2591ddc6d2 [FIX] odoo_theme: fix crash on menu loading introduced with 675f7bc8 2021-06-04 16:24:58 +02:00
Antoine Vandevenne (anv)
675f7bc899 [FIX] odoo_theme: highlight all occurrences of a same entry in the menu
When a page is referenced multiple times in the global toctree, only its
latest TOC entry was highlighted (and expanded if it's a TOC page).
This commit allows a page to be referenced multiple times at any level
of the global TOC while correctly highlighting all of its TOC entries.

task-2551473
2021-06-04 11:44:03 +02:00
Elisabeth Dickinson
7efbf490f6 [FIX] odoo_theme: padding fix in sidenav 2021-05-31 16:04:41 +02:00
Victor Feyens
a1e7024fa0 [MERGE] Forward-port of branch 13.0 to 14.0 2021-05-31 15:16:09 +02:00
Victor Feyens
40afc9d9f0 [MERGE] Forward-port of branch 12.0 to 13.0 2021-05-31 14:54:23 +02:00
Victor Feyens
bfec9a58f9 [FIX] code: typos 2021-05-31 14:44:18 +02:00
Antoine Vandevenne (anv)
1758c674e6 [MERGE] Forward-port of branch 13.0 to 14.0 2021-05-28 17:38:04 +02:00
Antoine Vandevenne (anv)
4ca0d019c7 [MERGE] Forward-port of branch 12.0 to 13.0 2021-05-28 17:31:45 +02:00
Elisabeth Dickinson
fa267e5cfc [FIX] odoo_theme: design fixes
- change button color (in line with odoo.com)
- adapt margin above h2
- change gray variable on footer (to use the same as everywhere else)
- fix grey background in nav
- fix opacity on icon when active in nav
- add icons on mobile homepage
- fix missing homepage separator in mobile
- fix nav top padding on mobile (hidden by searchbar)
- adjust nav's active links styles
- adjust margin on version switcher
- hide toctree-wrapper when show-content is in meta
- fix highlighted-link on tablet screen
- style toctree-wrapper (a lil bit)
- hide local toc while page is loading
- SCSS linting
2021-05-28 17:06:58 +02:00
Elisabeth Dickinson
74e7da5694 [FIX] odoo_theme: hide searchbar on scroll in mobile 2021-05-26 17:38:29 +02:00
Elisabeth Dickinson
88f00fe611
[FIX] odoo_theme: remove images from homepage
task-2534617
2021-05-26 11:40:14 +02:00
Victor Feyens
10612f0ba7 [FIX] odoo_theme: unclickable :show-content: pages in global toctree
When navigating the themes tutorial (developer/howto/themes), the
rdtraining page wasn't clickable in the global toc, even though it was
specified as :show-content: (note that the rdtraining is only in 14.0+).

The heuristic extracting the pagename from a toctree node wasn't
considering the current depth if the page referenced by the toctree
node was in the same folder than the current page.

Explanation:

We are computing the toctree for the page developer/howtos/themes. One
of the toctree nodes references the rdtraining page, with a relative
link, i.e. `rdtraining.html`.

We were wrongfully looking for `show_content` in the metadata of the
`rdtraining` page, instead of `developer/howtos/rdtraining`, since we
didn't consider the current document depth when the reference didn't
contain any `/`.

This commit ensures that if the current document has a depth > 1, this
depth is currently considered, even for links referencing documents in
the same folder.

task-2538297
2021-05-25 14:13:01 +02:00
Antoine Vandevenne (anv)
80f24e5533 [MERGE] Forward-port of branch 13.0 to 14.0 2021-05-20 14:55:28 +02:00
Antoine Vandevenne (anv)
1f9cd600cc [MERGE] Forward-port of branch 12.0 to 13.0 2021-05-20 14:46:35 +02:00
Victor Feyens
2ddac026f1 [FIX] extensions: support parallel read
Now that patchqueue was removed, we can consider supporting the parallel 
read with our local extensions.

Since we only have basic extensions, not storing any data on the build 
environment, the change mainly consists of specifying the extensions as 
parallelizable.

The only specific case is the html domain, since the base html domain 
requires the support of the method merge_domaindata in parallel read 
mode.  Since we do not need to share anything between the envs for this 
extension, we can simply ignore the method.
2021-05-19 15:03:39 +02:00
Adrien Dieudonne
83eaee0196 [FIX] theme: hide "Try Odoo" button on iOS
According to the app-store guidelines we are not allowed to sell from
the iOS app.

Our updates are currently blocked because of this.
In the rush, we have no choice but to hide "Try Odoo for FREE" buttons
that redirects the customer to the subscription page.
This is unfortunately not allowed by Apple who consider this
as "In-App Purchase".

Note that in the old documentation (https://www.odoo.com/documentation/user),
this button was located in the header which was hidden in the app
(see related PR).

Source: https://developer.apple.com/app-store/review/guidelines/#business

Related PR:
odoo/mobile-ios#102
odoo/mobile-ios#103

Task-id: 2483253
2021-05-17 09:38:02 +02:00
Antoine Vandevenne (anv)
79e716d41e [MERGE] Forward-port of branch 13.0 to 14.0 2021-05-12 18:30:23 +02:00
Antoine Vandevenne (anv)
7b01bf417c [MERGE] Forward-port of branch 12.0 to 13.0 2021-05-12 18:26:22 +02:00
Elisabeth Dickinson
26d489c6e1
[FIX] theme: improve search bar implementation and behavior
This commit removes the extra search bar that was dedicated to the
mobile layout and adapts the desktop's one to be compatible with mobile.
It also brings back the "Hide Search Matches" button.
2021-05-12 09:49:55 +02:00
Victor Feyens
6aea496f26 [MERGE] Forward-port of branch 13.0 to 12.0 2021-05-11 15:25:37 +02:00
Victor Feyens
3d9afc4c0e [MERGE] Forward-port of branch 12.0 to 13.0 2021-05-11 15:13:58 +02:00
Elisabeth Dickinson
9204658456
[FIX] theme: always hide in-page toctrees
Toctree pages will soon hold content and thus be reachable.
The TOC should never be displayed on those pages.
2021-05-11 10:28:13 +02:00
Antoine Vandevenne (anv)
0695e401a7 [MERGE] Forward-port of branch 13.0 to 14.0 2021-05-04 17:57:56 +02:00
Antoine Vandevenne (anv)
66fcb98192 [FIX] homepage: fix broken top links
# If you feel that it might help a future reader to understand your commit
# motivations, take some time to explain WHY you made these changes in a few
# sentences. The WHAT is usually easily understood by reading the diff.
#
# Short description tip: structure your commit message as if it was completing
# this sentence: "If merged, this commit will ...". For instance, the following
# commit message is correct: "[IMP] sales: compress images to save space".
#
# Tag meanings:
#
# [ADD] = New content
# [IMP] = Improvement
# [FIX] = Content or RST fix
# [REM] = Removal
# [REF] = Refactoring (restructuring)
# [MOV] = Move/rename
#
2021-05-04 17:32:28 +02:00
Antoine Vandevenne (anv)
e3fee2cf46 [REF][MOV] documentation apocalypse
Prior to this commit, the Odoo documentation was mainly split between
two repositories: odoo/odoo/doc and odoo/documentation-user. Some bits
of documentation were also hosted elsewhere (e.g., wiki, upgrade, ...).
This was causing several problems among which:
  - The theme, config, Makefile, and similar technical resources had to
    be duplicated. This resulted in inconsistent layout, features, and
    build environments from one documentation to another.
  - Some pages did not fit either documentation as they were relevant
    for both users and developers. Some were relevant to neither of the
    two (e.g., DB management).
  - Cross-doc references had to be absolute links and they broke often.
  - Merging large image files in the developer documentation would bloat
    the odoo/odoo repository. Some contributions had to be lightened to
    avoid merging too many images (e.g., Odoo development tutorials).
  - Long-time contributors to the user documentation were chilly about
    going through the merging process of the developer documentation
    because of the runbot, mergebot, `odoo-dev` repository, etc.
  - Some contributors would look for the developer documentation in the
    `odoo/documentation-user` repository.
  - Community issues about the user documentation were submitted on the
    `odoo/odoo` repository and vice-versa.

Merging all documentations in one repository will allow us to have one
place, one theme, one work process, and one set of tools (build
environment, ...) for all of the Odoo docs.

As this is a good opportunity to revamp the layout of the documentation,
a brand new theme replaces the old one. It features a new way to
navigate the documentation, centered on the idea of always letting the
reader know what is the context (enclosing section, child pages, page
structure ...) of the page they are reading. The previous theme would
quickly confuse readers as they navigated the documentation and followed
cross-application links.

The chance is also taken to get rid of all the technical dangling parts,
performance issues, and left-overs. Except for some page-specific JS
scripts, the Odoo theme Sphinx extension is re-written from scratch
based on the latest Sphinx release to benefit from the improvements and
ease future contributions.

task-2351938
task-2352371
task-2205684
task-2352544

Closes #945
2021-05-04 15:44:00 +02:00