-
Notifications
You must be signed in to change notification settings - Fork 153
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
updated petition snippets to be ordered newest to oldest #7955
Conversation
…dation.mozilla.org into 7615-petition-snippet-order
@@ -271,6 +271,7 @@ class Petition(TranslatableMixin, CTA): | |||
] | |||
|
|||
class Meta(TranslatableMixin.Meta): | |||
ordering = ['-id'] |
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.
Since snippets do not seem to have a "created" or "created_date" column, I am ordering them by their unique ID's which are assigned upon creation. That way we can order them by newest to oldest
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.
that's basically the only option for snippets, so: approved =P
So I see how the newest snippets appear at the top of the snippet creation list. This is great and super helpful. To be honest tho, the intention of this ticket was to make it appear at the top of the CTA picker. For example:
Screen cap of current picker within a page to show that the newer snippets appear last: I'll approve this PR since it is still a nice improvement but perhaps we should open a follow up ticket for the in page picker? |
Hi @kristinashu! wanted to give you a heads up that I updated this PR to now order the snippets under the campaign chooser panel as requested. Below is a screenshot of what appears now, thanks! |
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.
Perfect, thank you!
Closes #7615
Link to sample test page: https://foundation-s-7615-petit-w9nftu.herokuapp.com/cms/snippets/wagtailpages/petition/?locale=en
Steps to test:
Checklist
Changes in Models: