Commit Graph

104 Commits

Author SHA1 Message Date
Elisabeth Dickinson
e94a132e1a [IMP][CSS] Rescale heading fonts 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
f35e8482f8 [IMP][CSS] Cleanup font variables 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
5b6705fecc [IMP][CSS] Cleanup admonitions (alerts) 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
0f911e984b [IMP][CSS] Cleanup color variables 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
c51edecd28 [IMP][CSS] update literals styles (.o_code, .sig-*) 2023-01-03 18:30:40 +01:00
Antoine Vandevenne (anv)
fe894ad110 [IMP] odoo_theme: add the class o_code on literals
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.
2023-01-03 18:30:36 +01:00
Antoine Vandevenne (anv)
e3972349f4 [FIX] odoo_theme: handle non-TOC pages when expanding top menu entries
Trying to "expand" those pages lead to a crash that prevented the menu
to be shown at all.

Incidentally, this commit also handles menus built with `make fast`.

closes odoo/documentation#3252

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-02 18:47:57 +01:00
Antoine Vandevenne (anv)
dca158c867 [IMP] odoo_theme: scroll the active menu entry into view
In large and deeply nested TOCs like finance/accounting/fiscal_localizations/localizations/...
the user had to constantly scroll the menu to the menu entry they just
clicked because the expanded menu would not fit entirely on the page.
With this commit, the active menu entry is scrolled into view each time
the page is reloaded.

The previous behavior was also the reason for expanding the top menu
entries on only the homepage. Thanks to the scroll, they now always
expand.

Part-of: odoo/documentation#3252
2023-01-02 18:47:57 +01:00
Antoine Vandevenne (anv)
c8f8164943 [FIX] odoo_theme: update the aria attributes when scrolling the page TOC
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

closes odoo/documentation#3235

X-original-commit: f068065d39
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-27 13:04:22 +01:00
Antoine Vandevenne (anv)
a179595415 [IMP] odoo_theme: expand top level menu items on the homepage
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#3235
2022-12-27 13:04:22 +01:00
Morgane (morm)
4259241ffd [IMP] documentation: legal page design
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

closes odoo/documentation#3122

X-original-commit: b7bc34a197
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-07 15:21:24 +01:00
Morgane (morm)
6ba5660133 [FIX] documentation: tabs responsiveness
Prior of this commit, the tabs were not responsive in the documentation

closes odoo/documentation#3076

X-original-commit: c9a001d22b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-06 12:33:56 +01:00
Victor Feyens
c24d780387 [FIX] *: remove trailing whitespaces
Part-of: odoo/documentation#2980
2022-11-18 17:32:59 +01:00
Victor Feyens
cf2b1b934d [FIX] *: enforce 1 newline on files end
Part-of: odoo/documentation#2980
2022-11-18 17:32:58 +01:00
Victor Feyens
5128208495 [CLN] core: upgrade to python 3.6
& sort imports

closes odoo/documentation#2957

X-original-commit: 8a5aa384d3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-15 20:19:10 +01:00
Antoine Vandevenne (anv)
340e90b5c2 [IMP] extensions/spoilers: add an extension for spoilers
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

closes odoo/documentation#2873

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>
2022-10-28 13:53:20 +02:00
stefanorigano (SRI)
2ce86088a4 [IMP] odoo_theme: add default BS functions
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#2873
2022-10-28 13:53:19 +02:00
Victor Feyens
217dba8bbe [IMP] conf.py, requirements.txt, *: allow building with Python 3.10
- 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#2362
2022-07-14 17:38:42 +02:00
Antoine Vandevenne (anv)
ec7b978fb3 [FIX] odoo_theme: show a cursor when hovering on an image without modal
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#2462
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
2022-07-13 18:36:00 +02:00
Antoine Vandevenne (anv)
435f21ab30 [FIX] odoo_theme: only open images that have no target in modal
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#2462
2022-07-13 18:36:00 +02:00
Antoine Vandevenne (anv)
5f2879b3cc [FIX] odoo_theme: fix the display of modal images in mobile
task-2908330

closes odoo/documentation#2443

X-original-commit: 5e0f14f683
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-12 16:29:54 +02:00
Antoine Vandevenne (anv)
109817311e [MOV] developer/misc: move all pages to a more logical location
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

closes odoo/documentation#2368

X-original-commit: 4e67b8986c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-04 11:57:52 +02:00
Antoine Vandevenne (anv)
e2a3ca0631 [IMP] developer/views: apply the new API references style
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

closes odoo/documentation#2336

X-original-commit: 7f95e9e2e0
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-28 18:32:10 +02:00
Elisabeth Dickinson
7836fe7b76 [REF] odoo_theme: replace values with variables in SCSS files
X-original-commit: c82d95b17c
2022-06-27 15:32:01 +02:00
Elisabeth Dickinson
c5df00b604 [REF] odoo_theme: move stray mixins into the _mixins.scss file
X-original-commit: 7fa153594d
2022-06-27 15:32:00 +02:00
Elisabeth Dickinson
6419e4c5a3 [CLN] odoo_theme: remove unnecessary css
X-original-commit: fca78f44db
2022-06-27 15:31:59 +02:00
Elisabeth Dickinson
38ae5643dd [CLN] odoo_theme: remove old doc's unused variables
X-original-commit: 383e3d4206
2022-06-27 15:31:58 +02:00
Elisabeth Dickinson
cf91bd9c3c [REF] odoo_theme: move scrollbar styling to .o_side_nav-inner
X-original-commit: b9ca38215d
2022-06-27 15:31:57 +02:00
Elisabeth Dickinson
cea130cbfd [CLN] odoo_theme: remove old doc's utility mixins
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
2022-06-27 15:31:56 +02:00
Elisabeth Dickinson
995826e04a [IMP] odoo_theme: replace "hide search matches" by a close button
X-original-commit: 994d273a59
2022-06-27 15:31:55 +02:00
Elisabeth Dickinson
4b227945d8 [IMP] odoo_theme: improve spacing around code blocks on reference pages
X-original-commit: 794e42f78b
2022-06-27 15:31:54 +02:00
Elisabeth Dickinson
283787fe55 [FIX] odoo_theme: fix scrollTo margin/padding with new headers height
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
2022-06-27 15:31:53 +02:00
Elisabeth Dickinson
75a4ed156b [FIX] odoo_theme: remove the horizontal scroll bar
X-original-commit: 26bc1cd707
2022-06-27 15:31:52 +02:00
Elisabeth Dickinson
4b3bed78e9 [IMP] odoo_theme: improve URL stylings
- 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
2022-06-27 15:31:51 +02:00
Elisabeth Dickinson
0fc6efc3e8 [IMP] odoo_theme: improve general spacings and paddings
X-original-commit: 2e693b3c4a
2022-06-27 15:31:50 +02:00
Elisabeth Dickinson
3ca5f7c38e [IMP] odoo_theme: improve special terms styling
Including the `:command:`, `:file:` and `:dfn:` roles, and code-styled
text in alerts.

task-2790284

X-original-commit: 7239986484
2022-06-27 15:31:49 +02:00
Antoine Vandevenne (anv)
f10eb0ef3b [IMP] odoo_theme: open images in a modal
task-2358082

closes odoo/documentation#2278

X-original-commit: 2a867b4f60
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
2022-06-23 14:41:48 +02:00
Antoine Vandevenne (anv)
fabad3da33 [IMP] redirects: split redirects.txt into multiple, per-version, files
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

closes odoo/documentation#2277

X-original-commit: 9dcc8bb071
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-23 13:30:48 +02:00
Antoine Vandevenne (anv)
9dc440ff41 [FIX] odoo_theme: correctly test for fallback URLs when using switchers
closes odoo/documentation#2269

X-original-commit: 9e84b6f681
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-23 10:46:18 +02:00
Elisabeth Dickinson
cf40a90c81 [FIX] odoo_theme: fix highlight blocks in field-list items
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.

closes odoo/documentation#2225

X-original-commit: a689ea236d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-20 11:25:04 +02:00
Antoine Vandevenne (anv)
44a025babf [FIX] odoo_theme: stop testing for valid URLs if in localhost
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
2022-06-15 11:27:18 +02:00
Elisabeth Dickinson
ac3b5349f9 [FIX] odoo_theme: fix searchbox's highlight-link
task-2800937

X-original-commit: 3fd32fe92a
2022-06-15 11:27:17 +02:00
Elisabeth Dickinson
532992084d [IMP] odoo_theme: revamp side menu to add overlay
task-2800937

X-original-commit: 4ed8c2238a
2022-06-15 11:27:16 +02:00
Elisabeth Dickinson
e1504aac49 [FIX] odoo_theme: fix menu scrolling
task-2800937

X-original-commit: 9c53901db9
2022-06-15 11:27:15 +02:00
Elisabeth Dickinson
9f31188560 [IMP] odoo_theme: add side menu collapse icon
task-2800937

X-original-commit: 7284b11a36
2022-06-15 11:27:14 +02:00
Elisabeth Dickinson
315f1a1a26 [IMP] odoo_theme: change collapsing menu orientation
task-2800937

X-original-commit: dee96ad2da
2022-06-15 11:27:13 +02:00
Elisabeth Dickinson
cef926b284 [IMP] odoo_theme: add subheader and adapt switchers and searchbar
task-2800937

X-original-commit: 411e1cb1d3
2022-06-15 11:27:12 +02:00
Elisabeth Dickinson
4e8fc887db [IMP] design: add an icon behind external links
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

closes odoo/documentation#2208

X-original-commit: 343decf192
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-14 15:28:11 +02:00
Elisabeth Dickinson
07e943f85c [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#2194

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:42:03 +02:00
Antoine Vandevenne (anv)
c8e9d82884 [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#2139

X-original-commit: f6cd947d6b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-02 13:13:09 +02:00