cppalliance / boost-mailman

Boost Software License 1.0
1 stars 1 forks source link

Postorious and Hyperkitty templates & styles #7

Open gregnewman opened 3 months ago

gregnewman commented 3 months ago

This PR provides customized templates and styles for both Postorious and Hyperkitty. Each project has a subdirectory containing the templates dir and the static dir. I'm currently working through dark mode.

We need to determine colors for some of the standard buttons. Some of them have already been switched to the Boost orange to match the Boost site. Colors for the other action buttons we should discuss and come up with a plan.

TODO:

Screeshots of my fake mailman lists

CleanShot 2024-07-23 at 09 49 53 CleanShot 2024-07-23 at 09 49 21 CleanShot 2024-07-23 at 09 49 02 CleanShot 2024-07-23 at 09 48 34 CleanShot 2024-07-23 at 10 20 03

sdarwin commented 3 months ago

Hi Greg,

You replied to a comment from another issue. :-) The sentence "There is a small typo in settings.py" was to Kenneth. Although there is a typo in this PR also. Top level directory kyperkitty should be hyperkitty . And Postorious -> Postorius

continuing to review...

gregnewman commented 3 months ago

@sdarwin I noticed that right after and deleted my comment. I was replying via email.

sdarwin commented 3 months ago

I created an hyperkitty issue about bootstrap: https://gitlab.com/mailman/hyperkitty/-/issues/511

For that feature, we should send them a focused pull request that only upgrades bootstrap, and any dependencies. Then all Hyperkitty users get upgraded to the new bootstrap. (also Postorius).

If that's in place, then at least for that part we can track their official repo, and not take on a larger maintenance burden. We don't want to maintain a long-term fork of Hyperkitty, or "vendor" the package which I believe means approximately the same thing, where we take over the whole project, and must be concerned about merging their upstream modifications on a frequent basis.

From the web: "Vendoring, in the programming sense, means copying the source code of another project into your project. It's in contrast to the practice of using dependencies, which would be adding another project's name to your package."

"Vendoring means putting a dependency into you project folder (vs. depending on it globally) AND committing it to the repo."

There are 311 files in this current pull request... Maintaining 311 files is vendoring.

Rather, we should keep the absolute minimum number of files.

Then, for each of "templates" and "static", there is an open question about how to include them. I haven't researched it yet. We can both investigate. For example, https://docs.djangoproject.com/en/5.0/howto/overriding-templates/

Currently, the upstream Hyperkitty package is installed along with many other pip packages in a virtual environment at /opt/mailman3/lib/python3.10/site-packages/hyperkitty It would seem like a hack to copy anything there, overwriting installed pip packages. We need to determine how to "include" both 'template' and/or 'static' files from another directory.

As a sort of first step, could this pull request be modified, so that it's minimal? Not 311 files. Just a few updated files.

Anything about bootstrap would not be here in boost-mailman. But instead directed at the gitlab repos.

Imagining there will be a lag time before they agree to merge. Let's say it takes them a month. A pull request will necessarily involve a fork (on gitlab). We could point pip, on the staging mailing lists, at that fork. Python pip is able to install packages from a git repo.

In that scenario, customized files will exist in multiple places:

  1. The gitlab fork, will contain bootstrap updates only. Or, anything planned to become 'official'.
  2. The cppalliance/boost-mailman repo, will be the source for purely boost customized templates.
gregnewman commented 3 months ago

@sdarwin I agree about vendoring so I will scale back the files. The way Hyperkitty is doing bootstrap is a little out of the norm but I think I have an idea to make that easier to work with.

sdarwin commented 3 months ago

@gregnewman I'm working on this now. Based on the files in this PR, and instructions from https://docs.djangoproject.com/en/5.0/howto/overriding-templates/ I will deploy on the staging machines, and reorganize the files. Give me a bit of time, then I'll get back to you.

gregnewman commented 3 months ago

@sdarwin yes, that is the way to do it. Let me know if you need anything from me.