marcysutton / a11y-camp

Accessibility Camp Seattle site
https://seattle-a11y-camp.now.sh/
MIT License
1 stars 0 forks source link

Remove Typescript to lower barrier to entry for contributors #8

Open marcysutton opened 5 years ago

marcysutton commented 5 years ago

Typescript is really feeling like overkill for this site....I worry about the ability of contributors to help us with development, so I think it would be a good idea to phase it out.

Here's an example of where it's making life extremely difficult:

import React from 'react'
import styled from "styled-components"

import Layout from '../components/layout'
import Wrapper from "../components/wrapper"
import { Section } from "../components/section"
import Header from "../components/header"

const StyledWrapper = styled(Wrapper)`
  margin-bottom: 40px;
`
const StyledHeader = styled(Header)``

import SEO from '../components/seo'

import "../styles/tito.css"

const RegisterPage = () => (
    <Layout>
        <SEO title="Register" keywords={[`a11y`, `a11ycamp`, `seattle`, `a11ysea`, `register`]} />
        <StyledWrapper center>
            <StyledHeader />
            <Section title="Register">
                <script src='https://js.tito.io/v1' async></script>

                <tito-widget event="accessibility-camp-seattle/2019"></tito-widget>
            </Section>
        </StyledWrapper>
    </Layout>
)
export default RegisterPage

On this register page, Tito expects a custom element by name of tito-widget, but it complains about it not being a part of JSX.intrinsicElements. If you have suggestions of how to work around this in the short term, that would be awesome.

charliewilco commented 5 years ago

i can work on that for sure, i don't think the barrier should be lowered by removing typescript. i don't like that language. typescript provides consistency, type safety and navigation in your IDE (read vs code). rather than writing unit tests which are time consuming and a little brittle, static analysis gives a similar amount of confidence in our code without the overhead of maintaining tests.

i don't think the jump is astronomical if there's clear patterns on how interfaces are defined and a few notes on how to use typescript.