Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Document & Organize React Components as separate package #44

Open
4 tasks
b5 opened this issue Aug 12, 2017 · 1 comment
Open
4 tasks

Document & Organize React Components as separate package #44

b5 opened this issue Aug 12, 2017 · 1 comment

Comments

@b5
Copy link
Member

b5 commented Aug 12, 2017

With the EDGI web-monitoring project moving away from typescript, and @Blackglade working on react visualization components, we have more reasons to build out our components as a standalone library. Getting these components used in multiple places gets more eyes, and forces us to maintain a cleaner codebase.

If others are interested, I'd be happy to put the time into building this library from our existing parts, mainly b/c I don't think it would take too long, and would be time well spent.

  • Lint All Components
  • Figure out a styling solution: Currently leaning toward inlining styles
  • Document Each component with prototypes & comments that explain intended use.
  • Build a standalone demo environment for viewing components. I'm thinking of react storybook

If we built this, @lightandluck, @danielballan, @Mr0grog, do you think there's a chance it'll get used in web-monitoring?

@Mr0grog
Copy link
Member

Mr0grog commented Aug 14, 2017

I think we already have one component in common (List), though it looks like it has since evolved slightly differently (but likely no problem to re-unify), so yes, this would be useful at some level. We should probably try and keep it to more generic things or maybe only promote components/utilities to it as we find ones worth sharing (e.g. we certainly wouldn’t want to merge Navbar classes).

  • I think the most important of all the tasks you identified above is documenting each component, even if only as JSDoc-style comments + a short summary in the README. All the other items there are useful, but we can go without them just fine.

  • I am less worried about having a great styling story.

    • Re: the discussion on Consider switching from gulp to webpack edgi-govdata-archiving/web-monitoring-ui#88, probably better to keep the styling involved in the shared library to a minimum that is focused on function.
    • I am still very on the fence about inline styles vs. focusing on classes in my own practice. Good arguments both ways.
    • I would love to see us leverage CSS custom properties where reasonable, but not sure on DataTogether’s browser compatibility policy vs. Web Monitoring’s (in WM, we’ve pretty much gone with “latest of any given browser; JS required.” That said, custom properties has no IE support (only Edge) and I suspect it may never. And Edge has a crasher related to using them in animations. So maybe risky.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants