8000 [ADD] UI: odoo spreadsheets svg icons by samueljlieber · Pull Request #13386 · odoo/documentation · GitHub
[go: up one dir, main page]

Skip to content

[ADD] UI: odoo spreadsheets svg icons #13386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samueljlieber
Copy link
Contributor
@samueljlieber samueljlieber commented May 15, 2025

Task: #4792034

This PR proposes introducing the o-spreadsheet icons into the Odoo documentation.


How this works

The Spreadsheet library in Odoo contains two QWeb template files for SVG icons:

These were used to generate an SVG sprite file (extensions/odoo_theme/static/img/odoo-spreadsheets-icons.svg), which can then be utilized by the SVG <use>element to call nodes by ID in the sprite.

This SVG sprite file is then included in the main page layout (extensions/odoo_theme/layout.html)

The RST :icon: role was updated to accomodate an os-* icon specifier.

The SVG sprite file can be generated automatically via a simple script outlined in this gist:
https://gist.github.com/samueljlieber/5ae7648a5ca08e0bfc8455861825e2ff


Why?

This PR attempts to scale an earlier method I used, the RST raw-html(raw) role includes the <svg> markup directly in the Global Filters doc (see this diff).

This was/is not scalable, is not usable throughout multiple docs, and will decay over time as the o-spreadsheet library is updated. This PR attempts to find a solution for using o-spreadsheet icons in documentation.

This PR is opened as a draft on master to discuss this implementation. There are version-specific icons outlined in the graphic below.

View the SVG icons directly in the built documentation

os-icons-versions

Example

With this implementation, o-spreadsheet icons can be used like so:

This is the :icon:`os-global-filters` :guilabel:`(global filters)` icon!

@samueljlieber samueljlieber self-assigned this May 15, 2025
@robodoo
Copy link
Collaborator
robodoo commented May 15, 2025

Pull request status dashboard

@samueljlieber samueljlieber added the technical improvement Technically improve the documentation site label May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical improvement Technically improve the documentation site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0