Skip to content
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 "wide" option to article TableBlock #12843

Merged
merged 15 commits into from
Sep 19, 2024

Conversation

robdivincenzo
Copy link
Collaborator

@robdivincenzo robdivincenzo commented Sep 9, 2024

Description

This PR will create a new WideTableBlock on article pages with a checkbox so that users can select a table width of either wider than page content (checked by default), or the same width as page content (unchecked by default).

The editor experience remains the same, except the addition of now having a checkbox to change the table width.

Related PRs/issues: TP1-144 / #10332

To Test

This is a little tricky because I was only able to find privately published examples of basic tables on articles.

  1. Check out main
  2. Copy staging data via inv copy-stage-db
  3. Login to the wagtail dashboard via /cms/
  4. Navigate to the parent public page: http://localhost:8000/cms/pages/16712/edit/
  5. Change visibility to Public and publish the page
  6. Navigate to the view the table on the article page: http://localhost:8000/en/campaigns/personalised-pricing/personalised-pricing/
  7. Navigate to the article edit page in order to note the editor screen of the table with no checkbox: http://localhost:8000/cms/pages/16721/edit/
  8. Check out this branch TP1-144-10332-add-wide-table-block (you may also need a new stage db)
  9. Run migrations via inv migrate
  10. Navigate to http://localhost:8000/en/campaigns/personalised-pricing/personalised-pricing/ in order to confirm the migrated table looks the same
  11. Navigate to http://localhost:8000/cms/pages/16721/edit/ in order to view the editor screen of the table and confirm the Wide option now exists and is checked by default.
  12. Uncheck "Wide" to reduce the width to the content of the page and publish the page.
  13. Stop docker and re-run docker-compose up in order to get new tailwind classes
  14. Navigate to http://localhost:8000/en/campaigns/personalised-pricing/personalised-pricing/ in order to view the now narrow table.

┆Issue is synchronized with this Jira Story

@robdivincenzo robdivincenzo marked this pull request as ready for review September 9, 2024 18:15
Copy link
Collaborator

@danielfmiranda danielfmiranda left a comment

Choose a reason for hiding this comment

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

Hi @robdivincenzo!!

Thanks for taking this on. The PR is looking great, and I can confirm that everything is working as expected! 👍

I’ve left a question I have regarding the table width on medium breakpoints and below, as well as some other minor suggestions.

Let me know what you think, thanks again!

Copy link
Collaborator

@danielfmiranda danielfmiranda left a comment

Choose a reason for hiding this comment

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

Thanks @robdivincenzo!
LGTM 🚀

@robdivincenzo robdivincenzo merged commit c129386 into main Sep 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants