-
Notifications
You must be signed in to change notification settings - Fork 71
[IMP] Cells: set explicit style on hyperlink-like content #7634
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🇫🇷 commentaires en Alexispeech 🇫🇷 et bug avec le reload cf task pad
| for (const xc in sheet.cells || {}) { | ||
| const content = sheet.cells[xc]; | ||
| if (content && (isMarkdownLink(content) || isWebLink(content))) { | ||
| // debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
| const label = this.link.label | ||
| ? canonicalizeNumberContent(this.link.label, locale) | ||
| : this.link.url; | ||
| // TODORAR add this feature to UPDATE_CELL in the composr as well ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO ?
Currently, we apply a custom style to the cells that contain a content similar to a hyper/markdown link during the rendering process. This means that this style disappears once we export the spreadsheet to other formats (.xlsx for instance ). Furthermore, the detection depends on the elements added to `urlRegistry`. In some cases (specifically when loading a spreadsheet in a public page in Odoo) we might populate this registry differently, which leads to a difference of behaviour between renderers of the same raw content. Since the style was computed during the rendering process, it means that you could not just "get rid" of that style, you had to define a dedicated style to override it, so 'clear format' would never work. This revision changes our strategy and tries to explicitely apply a specific style when adding a content detected as a hyperlink/markdownling. This way, we ensure that the style is hardcoded in the data and will be consistent when we export it in .xslx files or if we show it on a public page in Odoo. Task: 5410289
152e2cb to
36f5691
Compare

Currently, we apply a custom style to the cells that contain a content similar to a hyper/markdown link during the rendering process. This means that this style disappears once we export the spreadsheet to other formats (.xlsx for instance ). Furthermore, the detection depends on the elements added to
urlRegistry.In some cases (specifically when loading a spreadsheet in a public page in Odoo) we might populate this registry differently, which leads to a difference of behaviour between renderers of the same raw content.
Since the style was computed during the rendering process, it means that you could not just "get rid" of that style, you had to define a dedicated style to override it, so 'clear format' would never work.
This revision changes our strategy and tries to explicitely apply a specific style when adding a content detected as a hyperlink/markdownling. This way, we ensure that the style is hardcoded in the data and will be consistent when we export it in .xslx files or if we show it on a public page in Odoo.
Task: 5410289
Description:
description of this task, what is implemented and why it is implemented that way.
Task: TASK_ID
review checklist