Shipping Less
- Similar to the previous exercise, but lets avoid shipping the HTML instead of hiding it client-side
- Clear out the changes from "Tradeoffs" with
git checkout master
- In
app/views/stories/_comment.html.erb
replace the children comments list-group
with <a href="#todo">Load more</a>
- (Don't forget to restart
yarn run prod
)
- How do these changes affect the times?
Rewrite the Header Animation
Rewrite the Story#show accordion
- The TypeScript that handles the accordion (in app/javascript/story.ts) iterates over the comments and adds DOM elements to the page on initial load.
- How might you improve the code? Alternatively, how else could you reduce the size of the HTML on this page?
Remove Unused Code
- Open the Dev Tools console drawer and select the coverage tab
- Hit the "start instrumenting coverage and reload page" button in the upper left corner
- Identify any SCSS or TS files that are not used