What’s New in Wagtail CMS | Release 2.12 | Telepath, Webstories, Commenting & Documentation Sprint
Transcript
By Speaker 1, Speaker 2, Speaker 3, Speaker 4, Speaker 5, Speaker 6. From Wagtail CMS 2023. Published August 18, 2023.
Watch the video Markdown version 8,575 words · auto-generated · en
Summary
Wagtail 2.12 adds Python 3.9 support, new permissions for multi-tenancy, performance and accessibility improvements, and easier admin theming. The StreamField rewrite uses Telepath to move more work into the browser, making complex editors faster and enabling features such as block duplication, collapsing, and richer front-end extensions without requiring standard Wagtail projects to be rewritten. The presenters also show planned in-editor field and inline commenting, a Web Stories integration that imports externally created stories, documentation improvements from a community sprint, and an A/B testing package that compares page variants against goals such as page visits, form submissions, or donations. The work reflects priorities identified through a user survey and contributions or sponsorship from organisations including Mozilla, Google, Motley Fool, UGov, Caltech, and the wider Wagtail community.
Transcript
Automatically transcribed, so expect mistakes in names and technical terms. Filler words are removed.
Speaker 1
Hello everybody and welcome. This is our third instalment of What's New in Wagtail, so it's brilliant to see so many of you joining us today. So I'm Lisa and I head up our events at Torchbox, including this one and so I'm always interested to hear any feedback that you have and any suggestions or topics. And I am delighted to introduce our speakers for today. So we have Tom Dyson who is a Torchbox co-founder and our technical director and heads up the Wagtail tech team as well, or who's a Wagtail lead. Tom 's going to be taking us through the results of our survey from last year and what functionality has been implemented following that. We also have Lara joining us today and she is a graduate developer at Torchbox and she's going to be sharing the results of our documentation.
Sprint from a couple of weeks ago. We've also got two people who you might be familiar with already, Matthew Westcott, otherwise known as Gasman, and also Carl Hobley, and they are senior developers and Wagtail consultants. We also have Jacob who is a developer and Wagtail consultant as well. So we've got 60 minutes for the session and we've got quite a lot to get through. So we're going to have time for at least one question after every section so please do use the chat and the Q<unk>A facility and for any that we don't manage to get to we'll answer them at the end or if we run out of time completely then I will follow up with an email and send you all of the answers afterwards. We are recording this today as well because there is quite a lot to get to. So if you need to watch it back afterwards you'll be able to. And I think that's
about it. So I will hand over to Tom to get things going.
Speaker 2
Thanks Lisa. And it's just a question from Al here and just to want to reassure you that you are all on mute. So when you're kind of participating in a webinar like this we can't accidentally hear or see you. So don't worry about that. So it's been it's been an exciting few weeks for Wagtail. There's the new release which I'm going to talk about in a minute, but also some very exciting sites have launched and in particular one that you might know about by jpl so we had a hard deadline for this site but which was time to be ready in time for the mars landing So we're all it was an incredible experience for us to be to be watching the Mars landing through the Wagtail site that that was launched earlier this year. And I know there's a couple of people here from JPL on the call. If you haven't seen the site already,
It's at jpl. nata. gov and it's something we're all very proud and excited about. But I also want to tell you about some of the other changes that that some of the other improvements in Wagtow recently and got a very short presentation to show on this. So you you're probably aware, I hopefully aware that 2. 12 came out pretty recently, a couple of weeks ago and Although the previous two releases, 2. 10 and 2. 11, were really bumper releases, probably the biggest two that we've had in Wagtail's history And 2. 12 doesn't have quite the same number of kind of amazing standout features. But nevertheless, it's a it's an exciting upgrade and one that I hope those of you who are already using Magtel will upgrade to quickly. It's an easy upgrade as usual.
2:40 Wagtail 2.12 overview
Speaker 2
It supports Python 3. 9. So we've always tried to keep track of the latest version of Python. In this case, 3. 9 came out in October. So we're kind of shortly afterwards we were able to have official support for it. We have a new type of permissions, which we'll I'll mention a bit later, but this is a step that really helps Wagtail become a kind of fully fledged multi-tenancy system. Something that sounds maybe a bit more niche and technical is in-place stream field editing. And this was a kind of under the hood change, but actually it opens up some pretty interesting possibilities within Wagtail. For example, the ability to create new stream field components on the fly when you when you save your pages. And then other changes like this is a really interesting contribution from someone in New York
who may be on the call. I think his first big open source contribution. And it's a really cool one. It's a uses some features of CSS that I didn't know about and it mean makes it really easy now to theme your admin site. This could be useful if you have a staging and production environment and you want to make it really clear about the two versions you're in, for example And as usual, there's a collection of performance improvements and accessibility improvements. And we're really, you know, this is kind of a constant direction for Wagtail, just that when you upgrade and things just get better. We ran a survey last year and I'm sure some of you participated in it. It was it was pretty wide ranging. Lots of lots of participants from around the world, mainly people who are using Wagtail
4:30 Survey priorities and key indicators
Speaker 2
already. And we backed that up with doing quite a few in-person phone calls and interviews to kind of get deeper into the subject And there's some really interesting results, but these are the top-level things that that people wanted. These are the priorities that people had. And it's quite a big list, but I'm really proud that in the last six months we've delivered on a lot of it. And I should say that's that's with a lot of help from the community and with from generous sponsors. So internationalization, this is the big one. And those of you who came to the last What's New Imaged in Wagtail webinar will have seen the amazing localized feature, which I think makes Wagtail now really like best in breed for open source content management with translations.
And we're really grateful to Mozilla who funded most of the work on this because they needed it on their own sites. There's also been a quite a push on the page editor rewrite, and this is less visible, and this is something that Matthew's going to talk about in a minute But this is some kind of refactoring about the way that White Town, particularly the streamfield editor works, that's gonna open up. Possibilities for some really interesting work. And so that is largely done. And that's thanks to Ugov who sponsored that. And it makes things like live preview and Wagtail admin API, they're not, they're not there yet, but they 've been unlocked by this work and that's really exciting for us. Workflow is another feature that was on that was kind of top
high priority for a lot of people. And that's been delivered. You'll maybe remember that from Wagtail 2. 10. And that was sponsored by Motley Fool, who's been fantastic support for Wagtail over the last year. Multi-tenancy, this is the choose permission thing that I just mentioned. This was another contribution, but not this was a contribution in code and this comes from Caltech. I think some Caltech people on the call here. The multi-tenancy has been an important requirement for them from the beginning. They had their own solution for it and now they've contributed it to Wagel and that's that's really fantastic. We're really grateful for their help on that. And then finally, there's a continuous push towards improving our accessibility and our documentation. And neither of these are features which we can never say
are finished or complete, but they're things that we continue to push forward on Accessibility has been there's been a lot of progress on this over the last year. We had an accessibility sprint last year and more recently a documentation sprint, which Laura's going to tell us about later. In these cases, there's been a huge amount of work from the growing community around Wagtail, and that's something we're we're really grateful for. But next up, I'm going to hand over to Matthew, who's going to talk about the Streamfield Rewrite.
7:30 Stream Field rewrite updates
Speaker 3
Okay, yep. So yep, so Screenfield is one of the most enthusiastically adopted features of Wagtail the model that it gives you of mixed blocks of different kinds of content that you can arrange in any order is one that finds really widespread use in content management in ways that we may not have anticipated when we first built it, which is really great to see. But it does mean that As people have got more and more bold with their use of Streamfield, the technology has sometimes struggled to keep up with people's ambitions. So if I share with you an example of this, which perhaps represents the worst case scenario for
Streamfield Performance, you can see we've got various different block types. From sort of plain paragraphs to block quotes, calls to actions, embedded videos, carousels. And we're allowing the content author to arrange these intersections of three columns here then one column then two columns and if I show you the code for this you can see we've got sort of the half a dozen or so different blocks defined here, which are all put together in this stream, and then that stream can appear in sort as in any of these positions, either as a single column block or on the left or right of a two-column or left middle
right of a three-column. There's a lot of nesting going on in this definition Now, this isn't something we'd really encourage people to do, having content editors have control over their own page layouts. That's something that we say is better done in the template within code But nevertheless, this is something that the data model permits, and so it's only fair that the Wagtail editing interface should support this kind of setup without it falling over. So if I go into the editing interface of this, hopefully I'm still logged in here. Yep. And if I click on the edit page for this you'll notice there's a few seconds before it even responds to that
Before it starts serving this editing interface and then again a few more seconds for that to load so before it's fully usable. And the reason for that is the amount of content that's being the that's being transferred here, just the amount of HTML, I think there's close to a megabyte of HTML here. And that's because the Streamfield editing interface is at its heart still a traditional Django web application. where everything is being rendered server-side. So all of these content blocks, these form fields, those are being rendered to HTML on the server. and sent over to the client. And yep, there are bits of bits of JavaScript
involved here for the dynamic elements being able to insert and delete blocks. But it's all implemented in this kind of very primitive way. It's kind of it's kind of like an extension of the server-side code where it's just defining when you click on this button here, insert this. this block of HTML. And that means that not only do we have to have all of these form fields sort of as part of the page rendering, we also need to include every place where a block could potentially be and since we've got six or seven block types which can appear in each of six or seven different positions, then that sort of adds up like 30 of these things. It all sort of spirals out of control pretty quickly.
And yeah, it's all written in this way that's only really understandable to back end developers. It's certainly not something that a front-end developer could easily work with if they wanted to. implement new features like copying blocks. And for a while it's been clear to Wagtails core developers that the way out of this root is to shift the heavy lifting onto the client using a framework like React to manage the data model in the browser. And in fact A previous attempt at this problem was Bertrand Bordage 's crowdfunded React Screenfield project, which was to other than as the name suggests, to re-implement the stream field interface using React.
And in fact this has led the way for a lot of the design elements that made it into both the current implementation of Screenfields we sort of Implemented the visual design of this a few releases back, but also it's informed the way we've built this new implementation that we're going to be showing today. But this approach rewriting everything in React comes with its own problems, particularly around backwards compatibility, because a lot of these form elements like these choosers They're written in this sort of in a way that's very much rooted in the Django world, where they're designed to be rendered on the server.
the JavaScript code doesn't know sort of what this thing here represents or how to how to extract a value from it or to populate it with a value. It's just a bit of opaque HTML. And we didn't want to say, okay, right, we've got to throw away all of this Django widget code and rewrite it in React now because we've invested a lot of time in building these components as part of Wagtail. And also so have you in the Wagtail ecosystem and the Django ecosystem. So what we really want is something that allows us to keep our business logic that we've written in Python classes, Django widgets. Wagtails, streamfield blocks, and push that data model over to the client.
And that something is a new library that we've created called Telepath. And if you're familiar, so for the Python developers amongst you with the Pickle module in the Python standard library, which allows you to take a complex Python object, serialize it to be written to disk or perhaps stored in a cache, and then sort of later to you read that bag, unpack it again and get back the complex Python objects again, then telepath is more or less the same thing except that you're Unpacking it into JavaScript objects on the client side. Now this process isn't magic, it won't translate your Python code into JavaScript automatically But it does mean that
when you've written your client-side JavaScript logic, you can set up a one-to-one correspondence between your Python model your Python data model and your JavaScript ones. So where the Python side code knows how to retrieve the data from the database and do the static rendering and the front-end templates rendering, then the corresponding objects on the browser side know how to render these blocks dynamically. and deal with these interactive elements like reordering and adding and removing blocks. So Since we announced first announced telepath, I think there were a few questions about what this means for people building Wagtail sites and Would they have to replace their stream field definitions with telepath field or anything like that?
And the answer to that is no. So everything I've described here is internal Wagtail code. This is something that has helped us to build the new implementation of Streamfield, but it's by no means something that you would have to get stuck into yourself. If you've built your if your Wagtail site using the sort of standard stream field model of taking the built-in block types and building those up into structures and streams, then This will be just a straight upgrade, no need to rewrite any code. So if I bring up the Wagtail Bakery demo project And hopefully this is going to behave because it's when you're switching between different implementations, it can get a bit fiddly.
Hopefully that's going to let me log in. Yeah, so if I go and edit one of our Screenfield pages, and as I say, this is there's been no code changes to this the demo project And this behaves pretty much the same way as you've seen the existing stream field implementation. But the sort of differences, what this means for you as a site developer is that you'll get the performance boost from not having to render all of these things server-side. In our tests. This is something like sort of 30 to 40% faster to render and much smaller data transfer.
because all of this is happening client side. We're just passing in an optimized definition of the screen field and the data, and the client-side code is smart enough to do the rest. And perhaps more interestingly, having the front end work directly with this data makes some new functionality possible. including being able to duplicate blocks. So you can see that's picked up the change there because it's a we the front end code now has a concept of what this block contains and extracting the data and pushing it back in into populating this new block and also being able to collapse blocks and get this little sort of preview representation.
Which again is pop possible because the front-end code knows the data that these blocks are representing. So while the details of telepath isn't something that developer will tip typically need to concern themselves with if they're just building things in the standard way. This is going to open up a lot more possibilities for front-end developers to build extensions that that are sort of following a well-defined front-end code API. because there and this is something that front-end developers will be a lot more at home with because they're working with this data as a rich client-side app, not just as an offshoot of the Django code.
So everything here is on course to be part of the next release, Wagtail two point thirteen, all that's really remaining at this point is developer documentation and a bit of final UI polish. But really this is just the start of what's possible with to im improving the front-end UI of Screenfield because what telepath brings for us is a new approach to increasing the richness of the client-side code And that's going to open up new possibilities within Wagtail and indeed in Django development in general. So I'm sure we're going to be seeing a lot a lot more of outcomes from this work in future releases.
Okay.
Speaker 2
Thanks, Matthew. Some questions coming in and one from Eli. Would telepath make drag and drop more possible?
19:22 Mid-session Q&A
Speaker 3
Yep, that's we've kind of got that as a bit of a stretch goal with the it's we're hoping this can get us But yeah, that's one thing that we're we're hoping to get in again because where we would we've we've got more the fr front-end frameworks at our disposal where we're not try having to rig that up within the old school Django code. Yeah
Speaker 2
I'm glad you asked that, Eli, because that's exactly the kind of thing that we want to achieve. Another one is something that we were shown in the last Wagtoff space by the New York public radio team. We had a great demo of this. And they've they've built this cool thing for splitting paragraphs, and that's something that we should be much more achievable now. There is a question from Bill. I'm just scrolling up a bit now. About, let me find it about Caching, I think you probably asked this, answered this afterwards, but regarding delays and stream field editing, is there a cache for the info once retrieved I think that's sort of been handled now probably by the explanation. Hope Bill that what Matthew went on to say is okay.
Caleb's asking do we need to write React for each new modern block?
Speaker 3
Okay, well the yeah it sh it should be the case that if as I say if you're building things up sort of as in the standard just buildings up from the building blocks then there should be no changes. If you're doing anything that's doing Those of JavaScript heavy things. So an example might be if you've got a map a location choose away or clicking on the map. then that that would involve writing a bit of an of adapter code to tell the front end code this is this is how you populate this with a value and get a value out of it. It's not dependent on React. This is using the just plain JavaScript
objects. But it's all kind of very sort of, yeah, we've made kind of as low level as possible. So it should be yeah possible to build new components in React as for example Draftale is. So yeah it's definitely not a requirement but it's possible yeah
Speaker 2
Thanks, Matthew. I just want to just kind of clarify that as well. There's a question from Chris Wedgewood on is Wagtail aligning with React. This is just about how we're building. this particular part of the back the admin api it's got nothing to do with how you how people build their front end sites so work to remains completely agnostic on that front There's lots of incorporations coming in, but we're going to have to keep moving on to the next one. But please do keep asking questions and we'll try and answer them through the Q<unk>A system. Next up though we have Jacob who's going to talk to us about commenting.
22:25 Commenting in the Wagtail CMS admin
Speaker 4
Hi everyone. So commenting in the Wactor Admin has been something we've been interested in for a while now, and we've taken several steps towards it in the past First, with an extension called Wagtail Review that some of you might have installed, that let you leave comments on the preview of the front-end version of a page in Wagtail That was really useful. But it had several downsides. And I'll show the review repo in just here. You could only comment on the preview, so you needed to switch out of the editing experience in order to do so And it was difficult to carry comments forward between revisions because they were attached to the front end. Then last summer we took another step with the release of WagTel's new configurable moderation system, workflow. In this, when moderators approved or rejected a page, they could
even overall a single overall comment on why they were doing that to give an idea behind their reasoning. So if I switch over here. You can see if I request changes, I can add a single comment. However, what if you wanted to add kind of more granular feedback? If your comment applied to just a single field on a page, or even just a single word or phrase inside that field So to address those issues and to fill that gap, we've been looking at build bringing Microsoft Word or Google Docs style commenting into the Wagtail editor itself. And this has been sponsored by Motley Fool, so many thanks to them. If you're here at the last What's New and Wagtail webinar, you might have seen some of our initial designs for that
So I'm going to share the mock-ups again and you can see a few little tweaks to the designs. And then I'll show you the progress we've made or been making on influencing the commenting itself. So here are the mock-ups, as you can see the comments have a light theme and they're on they sit on the right side of the page, floating in line with the field they're attached to. The top comment here shows a field level comment, a comment attached to a field as a whole. And on the rich text field below, you can see the button where you might add an inline comment. And I'll show you that more when we go on to the implementation later. So first on the design, let's just quickly see the flow of adding a comment. So clicking to add a comment next to a field
and having it float alongside. Comments will be saved along with the page. So now we've seen the mock-ups. I'm going to switch over to my real Wagtail demo site and so you can see the progress we've been making on this so far So here I am inside the Wagtail Bakery demo, our standard Wagtail demo site. You'll immediately notice the comments here have a dark theme. This is something we'll be changing to reflect the designs. as we move forward towards the natural release. So you can see here an example of a comment thread attached to a field level as a field level comment So this is attached to the image field here. You can see by clicking the annotation we can bring it into focus.
And if there were loads of comments floating on the right, this would scroll the right one into line with the field And we'll see this a bit later on. Here's the comment thread with the initial comment and its replies, and I can add my own reply here. And I'll get a little notification that I'll need to save the page to save those changes because the comments are saved along with whacktail revisions. You can see that some of these comments in the thread I have the option to edit or delete. As you might expect, these are the comments that I myself have added. So let's say I maybe want to be a bit more enthusiastic here. I can make that change. Or I don't think this is worth adding. And I could delete it. You can only edit or delete your own comments or comment replies.
But you can resolve anyone's comments to say, okay, I've acted on this bit of feedback. It's not relevant anymore. anymore and I'll do that now. So here, these are field level comments, one of our two types of comments, and they also apply to stream-filled blocks So if I scroll down here to a string field and add a new image block, I can choose to add a new comment. So you should be able to add those for any fields within stream field. But what happens if you wanted to add a comment to, as we said, a single phrase or a single word? Well, we can do that with the second part of commenting, which is
inline commenting. And we're enabling that within any rich text field So I can do that by just highlighting and clicking to add a comment. Maybe I like the phrasing here. But down here I'm not so sure. Clicking each comment brings the right highlight into focus. But similarly, since there are too many comments now on one field, they're kind of squeezing each other out of the way. So you can click each individual annotation to move the right comment into line.
So that's the example of inline commenting. Again, all of these positions will be saved upon saving the page. You can also, if you've decided to If you decided you don't want to be working commenting mode for now, you can enable or disable comments globally. And this top bar indicator will be moving over to the right of the column. We're expecting Cononcing to launch in either 2. 13 or 2. 14. So hopefully you'll get to use this feature soon.
Speaker 2
Thanks, Jacob. That looks great. I'd be interested to know how many people think they might use this feature. Maybe you could just say in the chat if you think this is something that you or your editors might find useful. Oh good. Nice to see him. Yeses there. Validation. No immediate questions on this. Do if you think of anything, please do ask them and we'll try and get around to them. But otherwise I'm going to move back to Matthew and Web Stories.
Speaker 3
Yeah. So this is something that we've been working on with Google as part of their AMP project to sort of bring sort of more the lightweight streamlined the version of HTML to the web that's sort of optimized for mobile And one feature there bringing to this, bringing it to AMP is the idea of con presenting content as stories. As you this is the format that you might well have seen in the likes of Instagram and ev every other sort of social network under the sun is of jumping on the bandwagon too. It's this sort of slideshow type presentation.
28:51 Webstories
Speaker 3
Let's bring up this one from CNN and see this is mixing of various different kinds of content, the videos and images and text and with so with google being avid users of wagtail it's the keyword google blog is implemented on wagtail they were keen to showcase web stories on there. So we've built an add-on for Wagtail an add-on package that will make possible Now there's several different packages available that will let you compose stories. Generally they're done in this design-oriented drag and drop way
kind of not a million miles away from doing the PowerPoint presentations where you've got a lot of control over sort of the positioning and the sort of design of the of the slides. And We chose not to try and turn Wagtail into another of these design tools as Wagtail strength is really in structured content following a fixed template. So instead the sort of the mode of operation for this is the ability to import web stories that have been created elsewhere So if I go to our White Tail instance here, this is White Tail installation that has our web stories plugin and Wagtail Media
Installed and this is a story that we've previously imported and The so there's again there's various bits of the video and image content that's been imported into the Wagtail Media Library. So we've got both the images here and the video files And if I show you the process for importing a new one, there's one that I sort of picked out that was From the BBC about junk that's been left behind on the moon. So if I paste in the URL of that one, I'll select our story section
and import there and then that's going to take a few seconds as it's pulling these images from there and then you can see we've got a local copy of this story It's now part of our Wagtail site. And well, so what the things we can do with this since these stories have the well-defined metadata in Including a poster image, we can sort of use that to build up these automated listings in this nice card layout. Another thing that we can do is embed these into our standard non-AMP pages. So if I go into our
blog section You can see there is a blog post in draft that I've been working on 10 things you don't didn't know about the moon. And this is implemented with screen fields in the usual way. And I've defined a story embed block here. So If I select our moon story and then preview that page, then you can see that is now displaying in line in this blog post page. So this is implemented as an add-on that works with current versions of Wagtail. This is the sort of Wagtail Web Stories package and We've got the documentation on
how to integrate that into your own sites. So if your audience is in the Instagram generation and you're keen to ride the wave of what might be the next big thing in web publishing, then why not give it a go?
Speaker 2
Thanks Matthew. I hadn't I hadn't come across web stories before this project, but it looks really cool and It's great that it's so easy to embed directly into Wagdale now. Next up we have Laura who participated in the documentation sprint and is going to tell us about how it was for her.
34:02 Recent documentation sprint with key goals and outcomes
Speaker 5
Hi everyone, I'm Laura. I'm a graduate developer and I joined Torchbox in January this year. I'm going to talk a bit about the recent documentation sprint and then I'll show some of the key goals and outcomes by comparing how the page looks now and how it will look in the future. And in this sense, when I talk about a sprint, I'm talking about an open source code sprint rather than an agile methodology sprint Before starting my role at Torchbox, I'd heard about sprints and I was really interested to see how they work for two main reasons. Firstly, I wanted to see how they worked in terms of sketching out some of the challenges, and then collaborating together to find solutions to these challenges. And the second reason is that I wanted to learn how it could be completed in two days whilst also being faced with the challenge of working via Zoom and also in different time zones.
And the way this sprint was structured was that we started off by having a talk by Daniela Prashida, which focused on how best to approach writing documentation. We then split off into groups of two or three based on our preferences of what we wanted to work on. And at the end of each day, we shared and demoed our work and provided feedback to each other. And so here are some one of the first changes we made, which was reworking the Wagtail documentation site theme. And this was to make it easier for users to move around. And on the left hand side, you can see how it looks now and on the right hand side how it will look in the future. So the way we did this is that we built upon what was said by Daniele
and put clearer and more descriptive headings on the pages. Further, you can see the sidebar on the left is now able to be accessed without refreshing the page. And on the right hand side, you're able to see the main content headings within the page, which means the user doesn't have to scroll the whole way through And the outcome of this is it looks a lot cleaner, it's more user-friendly, the headings are more purposeful, and the navigation is clearer for the user. Another change that we made, and this is actually something that I worked on, was establishing a clear writing style for the Wagtail documentation and providing guidance on how best to write the documentation. And again, we use Danielle as methodology to provide clear differentiation between tutorials, how-to guides, explanations and references.
For example, a tutorial should have clear actions and outcomes for user and the user should be able to complete it without any prior knowledge of the subject Whereas a how-to guide should or can assume some basic understanding of a topic and should answer questions that only someone with a bit of experience is able to ask. The outcome of this is that we wrote documentation, which provides clear guidance about the language, formalities, and expectations to be used in the different documentation styles. And hopefully this will ensure that when tutorials and how-to guides, etc. are written, they're pitched at a correct level for the user and provide the correct type of information. And another feature we made, which I think is really cool, is creating a
faster and more accurate search widget, which provides better search results to a user. The way we did this is by using Algolia Doc Search. As you can see in the example, when typing first, my aim was to look for my first Wagtail tutorial. The updated search on the on the right hand side shows a widget which has the search result higher up. And also what you can't see in this picture is how incredibly fast the new search is And the outcome of this is that it provides a better and more meaningful user experience. And also the search function provides search analytics for Wagtail maintainers, which is Great because it means you can identify which topics are or are not frequently searched
and which searches don't provide many results and as a result you can change the docs accordingly. And this slide shows all the pull requests that were made over the two days and some of the contributors are shown on the right hand side To me, it really demonstrates the inclusive nature of the sprint, and this is because loads of these pull requests were made by people like me who have never contributed to Wagtail before and also by a lot of people who Maybe they wouldn't consider themselves to have a tech background. And overall, I really enjoyed the sprint. I learned a lot about Wagtail. It was great to work with people internationally, and it demonstrated how powerful collaboration can be in making what I think were really impactful changes in a short space of time
and I'm really looking forward to getting involved in more open codes, open source code Springs.
Speaker 2
Thank you, Laura. It was a really great, really great two days. And actually I think a few of the people those places there are on this webinar. So thank you to all of those of you who are here who participated. We're going to race on because we're going to run out of time. But next up we have Carl who's going to talk to us about another feature sponsored by Mozilla.
39:14 Demo of the new Wagtail A/B testing package
Speaker 6
Hello everyone. Yeah, so today I'm going to demonstrate the new Wagtail A B testing package that we developed into with sponsorship from the Mozilla Foundation. This package allows you to create a variant of a page which gets served to 50% of the users and the rest of the users still see the original version. And it then measures how many users of each version, of each goal that you can define. The goal could either be visiting another page, submitting a form, or something custom, like making a donation And then once that test is finished, it presents that data to a user so they can make a decision about whether that change should be applied permanently or they should roll it back to the original version. So I'm just going to share my screen now. Here we go, can you see that?
Yep, thanks. Yeah, so this is the Wagtail Bakery demo that we normally use to test new Wagtail features. So on this demo I've got the Wagtail A B testing package installed and I'm going to demonstrate setting up a test on our homepage where we're going to change the title. And then we're going to the goal is going to be visiting the buyer sandwiches here page. So we're going to have two variants of the home page and we're going to be measuring how many users of each variant reaches that buyer sandwiches here page So to get to do that we need to firstly edit that homepage. And then let's change that title to from Welcome to Writer based to Welcome to Writer
Sandwich Shop. And then instead of just publishing the page, what we do is we go into the menu down here and we click save and create an A B test. So this saves a new draft. and it takes us to the A B test creation form. So we're first you're presented with the difference that you've made, so the difference between the two variants of the page. We create this test. And then next, we first need to give the test a name, a nice short name, and a hypothesis, which is a more longer description. about what we're actually testing. So does changing our name make more people want to buy sandwiches? And then we select that goal page. So if we go in here and we select buy our sandwiches here.
And then the actual goal event itself is set to visit page. On form pages is also submit form page as well. And then you can also define your own custom goals. And then finally we need to set the sample size. So it's important to select the sample size correctly based on how many views you typically get and the amount of variance you're looking to achieve in order to you know have a successful test. There's a few tools that we've linked here for deciding this, but today I'm just going to type a thousand. We've also got a few little comments down here. So yeah, traffic is split evenly 50-50% between each version. So when users visit the home page, 50% of them will get the variant, 50% of them get the old one.
All do users with do not track enabled will always get the control version and won't be tracked. So then we now can click save and start test. We could save a drop if we want to, but we'll just save and start test. And this is what the dashboard looks like. So we will record the total progress. So once you've reached that total sample. Then the test ends. And then we also show you where how many conversions for the control and the variant we have. And then there's a graph at the bottom. So I'm going to now end this test because I want to show you one that has already been completed and has some data in it. So let's end that test. And then we go to this A
B testing tab here that shows you the past tests that were run on this page. And I'll just click this one that has been completed. And as you can see, 100% complete. the control one because it had a 39% conversion rate over 19%. And as you can see we've got a nice graph here showing overtime those conversions. This package is available now. It's on PyPI. It's also already in use and production on donate. mozilla. org as well. So it should be all production ready. Yeah, that's it.
43:29 Mid-session Q&A
Speaker 2
There are a couple of questions coming in. One from Kate who asks if A-B testing will work on headless implementations.
Speaker 6
Not at the moment, because all the logic is in Python, so you actually have to visit the page on the Wagtail instance in order for the logging to work and for it to swap the variants. But I'm soon going to be implementing like a sort of Cloudflare support which will involve adding an API to allow a separate service to query. which pages have variants and also to send back results as they come in. And that could be reused for a headless site.
Speaker 2
Cloudflare is the kind of caching proxy that we're we use most widely, but a similar approach should work with other kind of intelligent caches like Lambda on the Edge, which is the AWS equivalent. or fastly where you can do achieve the same kind of logic in varnish syntax and there's a question from Naomi does or can the A-B testing exclude logged in users
Speaker 6
Not at the moment. Yeah, I'm sure that's possible to add. Yeah, the answer is no, I think, to both of them at the moment. It probably would be nice to add a add the ability to add your own custom logic and then you can add that. But at the moment, yeah, it will it will count login users.
Speaker 2
It's great to have this kind of on-the-fly feedback though and future direction. And a question from Ralph, if you hit save instead of save and test, do you get an option to start the test later?
Speaker 6
Yes you do, yeah. So it what it what it does is it tests the latest draft against the live version. So if you save a draft, then if you come back and save and add tests, it'll it'll include those draft changes as well.
45:40 Wagtail CMS Roadmap
Speaker 2
That's it for all the all the new things we wanted to show you. Do you keep questions coming if you if you've if you can think of anything? But while you're thinking, I just want to talk a little bit about what could be coming next. And I've got just one slide to show you on this And this is so here's here's our roadmap and the first item on our roadmap is a roadmap, which isn't isn't a typo. I think it's something that we haven't been really strong on. And we've we've had various attempts over the years to kind of project on the to forecast the features and the direction we want to take, but it's it's quite hard with an open source project because. Of course, you don't know where the contributions are going to come from or what
what the demand is going to be. Nevertheless, I think I think it's important for us and the community to do a better job of showing this the direction that we want to take. And so that's something that I hope you'll see more of in the next in the next few months. Having said that, there are some items that we know we want to achieve. And at the top of that list is the completion of this admin comments that you've just been seeing from Jacob. So it's in a good state now, but we can we can take it to another level quite quickly, I think. And some ideas for how we do that have been suggested already in your questions and comments. The really important part is this thing that we call admin API, which is again we've made we've made some progress with this and that part
that's partly what is making telepath possible. sort of the decoupling of the content and the editor UI but we want to go further and you know ultimately we would like Wagtail to be a kind of this powerful flexible repository of the content you want to manage that can be accessed through different mediums through just through different UIs. So you know the UI that we're going to continue to build and make better, but also you know potentially other UIs. And autosave is another that's and it's it's nice to see this has come up a couple of times in the comments already that that's something that I think people care about. It's not super straightforward for us to do that because as you probably know, Wagtail stores a new version every time you save. And if we're doing autosaving, then we
know we don't want to keep making a version every time someone presses a couple of keystrokes. So we have to think about the right the right user interface for that. We want to kind of to do autosave but make it manageable and we've got an idea about how to move forward with that and Yeah, I think I think you know a combination of these things, the kind of features that are going to be available through telepath. means that I think we'll see some really dramatic improvements in the in the editor experience in the coming releases. Finally, I would like to say that a lot of what you've seen today has been made possible from the generosity of sponsors. And so we, you know people like Mozilla and Motley Fool and Caltech
and Ugov. And I would really encourage you to kind of to think about whether the organization you work for. might also be able to make a contribution, particularly if Wagtail is forming an important part of what your organization is doing. And it doesn't take huge sums of money to make some pretty dramatic steps forward. And we would be really, we would, you know, the whole Wagto community would love to work with anyone who does have funding available and would can think of ways that we can improve Wagtail to make it better for you. So we're really kind of encourage all of you not to think of Wagtail as a sort of black box operated remotely by, you know a small group of people but actually is but something that's very open
and you know we want to work with you to make white ill the best it can be Thanks all for joining and hope to see you for episode four in about three months' time.