Note: Some code is commented instead of being deleted.
This allows us to keep track of what should be commented out in future
versions of Sphinx' basic CSS.
The SCSS that styles the `literal`, `code`, `file`, and `command` roles
is excessively complex because the traduction from RST to HTML is not
consistent from one role to another: some use `<code>` elements, some
have the `code` class, some wrap the literal with a `span` element.
This commit sets the `o_code` class on all of these roles' parent node
at translation time to allow simplifying the SCSS target.
The 'aria-expanded' attribute was not correctly updated on the `i` tag
when the user scrolled through the page TOC. This caused a minor issue
where an arrow (`i`) that was collapsed manually with a click would no
longer automatically expand afterward.
task-3106339
closesodoo/documentation#3239
X-original-commit: f068065d39
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
When the user browses the homepage, it might be hard to figure out
where they want to go next. Expanding the top-level menu items could
help them with that.
task-3106339
X-original-commit: 5526f1ea07
Part-of: odoo/documentation#3239
Prior to this commit, the terms and conditions were displayed in a table
with all the languages and it was not practical for the futur, with many
more languages.
task-3073198
closesodoo/documentation#3139
X-original-commit: a52a9eef2d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Prior of this commit, the tabs were not responsive in the documentation
closesodoo/documentation#3081
X-original-commit: c9a001d22b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
It is often needed in developer tutorials to show excerpts of code for
examples and solutions. This takes quite some page space and, for the
latter, it is not always desired to show the final code result right
after the exercise objective.
This commit adds a spoiler feature to the documentation to allow hiding
content until the reader wants to display it.
The feature relies on the new `.. spoiler:: Button label` directive.
task-3036845
closesodoo/documentation#2877
X-original-commit: 4d7a88639a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Morgan Meganck <morm@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Prior to this change it was not possible to use Bootstrap default SCSS
functions in 'bootstrap_overridden.scss'.
This commit mirrors odoo framework's architecture, injecting bootstrap
'_functions.scss' at the beginning of the documentation's SCSS "bundle".
Commit preparatory to the introduction of the 'Spoiler' documentation
component.
task-3036845
X-original-commit: 1691e8970b
Part-of: odoo/documentation#2877
- Bump Sphinx version to 4.3.2 (default for Debian Jammy).
- Remove the retrocompatibility for Sphinx < 3.5 (warnings are raised in
4.5).
- Fix translator issue crashing builds.
- Unpin jinja2 from the requirements as the base issue is solved in sphinx 4
Task - 2898477
Part-of: odoo/documentation#2455
The images that have the class `o-no-modal` cannot be clicked to open in
a modal, so the cursor should not be changed to a pointer when hovering
on them.
This commit also simplifies the theme's SCSS by replacing the hard-coded
SVG images used in the "Supported versions" page by unicode circles with
a custom styling.
X-original-commit: f648960c78
Part-of: odoo/documentation#2467
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
Since clicking on the image redirects the user to the target URL, it's
useless to open the image in a modal. Also, it partially broke the
layout of the /legal.html page due to the modal div being inserted into
table cells.
This commit also introduces the possibility to add the `o-no-modal`
class on images that should not open in a modal.
task-2909167
X-original-commit: 7cbbb77746
Part-of: odoo/documentation#2467
Before this commit, the "Developer/Misc" directory of the doc, and
more particularly the "Developer/Misc/Other" sub-directory, was used as
a garbage dump where we moved all the pages that didn't fit elsewhere.
Due to that, interesting and important pages, such as the Coding
Guidelines, were buried in that directory never to be read again by Odoo
developers.
This commit moves most pages under "Misc" one or two levels up to be
located directly under "Developer" hence making them more accessible. A
new "Contributing/Development" directory is added to host the Coding
Guidelines page and soon many other pages.
task-2897143
closesodoo/documentation#2381
X-original-commit: 12ff9f118b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The documentation of view attributes was lacking visual structure to
help the reader figure out which attribute relates to which parent
element. Since this documentation was relying on RST block quotes to
represent the hierarchy of view attributes, we can apply the same new
styling that was added with commit 934f45cf and designed for autodoc,
and which relies on the exact same HTML structure as block quotes.
task-2755298
closesodoo/documentation#2342
X-original-commit: e2a3ca0631
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
These mixins were used in the old doc and were kept "just in case". The
`valid-radius` mixin already exists in the bootstrap library.
X-original-commit: 9a2e8eefef
The scroll padding needed increasing with the new sub-header.
Unnecessary calc() and parenthesis on the headers-height variable are
removed.
X-original-commit: 0b536debac
- Remove external-link icon on images.
- Remove underline from external-link icon on link hover.
- Add overflow-wrap on URLs on mobile.
X-original-commit: 91cb3ca026
The `redirects.txt` file used to specify redirect rules for renamed or
moved documentation pages is starting to grow too big to be easily
maintainable. The main reason is that the number of redirect rules that
were thought to be required has been largely underestimated when
implementing the 'redirects' extension. At first, we believed that no
guidelines or structure were necessary because only a small amount of
redirect rules would be specified. This proved wrong and the file is now
becoming a mess, making it increasingly difficult to figure out where,
why, when, and if a redirect rule is specified in the file.
As the file is versioned, another issue emerges: conflicts occur every
time a commit is forward-ported to a later version if that commit adds a
redirect rule at the end of the file or at a line that was changed in
the later version. As redirect rules are frequently added, and since
blocks of redirect rules for new versions are added at the end of the
file, this tends to happen a lot.
This commit attempts to hit two birds with one stone by splitting the
`redirects.txt` file into multiple files, one per version. While doing
so, the existing redirect rules are ordered alphabetically and moved
into contextual blocks. Instructions and guidelines on how to create
redirect rules are also listed in the `redirects/MANUAL.md` file. By
sorting the redirect rules and adding them in different files, the
number of conflicts should decrease by a lot.
task-2891912
closesodoo/documentation#2292
X-original-commit: 0417b95514
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
On pages such as /developer/reference/backend/orm.html#fields, the
highlight blocks inside `dl.field-list` items were pushing the width of
the page to go outside the screen on mobile. This is fixed by changing
the `.field-list`'s `display: grid` into `block` on mobile.
closesodoo/documentation#2230
X-original-commit: a689ea236d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The mechanism that makes the version and language switchers test for
valid URLs crashed when testing in localhost. The mechanism is now
skipped if the URL starts with a '/'.
X-original-commit: 98e98f65c9
The external links' target attribute is now also updated to open the
link in a new tab. In addition, the "[source]" link of autodoc's models
is moved right next to the name of the model to correctly position the
icon.
task-2790244
closesodoo/documentation#2213
X-original-commit: 343decf192
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/documentation#2201
X-original-commit: c0040fa532
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
The page was moved from odoo.rst to external_api.rst with commit
0fc52188.
task-2870501
closesodoo/documentation#2143
X-original-commit: f6cd947d6b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
urlBase was only containing the domain name, not the /documentation/
closesodoo/documentation#2062
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/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>
This new directive is generating documentation from Odoo fields. This
can be used to build documentation about business classes.
This will help developpers import/export data and build localization
modules for instance.
X-original-commit: 16afaf6fa7
Part-of: odoo/documentation#1969
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
This commit removes unnecessary negative margins and makes code-blocks
inside content tabs lose their bottom margin and border.
closesodoo/documentation#1673
X-original-commit: ac28acee4a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
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
closesodoo/documentation#1666
X-original-commit: 7250f88b8d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/documentation#1595
X-original-commit: c30f2735b8
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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.
closesodoo/documentation#1583
X-original-commit: 3febaffd75
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
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.
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
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
- 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
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
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.
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#102odoo/mobile-ios#103
Task-id: 2483253