Page MenuHomePhabricator

[xec-web-components] Initial commit for xec-web-components library
AbandonedPublic

Authored by kieran709 on Nov 28 2022, 22:44.

Details

Reviewers
bytesofman
emack
Group Reviewers
Restricted Project
Summary

Related to T1955. The xec-web-components library has been initialized in the /web dir. The scaffolding for this library comes from the following git repo: https://github.com/HarveyD/react-component-library. I have chosen this as the scaffolding because it incorporates typescript, rollup, storybook and jest. Rollup config and package.json have been altered as I have opted to use styled-components instead of postcss or sass. My reasonsing behind this is twofold - 1. It is consistent with Cashtab, and 2. the author of the git repo this library is based on has noted issues with using rollup plugins to handle styling. The author also claims that when implementing code splitting, the node-resolve rollup plugin causes node_modules to be bundled in the build dir, however based on my research and experience, this issue has been resolved at the plugin level and does not need to be addressed to successfully implement code splitting. The scaffolding for this project also includes jest, and a component generating function to cut down on time spent initializing the component, however this may be overkill and could be removed. Next steps for testing: publish and consume a component from the library, ensure that code is tree-shakable.

Test Plan

cd xec-web-components
npm run storybook

observe that the button component is present, and that there are no errors in the dev console.

npm run build

observe that the build folder is generated, and that it maintains the correct file structure.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
xec-web-components
Lint
Lint Errors
SeverityLocationCodeMessage
Errorweb/xec-web-components/README.md:206lint-markdown1Dead link
Warningweb/xec-web-components/README.md:244SPELL1Possible Spelling Mistake
Unit
No Test Coverage
Build Status
Buildable 21231
Build 42114: Build Diff
Build 42113: arc lint + arc unit

Event Timeline

Removed content from README as it was irrelevant to the library.

Looks good and test plan works. The library you've chosen for scaffolding seems to be active and well used.

So that this is reviewable and a good starting point, please

  1. Abandon this diff
  2. New diff that does nothing but bring in the library exactly as it exists in the repo
  3. Make diffs on top of that to accomplish the "Rollup config and package.json have been altered as I have opted to use styled-components instead of postcss or sass." discussed in the summary
This revision now requires changes to proceed.Nov 29 2022, 05:51