Skip to content

Separate template submission from saving #447

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

Merged
merged 12 commits into from
Apr 29, 2025

Conversation

HawkiesZA
Copy link
Contributor

@HawkiesZA HawkiesZA commented Apr 24, 2025

Purpose

At the moment, whenever you save a new revision of a template, it gets submitted.

We want to separate the submission action from the saving action, so that we get to decide when it is submitted to Meta.

Solution

This separates the submission action from the saving action and adds a submission button and a bulk submit action

Checklist

  • Added or updated unit tests
  • Added to release notes
  • Updated readme/documentation (if necessary)
  • Add support to FakeCMS in the flow tester (if necessary)

@HawkiesZA HawkiesZA self-assigned this Apr 24, 2025
Copy link

github-actions bot commented Apr 24, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  contentrepo
  urls.py
  home
  models.py
  views.py 628-636
  wagtail_hooks.py 163-164, 170
  whatsapp.py 18
Project Total  

This report was generated by python-coverage-comment-action

Gerrit Vermeulen added 2 commits April 24, 2025 10:36
Copy link
Contributor

@rudigiesler rudigiesler left a comment

Choose a reason for hiding this comment

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

Looks good!

I don't see where we're doing deduplication now though. If we submit the same template under a different name, Meta rejects it. I think since we're no longer submitting on every revision, we should look up the latest revision that has been submitted, and compare it to the current one. If it's changed, then we resubmit. If it hasn't, then we just copy the template name over to the current revision.

@HawkiesZA HawkiesZA merged commit a671c4b into main Apr 29, 2025
2 checks passed
@HawkiesZA HawkiesZA deleted the separate_template_submission_from_saving branch April 29, 2025 10:10
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.

2 participants