Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC8ae52ab7e0a2: [e.cash] Add id param and better comments to H3 component
npm run dev
go to core-tech page
inspect element on the 'AVALANCHE' title, and check it has no id assigned to it
Then add an id={title} to the H3 instance in TextImageBlock on the core-tech page
inspect the element again and should see id="AVALANCHE" on the h3
then npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- ecash-id-to-h3
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 24046 Build 47702: Build Diff Build 47701: arc lint + arc unit
Event Timeline
web/e.cash/components/h3/index.js | ||
---|---|---|
15 ↗ | (On Diff #40793) | what happens if id is undefined? |
Nothing actually if its undefined, but it will put a blank id if an empty string gets passed which is invalid, so adding back in that check
web/e.cash/components/h3/isValidCSSId.js | ||
---|---|---|
9 | too much lol means the page can still load if a dev gives this component a bad ID ... but in this case, the component just has no ID, which is not what the dev expects Could be worth adding snapshot testing to make sure the component renders even if id is not provided. But, since
...even this would be a bit over-engineered imo |