Skip to content

Add common styling options (#27) - #30

Merged
zerolab merged 5 commits into
torchbox:mainfrom
dest81:27-common-styles
Jun 29, 2026
Merged

Add common styling options (#27)#30
zerolab merged 5 commits into
torchbox:mainfrom
dest81:27-common-styles

Conversation

@dest81

@dest81 dest81 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #27.

This PR adds text formatting options for cells, allowing users to apply bold, underline, italic, and strikethrough styles.

@zerolab

zerolab commented Jun 17, 2026

Copy link
Copy Markdown
Member

Thank you for this @dest81 !

I was thinking we make these configurable. e.g. for our use case, we don't want the styling options.

Also, while at it, it makes sense to align it a bit with the Wagtail ones. My thinking in #27 was to have these off by default, but configurable per widget (features - a list, cross-referenced with the allow list. Defaults to empty):

  • bold
  • italic
  • strikethrough
  • subscript
  • superscript
  • blockquote
  • code

As a follow-up, I think it will make sense to add global settings (e.g. WAGTAIL_TINYTABLE = {"features": [...]}) as we'll need to think about the page/document chooser too.

Sources:

@dest81

dest81 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for this @dest81 !

I was thinking we make these configurable. e.g. for our use case, we don't want the styling options.

Also, while at it, it makes sense to align it a bit with the Wagtail ones. My thinking in #27 was to have these off by default, but configurable per widget (features - a list, cross-referenced with the allow list. Defaults to empty):

  • bold
  • italic
  • strikethrough
  • subscript
  • superscript
  • blockquote
  • code

As a follow-up, I think it will make sense to add global settings (e.g. WAGTAIL_TINYTABLE = {"features": [...]}) as we'll need to think about the page/document chooser too.

Sources:

Understood... On it.

@dest81
dest81 force-pushed the 27-common-styles branch from dc98a99 to 0941d1d Compare June 19, 2026 11:02
@dest81
dest81 force-pushed the 27-common-styles branch from 0941d1d to 428d0b9 Compare June 19, 2026 11:04

@zerolab zerolab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Left a few suggestions for readability/clarity.

Needs tests and we're good to roll

Comment thread src/wagtail_tinytableblock/constants.py
Comment thread src/wagtail_tinytableblock/utils.py Outdated
Comment thread src/wagtail_tinytableblock/static/wagtail_tinytableblock/js/tiny-table-block.js Outdated
Comment thread README.md Outdated
@dest81

dest81 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

@zerolab I have applied all your suggestions and added tests.

@dest81
dest81 requested a review from zerolab June 28, 2026 14:27
Comment thread tests/test_blocks.py
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread tests/test_blocks.py
Comment thread tests/test_blocks.py Outdated
Co-authored-by: Dan Braghiș <31622+zerolab@users.noreply.github.com>
@zerolab
zerolab merged commit 95caadc into torchbox:main Jun 29, 2026
9 checks passed
@zerolab

zerolab commented Jun 29, 2026

Copy link
Copy Markdown
Member

Thanks @dest81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for common styling options

2 participants