Git Product home page Git Product logo

mozmeao / birdbox Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 6.0 3.1 MB

A template repo for creating quick-to-deploy, on-brand, easily customisable, CMS-backed microsites - brought to you by your friends in Mozilla MEAO

Home Page: https://github.com/mozmeao/birdbox-documentation

License: Mozilla Public License 2.0

Shell 0.08% Dockerfile 0.04% Python 97.67% JavaScript 0.79% HTML 0.76% SCSS 0.60% Just 0.06%

birdbox's People

Contributors

alexgibson avatar bkochendorfer avatar craigcook avatar stevejalim avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

birdbox's Issues

Additonal internal pages to support

Snag list: futuremo landing page

Things that need fixing/tuning, noticed while laying in content

  • Hero is over-padded compare to future.m.o
  • Section header needs constraining like main page container
  • Card block header needs to be smaller
  • Dark mode nav needs different mozilla logo?
  • Card block need constraining like main page container
  • Builders and MEICO cards link to future.m.o not relative domain - need updating once those pages exist

Naked base template for custom pages

Flat HTML file, that extends the regular base template, so we can build out anything we want as fixed content - eg a regular django page can use this

Make latest Protocol CSS and JS available in /static/

A Wagtail page featuring a flexible StreamField will have 1...N types of content-block available. Each type of contnet block will map to a specific Protocol component (eg split, card, etc).

To avoid including all the CSS for every protocol component, we are going to specify which CSS and JS files are needed when defining each block in Python code. To do this, though, we need to have a CSS and/or JS file for each component available in birdbox/static/css or birdbox/static/js so that Django can be pointed at them.

Overall, I think we need to:

  1. Get hold of the latest protocol/core package (ie, have it in package.json so we can npm install it
  2. Do some processing that finds each of the SCSS files in the components directory (node_modules/@mozilla-protocol/core/css) and compiles them to individual CSS files in a different directory (eg birdbox/static/css/*.css) -- we may need to autoprefixing and minifiy, too.
  3. There's also a site-wide, base protocol.css file that we will need to include in every page, so we should copy (or minify) node_modules/@mozilla-protocol/core/css/protocol.css and to birdbox/static/css
  4. Copy the JS files out of node_modules/@mozilla-protocol/core/protocol/js into birdbox/static/js/ - if we minify along the way, that's great too
  5. Copy the img and font dirs from protocol into birdbox/static/* as well

Success criteria:

  • the files mentioned above all exist in birdbox/static/*
  • there's a repeatable way to trigger/refresh the those files

Remedy lack of `no-cache` headers for passworded pages

As noted in wagtail/wagtail#5072 amongst other places, Wagtail is unopinionated about cache-control headers, including on pages that are private/password protected. This can result in restricted content being caught in a CDN or other cache.

We should tweak things, either with a third-party package or code customisation, to avoid this situation + add regression tests to confirm all is OK

MIECO page snag list

  • Hero background image bleed isn't flexible enough on smaller viewports - make sure doesn't break for Builder's
  • MIECO vs MEICO in Custom form chooser - @stevejalim
  • Rename Contact Form block to Innovations Contact Form Block - @stevejalim
  • Light theme Column block text needs to inherit BG color - see comments for screenshot
  • Support <small> in rich-text block, if easy lift- EDIT: nope
  • biography grid links can overflow badly - change to "Learn more" as link text - @stevejalim

Hero updates

The Hero component needs a few tweaks.

  • "Subhead" and "Standfirst" (intro) should be optional fields (they're currently required). Main title should be the only required field.
  • Styling of main heading and subheading should be updated. Main heading should be bold, subheading should be regular weight and smaller.
  • Adding a background image currently overrides the background color. Background color should be preserved when an image is added.

Email config

  • for notifying moderators if pages have been submitted for moderation
  • for direct contact form

Support variable srcset options for included images?

At the moment, when we show an image, we're just showing the original-size image uploaded to Wagtail, but Wagtail can generate image renditions in any res/size we want docs - worth a skim

I wonder whether it would be possible to create a default set of specs as srcset for any image block. When we added the Split Block (#5) I temporarily skipped over the srcset option - hence this ticket now.

Thoughts are very welcome - particularly from you @craigcook + @stephaniehobson + @alexgibson :

  1. Is there an image size below which srcset variations are pointless? (ie, is it silly to try to come up with a one-size-fits srcset list?)

  2. Do we need to add srcset to any other Protocol components that don't currently mention it in their reference implementation? Would it be pointless or damaging if we did?

  3. Do we want to trust Wagtail (well, the very mature Python Pillow library) with auto-sizing images, or would we prefer to make the editors have to upload different image variations themselves, in order to ensure high quality images? (Different orgs have different appetites for both of these routes)

Dockerize the project

In order to use the approved SRE release pipeline, we'll need to package all this up as a container image.

Bedrock's multi-stage build seems to still be a solid way to handle needing both Node and Python, which is the case here, too

Contact form component

Behaviour

  • Support custom fields/values - see what we get from the wagtailforms or streamforms libs
  • JS-based field triggers - add project-specific JS for this
  • Error handling + JS submission
  • Make Country field optional
  • Make Language field optional
  • Name as a single field, optional

UX/UI

  • (nice to have) Support no-image version of the layout - make image optional and reflow if not present

SVG image support (requires dependency chain updates)

Wagtail 5.0+ now supports SVG images in the core Images section, which is something we're very likely to need, particularly in hero headers. SVGs are better than bitmaps

We're currently on Wagtail 4.2.x LTS, but we can move up to 5.x because 5.2 LTS is due to land in November 2023.

However, to get to use Wagtail 5.0+, we need our dependencies to also support it. Wagtailstreamforms does NOT work for 5.0 yet

It seems wortwhile to contribute a fix/update to wagtailstreamforms, as a way to retain the form behaviour which will have significant value while unlocking SVG image support

Builders Challenge page snag list

  • Hero formatting - background needs stretching a little more?
  • Column block - can we constrain this with its own layout wrapper?
  • in-page anchor link to #guidelines EDIT: deferred till post-MVP and ticketed
  • Centre-align layout for bio grid, or not? EDIT: NOT

Add analytics support

We're initially assuming we'll go ahead with GA using GTM

In the future (separate work) we'll add a Glean option if we can

Page type to support MEICO

Could maybe be done with a full-feature general-purpose page template

  • Similar hero to future.m.o landing page - no button though
  • section header - why join us
    • could be done as a special style for MEICO or similar
  • three col layout with headed columns and stacked pictos in them
  • full bleed gradient-background text block
    • like white text on black on builders challenge but with a gradient
  • Bio grid with
    • heading
    • 3 cols of people
      • photo, meta/caption, title, blurb, link
  • Text split with heading left and copy right and a button
    • on another gradient background
  • FAQs
    • could be done as rich-text with a custom header style via CSS maybe?
  • Section header - on white
  • CUSTOM EMAIL CONTACT FORM with image

Homepage that can support future.m.o

### Components needed

  • Black Nav with button
  • left-aligned hero with standfirst, headline, blurb and button
  • section heading - left aligned ("our approach")
  • Splits with 3/4 layout option
  • four col picto card layout on black background
    * SVG pictos
    • full bleed background
  • Custom contact form with no image
  • Footer - bedrock style not protocol style

  • Specific 'Homepage' Page type built with above fields
  • ArticleBlock added for extra flexibility in an emergency

Page type to support Builder's Challenge

This one's quite a lot of custom work - might even be worth making it a specific page type and we drop it from birdbox once the innovation repo exists

  • Different CSS styling than core protocol - custom stylesheet chosen on the page template, loaded as @frontend_media?

  • Nav with button

  • Center aligned hero with PNG background

  • Text area with large text, center align and button below

  • Note the custom 'sunshine' image bleeding between sections

  • Prize winners section

    • heading
    • three-col layout with cards in there
      • styling of cards is bespoke font
  • "About the challenge" White text area on black

    • Do this as a headed text component with light and dark modes
      • poss will need gradient support - see use on MEICO
  • "How applications were evaluated"

    • Three-col simple cards with title and description, no lnks
  • two coloured boxouts/wrapping the content

    • colour selector needed
    • two col and three col
    • rich text in each column
  • Section header: "Meet our judges and speakers"

    • section header for Judges and for Speakers
    • Three col layout, similar to "How applications were evaluated" but with images and more whitespace
  • Our Partners:

    • two decks of three-columns with an image in each, no linking, interestingly
  • Event agenda

    • Header is a h3 with an image and alt-text
    • Body is a table - do we have support for that already?
      • table has custom styling -> new "Agenda" component with header + tableblock
  • Custom Newsletter

  • Slim callout for Discord - variation of current compact callout?

Update ALLOWED_HOSTS

See how we did it here to make it dynamic yet non-wildcard

  • Update code
  • Update env vars
  • Roll out
  • Remove ALLOWED_HOSTS from secrets, because it's now redundant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.