-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add an ONS table block #108
base: main
Are you sure you want to change the base?
Conversation
ce7c890
to
f859592
Compare
f859592
to
e5d86c7
Compare
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.
Done an initial pass, this looks really good. Open sourcing TinyTableBlock 🎉 👍
- The
Row header
option does not work as expected when using the UI buttons. It works as expected when copying/pasting, but it does not "understand" that we have row headers and the icon is not highlighted. The column header is working as expected. - We should add functional tests to validate the table behaviours. I feel like there are a few gaps that we don't test. We should test the different functionality and conditional cases such as each element is rendered if input, such as title, caption etc.
- There is an alignment issue with the table/page. It is indented too much. See attached image:

cms/tiny_table_block/static/tiny_table_block/js/tiny-table-block.js
Outdated
Show resolved
Hide resolved
That is because I wrapped the whole output in a |
@MebinAbraham I've re-tagged you. Will shortly switch to using the PyPI package for TinyTableBlock, but I think the changes are worth checking here |
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.
Minor comments. LGTM! Will approve once the changes in progress are complete and I re-review =)
<caption class="ons-table__caption{{ " ons-u-vh" if params.hideCaption }}">{{ params.caption }}</caption> | ||
{% endif %} | ||
<thead class="ons-table__head"> | ||
{% set headers = params.headers if params.headers else parms.ths|list %} |
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.
Typo, hides the invalid param use.
{% set headers = params.headers if params.headers else parms.ths|list %} | |
{% set headers = params.headers if params.headers else params.ths|list %} |
This still seems to be outstanding. Also, I feel like there are still gaps in the test. We should have confidence in the features TinyMCE provide such as merged cells, row headers, column headers etc. For headers, we have tests that validate the value is displayed but not whether it is syntactically correct. At the moment, we don't validate the rendered version for things like merged cells, row headers, column headers etc. Other than some gaps in tests, LGTM 👍 |
What is the context of this PR?
This PR adds:
Screen recording
To-Do:
How to review
Check the branch out, add/edit a statistical artcile/ methodology page.
Follow-up Actions