Weblog
Michael McFadden: Video Content for Plone
Talk by Michael McFadden (a.k.a. flipmc) at Plone conference 2023, Eibar, Basque Country.
We do a lot of video in Plone at Radio Free Asia: https://www.rfa.org/english/video
How do we start with video in Plone? Just add a new content-type. Then add a template, use the html5 video tag and pass it a url. And it kind of works.
But we added a stream view and set some headers that helps for streaming.
So someone uploads a two hour Ultra HD video and you get a ticket: "Plone is slow" Your job is to fix it. And now the sysadmin is on the line and says: "We are seeing some troubling disk usage."
Okay, start offloading to an external server.
What I was doing here, was a journey: instead of thinking it completely through and designing a perfect solution and never shipping it, I just started coding and getting something out there that kind of worked and that we could improve.
We never used blobs here, we just did not have the disk space. Saving a 50 TB video would give 503 as feedback. "What is this nginx thingie, I thought we were using Plone?"
So we hired a javascript developer to help here, and they saw a progress bar. And I wrote a z3c.form custom widget. Without even using jQuery. And then when you click Save, you only post some metadata to Plone, with the video already being somewhere else. This worked nicely.
And now a video on our site went viral. Google for "gutter oil", if you have a strong stomach. So the CEO gets a message, look at this video, and opens it on the phone in the DC metro, and the video does not load. "Plone is broken."
Video encoding to get it to a reasonable resolution. Use ffmpeg to get it done. Don't look at its code, don't create an event handler for this. You would do this somewhere externally. Amazon S3 or something. We use Kaltora.
"Variable/adaptive bitrate video delivery." Such buzzwords get you a new job and 20 grand extra. Chop the video into fragments. You can load video fragments on different resolutions, depending on your bandwidth. Code this into an m3u8 file.
So I created https://github.com/flipmcf/CasterPak, creating HLS stream packaging for video on demand, with a built in file cache.
We abstract away the complexity. How leaky is this abstraction? A native video content type in Plone, is this possible? With code like this, it starts maybe becoming possible. We can push it.
Audience: you can look at https://peertube.tv/ or https://mediacms.io/.
Piero Nicolli: What's new in CSS in 2023
Talk by Piero Nicolli at Plone conference 2023 in Eibar, Basque Country.
With container queries you can query the size of a parent element and apply styles based on that. This is useful when media queries are not enough. Supported in all major browsers.
:has()
. In Firefox still experimental. Apply styles to elements that contain the selector.
New nth-of selectors.
Text wrap balancing. Only latest chrome. Only use this for progressive enhancement.
initial-letter
. Not yet in Firefox. For showing the first letter much larger.
Dynamic viewport units. All major browsers. Helps when 100v is too large because the browser shows toolbars. You have small and large viewport height and width: svh, svw, lvh, lvw. And dynamic: dvh, dvw.
Wide-gamut color spaces. Allows for more vivid colors to be used. color-mix
to mix two colours to create new values based on the channels of the colours getting mixed. Welcome dynamic color palettes without needing preprocessors.
Nesting is now supported in all major browsers, without preprocessors like scss.
Cascade layers. You can define layers and specify in which order they are applied.
Individual transform properties in all major browsers.translate, rotate and scale can be specified on their own line, so also overridden without overriding the complete transform line.
Extra: view transitions, only in latest chrome. Only in SPAs for now.
See https://developer.chrome.com/blog/whats-new-css-ui-2023/
css preprocessors will be used less, but they are still useful when you are working with a css framework like Bootstrap.
Gil Forcada: meta and robots for a better developer experience
Talk at Plone conference 2023, Eibar, Basque Country.
Who is here in Plone 20 years from now? We have a scale problem. People come and go, but Plone stays.
PEP420: Python native namespaces. You already get warnings when you still use other (setuptools) namespaces. Tricky to combine both in one namespace. It is best to switch in one day. We use about 100 Zope packages, 100 Plone packages, there are 200 or more collective packages, you may have internal namespaces.
How do we pass on knowledge? Can anyone here in the room make a Plone release if Maurits goes on vacation? There is documentation, training, a World Plone Day video of Maurits releasing Plone.
We can talk a lot to share knowledge, but we should also codify this knowledge. Create a predictable Developer Experience (DX). You work on a bugfix in a package, and do not need to worry if CI (continuous integration) is working, or wonder how to run the tests locally.
If you use an approach in one package and need to manually copy this approach to all other Plone packages, you will get tired, and make mistakes. If no check is done at every commit or PR, then you end up making several cleanup commits, fixing black/isort issues.
We have a long history of tools we use for checking code quality, including Jenkins, mr.roboto, GitHub Actions. When you create a patch in a PR, as occasional developer or big-time core Plone developer, the same checks should be run. Can you check this before you push a change? Yes.
How can you know if your add-on works? You write tests and run these automatically. Does your shiny new add-on still works after a few days when you have merged your own PR? Or after a few weeks when another developer creates a PR? Or a few months, after some dependencies get security releases? After a few years when there are new Plone and Python versions?
Introducing plone/meta, see https://github.com/plone/meta/. Original idea from https://github.com/zopefoundation/meta/. These are some templates for how you write setup.py, setup.cfg, pyproject.toml, GitHub action files, etc. It includes a tool you can point at a directory with your add-on, or a core Plone package, and apply the standards. Then run for example tox -e test
to run the tests.
It also configures a tool for checking cyclic dependencies. When a cyclic dependency is discovered, you fix it. And because the check is done automatically, we guard against regressions, where cyclic dependencies would inadvertently be reintroduced.
It has various linters, formatters, a spell checker, check for release readiness.
Its main goal is for Plone packages, but you can use it for collective packages and packages from your company.
What is next? It would be good to test across different Plone and Python versions. Test ClassicUI and REST API.
Other ideas: plonecli/cookiecutter integration would be nice, so you get this configuration in new projects that you create. Create a local Plone instance with the add-on. Auto-update.
What is the power within? We use tox, but that is an implementation detail, could be nox, docker, containers, make.
Contributors are welcome: test it, use it, add fixes and features.
Questions? It would be good to support tests for frontend and backend, where the code is in sub directories instead of the top level folder. In the Zope meta repo there are already different skeletons, because they have normal Python packages, but also packages with C code which need different files and settings.
Innsbruck sprint: IT onboard
Panel discussion during the Alpine City Sprint 2023.
-
Dimitri, Center of Labour in Innsbruck.
-
Erico, working as employee for KitConcept, and company owner in Brasil.
-
Alessandro, working remotely
-
Cibilla, Fachgruppe, support employees, lots of ITers
-
Bernd, professor business education
-
Christine, IT project manager in Innsbruck, partner of IT Onboard.
-
How do we want to work remotely?
-
What do we want to do remotely and what locally, in office?
Friday Lightning Talks
Lightning talks at the Plone Conference 2022 in Namur, Belgium.
Fabio Kaiser Rauber: Interlegis Infrastructure
From Brazil. Interlegis is a program to merdernise and integrate the Brazilian Legislative Power. Hosted at a federal data center.
Small team requires more efficient processes. Automation is key to maintain quality. We started with shell scripts, then Puppet, then Docker in Rancher 1.0., then Ranger 2.1-2.3, now Rather 2.5. VMWare vSphere cloud native storage. So we use Kubernetes, more complex, but more powerful.
Helm is the packer manager for Kubernetes, allows templating of Kubernetes yaml files. You get Helm Charts.
See https://interlegis.leg.be.
Guido Stevens
In Ferrara we hatched a plan for world domination with Quaive. First step: The city of Namur will deploy a Quaive intranet next week.
Sorry I was not at the conference: I got married a few weeks ago.
Nicola Zambello: Introducing plone-remix
Working to minimalise the impact of IT on the environment. Remix is a full stack javascript web framework based on react-router. Everything is a form. #usetheplatform.
Now we have plone-remix. SSF-first with partial hydration. I need something light weight. plone-remix is a Plone front end with TypeScript, css framework agnostic. A catch-all route for contents, i18n, it is a Plone Rest API client
See https://github.com/raw-material/plone-remix and demo: https://github.com/nzambello/plone-remix-demo
Franco Pellegrini: Python blockchain conference
Mikko Ohtamaa asked me to show you this video. He organises the first Python blockchain conference. It is remote and free
collective.contentsections
Default page content type is replaced by new one where you can add text sections. Demo.
Steve Piercy: Documentation
Git clone https://github.com/plone/documentation/, do make install and make livehtml and you have a live preview on your computer while you are improving the documentation.
The search is much nicer, you can see in which context results are, and you can filter.
We hope to have a Dark Theme available soon.
Jens Klein: Plone mental model
See the Plone core development docs.
You have Products.CMFPlone at the top, then the core, then plone.base, and then other base packages. On top of CMFPlone you have for example restapi, working copy support. With this model in mind, you can start thinking about what really needs to be in core.
Jon Pentland: volto-plone-reloader
This makes plone.reload available via Volto.
See https://github.com/instification/volto-plone-reloader
Joël Lambilotte: François et Djoseph. And IMIO.
This is a statue near this building. There is a snail in a box, and they are afraid it gets out, because Namur people are called slow.
IMIO is a public company with 5 million euros revenue. 15% growth, 50 employees.
eDemocracy and FLOSS appeals to municipalities. Decisions of the public government are now automatically published. Unique project in Europe.
Neyts Zupan: Nix
How do I install Python? Elm? I need it to develop on https://paretosecurity.com/. cd into the directory, boom, I have the correct versions. Also for black, gecko driver, etc. The magic is Nix.
Maurits van Rees: Plone future
I work at Zest in the Netherlands, but live in Belgium now. I am starting my own company. No website yet, but you can mail me at maurits@py76.be. I will have no clients at the beginning, so I will have lots of time for core Plone at first. So Plone 6 will be finished within a week, and then I will get bored. So I have some ideas for the Plone future that I could work on. Maybe you could help during the sprints.
-
Several password policies. See https://github.com/collective/Products.PasswordStrength/issues/1 and https://github.com/plone/Products.CMFPlone/issues/3370
-
Policies for CMFEditions.
-
revisionmanager: allow purging all revisions older than 1 year
-
Image transform chain. See my focal points talk last year.
-
Make the code more Pythonic, use the walrus operator, etcetera.
-
More separation between backend and frontend, also in Classic.
-
Can Classic UI call the Rest API more?
-
Move all Classic UI code (p.a.layout/portlets/etc) into plone.classicui "mono repo".
-
Only load GS in zcml when
plone.app.upgrade
is available. Or some flag. -
Toolbar by default at the top
-
Store the catalog in Postgres. Add-on. One per Plone site.
<plone-site-id>_catalog
. Integrate with querystring operators? NickJS (from Rob) does this. Replace the @search endpoint? -
Get rid of relation catalog and intids, use a utility comparable to plone.app.redirection. Migration. Run side by side for comparison?
-
Unify viewlets and portlets into slots / blocks.
-
Auto save when editing a page. Or a block. Or only in TinyMCE or Slate.
Eric Brehault: Add GSOC ideas
We have lots of ideas for cool things in Plone. So add ideas for Google Summer of Code. Do not be lazy, file an idea, go for a mentorship.
Mikel Larreategi: plone i18n
Let's play a game with the language Kaixo. Kaixo means hello. Agur means Bye. Long string of word: "next year in our country". We come from the Basque country between Spain and France. Welcome in October/November next year.
Kim: Thank you
Thank you organisers from IMIO and Affinitic, and the city of Namur. This has been three years in the making. It was wonderful to meet each other after a long, long time.