[Bion] Copied from https://github.com/bradfrost/frontend-guidelines-questionnaire/
A one-page questionnaire to help your team establish effective frontend guidelines, so that you can write consistent & cohesive code together.
- What are some general principles your team should follow when writing HTML? (for example, authoring semantic HTML5 markup, accessibility, etc. See these resources for inspiration)
[Bion] We strive to use semantic markup, preferring browser default behavior over custom implementations when possible.
- Are you using an HTML preprocessor (such as HAML, Pug, etc)?
- Are you using a templating engine (such as Mustache, Handlebars, etc)?
[Bion] We currently generated HTML directly in Java code. We are considering a switch to using Thymeleaf.
- Does your backend architecture influence the frontend markup in any way (for example, WordPress will add
wp-paginate
to a class in your markup)? If so, can you highlight these conventions?
[Bion] No
- Spaces or Tabs?
[Bion] Spaces
- What does HTML commenting look like?
[Bion] We don't have HTML comments at the moment because we don't have templates.
[Bion] Most of this section is moot because we strive to minimize custom CSS and use TailwindCSS classes for styling as much as practicable.
- What are some general principles your team should follow when writing CSS? (For example, modularity, avoiding long selector strings, etc. See these resources for inspiration)
- Is your team using a CSS methodology (such as SMACSS, BEM, or OOCSS)? If yes, where is the documentation for that methodology?
- Are you deviating from the methodology in any way? If so, can you highlight these conventions?
- Is the team using a preprocessor (such as Sass or Less)?
- What are the guidelines for using that preprocessor (check out Sass Guidelines for inspiration)?
- Are you using a CSS base (such as Normalize or a reset)?
- Are you using any CSS postprocessors (such as Prefixfree or Autoprefixer)?
- Are there specific CSS techniques you're utilizing (such as critical CSS)?
- Is the team using a framework (such as Bootstrap or Foundation)? If yes, where is the documentation for that framework?
- Are you deviating from the framework in any way? If so, can you highlight these conventions?
- Spaces or Tabs?
- Spacing around rules?
- Grouping properties?
- What does CSS commenting look like?
[Bion] See https://github.com/civiform/civiform/wiki/Frontend-Development#client-side-code-typescript
- What are some general principles your team should follow when writing JavaScript? (See these resources for inspiration)
- Are you using a JavaScript framework (such as jQuery, Ember, Angular, etc)?
- Where is the documentation for those frameworks?
- Are you using any polyfills or shims (such as any of these)?
- What third-party scripts are dependencies for your project (such as scripts for form validation, graphs, animation, etc)?
- Do you test your JavaScript? If so, what tools do you use (such as Jasmine, Karma, Selenium, etc)?
(See these resources for inspiration)
- Spaces or Tabs?
- What does JS commenting look like?
- What patterns are you following? (See these resources)
- How are you handling icons (such as using SVG, icon fonts, etc)?
[Bion] See https://github.com/civiform/civiform/blob/main/server/app/views/components/Icons.java
- How are you handling responsive images (such as using
srcset
&<picture />
)?
[Bion] Our images are not currently responsive
- Are you using any tools to optimize and serve images?
[Bion] No
- How do you load custom fonts?
[Bion] We don't us custom fonts, current fonts are Tailwind default: https://tailwindcss.com/docs/font-family
- Do you use any tools to help implement web fonts (such as Font Squirrel, etc)?
[Bion] No
[Bion] No
- Do you use performance budgets? If so, what metrics are you using to determine budgets? Where are you keeping track of performance budgets?
[Bion] Not currently
- How are you measuring your project's speed (such as Pingdom Speed Test or Google PageSpeed)?
[Bion] Seattle can share Google Analytics info with us.
- What techniques are you using to decrease file size (such as Gzip, Image Optimization)?
[Bion] We don't currently decrease file size.
- What performance-related tools are you using in your workflow? (such as WebPagetest, BigRig Speedcurve)?
[Bion] None
- Are you following the accessibility recommendations laid out in this checklist?
[Bion] No. We follow WCAG and W3 recommendations
- What accessibility-related tools are you using in your workflow?
[Bion] We use Axe
[Bion] Yes, we use SBT and NPM/nodejs.
[Bion] Yes, webpack
- Are you using any scaffolding tools (such as Yeoman)?
[Bion] No
- Are you using any tools to reinforce frontend style (such as Editor Config or linters)?
[Bion] No
- Are any other specific pieces of software that are needed to work on this project?
[Bion] No
[Bion] Git, GitHub, GitHub issues, see docs
- What version control system are you using for your frontend code (such as Git or Subversion)?
- Where is your version-controlled code hosted (such as Github or Bitbucket)?
- Do you use a version control workflow (such as gitflow, centralized, feature-branch, etc)?
- Who's responsible for managing and governing the version controlled code??
- Where are issues tracked?
It's important to recognize the difference between "support" and "optimization". You should do your best to support as many environments as possible while simultaneously optimizing for the environments that make the most sense for your business and users.
- What browsers are you optimizing for?
[Bion] Chrome
- What devices are you optimizing for?
[Bion] For applicants: low-end smart phones. For admins and TIs: desktop computers.
- Are you using a graded browser support system?
[Bion] No
- Are there specific components that require more specific grading?
[Bion] N/A
- Is your website served in different languages? If so, what considerations do you need to address when localizing for other languages?
[Bion] Yes. We need to consider culturally appropriate transation
- How is your front-end code integrated into a production environment?
[Bion] HTML and other assets are served directly from the production web servers
- Are you using a pattern library tool to document your front-end architecture?
[Bion] No
- Where does your documentation live? What are the links to the documentation?
[Bion] Here: https://github.com/civiform/civiform/wiki/Frontend-Development
- Who's responsible for maintaining and governing the documentation?
[Bion] All full-time contributors
- What happens when the guidelines are updated?
[Bion] An announcement is made in meetings and/or Slack
Feel free to modify or extend (such as adding specific sections for performance, accessibility, etc) this document for your own organization's needs. For questions, comments, additions, and corrections, please open an issue on Github and/or reach out to @brad_frost on Twitter.