Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

CAST 2019 "'Git hook[ed]' on images & up your documentation game"

Can you remember the difference between two hex color values? Me neither!
Entering visual representations of recently-changed elements into version control makes review of past changes easier & speeds acclimation to a new web project, especially for visual learners. Surprisingly, methods for including images in your version control aren't standardized and are rarely used outside of large companies, and the rest of us are left checking out every major commit and viewing changes locally! Join me for a review of methods currently in use and discuss the benefits and drawbacks of each. The audience will learn from a survey of tools used by both designers and web developers, what methods are most appropriate for individual projects, & how these methods differ from those used at some of the largest companies (Google, eBay, etc.). Finding a method to track changes in your visual elements will save our future contributors (and future selves!) the pain of having to distinguish #2dc651 (lime green) from #34a34e (darker(!) lime green) and ultimately make our commit histories cleaner and our repos easier to navigate in ways that many of us have never imagined!

This talk was given at CAST 2019 in Cocoa Beach, FL.
Event link:

About Veronica Hanus
Before Veronica was a programmer, she was a researcher (she helped pick the Mars Curiosity Rover’s landing site!) with an eye for process improvement. As she’s taught herself web development, she’s brought her research approach from her time at NASA-JPL & MIT into whatever she was learning. She loves exploring the web and teaching, and recently co-taught a PyCon tutorial on using web-scraping and modeling to predict Oscar winners. When she isn’t learning how the web can be better for developers, she enjoys blogging, nerding out about documentation, and snuggling as many cats as possible.

  • Be the first to comment

  • Be the first to like this

CAST 2019 "'Git hook[ed]' on images & up your documentation game"

  1. 1. “Git Hook[ed]” on images & up your documentation game @veronica_hanus #CAST2019
  2. 2. @veronica_hanus #CAST2019Make your own!
  3. 3. @veronica_hanus #CAST2019
  4. 4. Doing things “the wrong way” is part of learning @veronica_hanus #CAST2019
  5. 5. Focusing on “the right way” freezes @veronica_hanus #CAST2019
  6. 6. @veronica_hanus #CAST2019
  7. 7. @veronica_hanus #CAST2019
  8. 8. Steps to roll back to a commit: - Select the commit - Find the ID for the commit - Enter command to “checkout” the commit with that ID - Open the code & HTML file - Is it what we want? - Create new branch (section of timeline) before making changes Rolling back individual commits @veronica_hanus #CAST2019
  9. 9. @veronica_hanus #CAST2019, modified
  10. 10. @veronica_hanus #CAST2019
  11. 11. View changes remotely, feel amazing and... Push ASAP Commit Make changes to code locally Learning to use Git A more thorough daily flow: - Pull other’s changes - Create branch / checkout branch - Local changes - Commit - Push when element is done - Check status - Continue local changes - (eventually) Merge branch You may also: - Undo commits - Squash commits - Undo push - Fetch - Rebase @veronica_hanus #CAST2019
  12. 12. @veronica_hanus #CAST2019Art wonderfully made by @QEDunham
  13. 13. @veronica_hanus #CAST2019Art wonderfully made by @QEDunham
  14. 14. @veronica_hanus #CAST2019Art wonderfully made by @QEDunham
  15. 15. @veronica_hanus #CAST2019Art wonderfully made by @QEDunham
  16. 16. @veronica_hanus #CAST2019
  17. 17. Rules of commit “time travel” - Summarize in subject (“what”), expand in body (“why”) - Avoid abbreviations - Use metadata (Issue IDs, etc.) - The test: “If applied, this commit will *subject line*” - The goal: Make Git log useful! @veronica_hanus #CAST2019
  18. 18. @veronica_hanus #CAST2019
  19. 19. - “Remove lighter green font & add underline to nav bar” - “Remove lighter/brighter font &...” What commit message should we make? So many greens! Long and still hard to understand! @veronica_hanus #CAST2019
  20. 20. What would you do? Better commit messages? Find tools giving cues? Other ways? Your idea here @veronica_hanus #CAST2019
  21. 21. What does a design process look like? Iteration w/o design wastes time! @veronica_hanus #CAST2019
  22. 22. @veronica_hanus #CAST2019
  23. 23. Design has methods! - Team “interview” - Translate business objectives to new state - ID what you don’t know - Review existing market product - Brainstorming - Listing user tasks - Roadmap - Focus group - Card sorting - Usability test - Concept testing - Guerrilla testing - Field studies - Eye movement tracking - Accessibility audit - A/B testing - (finally) Iteration @veronica_hanus #CAST2019
  24. 24. @veronica_hanus #CAST2019Art wonderfully made by @QEDunham
  25. 25. Screenshots in a local folder Adding visuals any way I can! @veronica_hanus #CAST2019
  26. 26. @veronica_hanus #CAST2019
  27. 27. Screenshots in saved in Git Moving toward a solution What pain points does my solution have? How do I address these? @veronica_hanus #CAST2019
  28. 28. @veronica_hanus #CAST2019 “Oh, we have that!”
  29. 29. Screenshots for testing… and tracking? Many tools: Cypress-match-screenshot, Puppeteer-screenshot-tester, Resemble.js, Wraith... @veronica_hanus #CAST2019
  30. 30. @veronica_hanus #CAST2019
  31. 31. @veronica_hanus #CAST2019 “Oh, we have that!”
  32. 32. A “Git” for design! Our examples: Abstract’s Compare Mode, Sketch’s Pages & Artboards, Sketch’s Zeplin @veronica_hanus #CAST2019
  33. 33. @veronica_hanus #CAST2019
  34. 34. Ready to dive in Puppeteer or Cypress-match-screen shot to automate screenshots Git hooks “hook” one action to others Terminal prompt for you to save by hand Time to take screenshots Remembering to take screenshots Adding image link to your commit message Pain Investigate Your commit to Git Git hook calls Pyppeteer Pyppeteer takes screenshot Terminal prompts you to save @veronica_hanus #CAST2019
  35. 35. Bring yourself Geology Web � @veronica_hanus #CAST2019
  36. 36. @veronica_hanus #CAST2019 Your super-powers work here
  37. 37. View changes remotely, feel amazing and... Push ASAP Commit Make changes to code locally 🤦 ☁☁☁ @veronica_hanus #CAST2019
  38. 38. Make your own! ➔ Puppeteer/Selenium/WebDriver for screenshots taken at every change ➔ Hand-created screenshots checked into version control ➔ Git Large File Storage or store files outside Git to accommodate file accumulation Existing tools ➔ Percy for visual testing ➔ Editor plugins that help you visualize the colors on your site ➔ Abstract/Zeplin/Sketch for scroll-through visuals alongside your version control ➔ Git-difftool shows changes from common diffing tools ➔ Git image view modes swipe & compare--your own personal, modern Blink comparator Your knowledge of your process to decide what is right for you
  39. 39. 👇Your company recruiting a DevRel or Dev Advocate?👇 🙌Pick me!🙌 🙏Thanks to… Each of you for coming(!), the CAST organizers for a wonderful event, the many, many devs & designers I badgered when I was investigating this problem, my crew Deborah, Diego, & Anna for help making this talk happen I tweet at @veronica_hanus Non-tweeters 👋 Video & Slides 🔜 🙌 Go build the tools you need! Let’s talk about in-code comments! (3-5 min survey)
  40. 40. Credits - Simple Git image: - “Git flow” workflow: - Git instructions for beginners: =sharing - Git XKCD: - Daily Git commands: - Commit XKCD: - Good commit messages: - Mismatched puzzle Pieces: - Color preview in-editor: Sublime’s Color Highlighter (view), Atom’s Pigments (view) & Color Picker (select/add) - Source for screenshot diffing images: - “Automated visual diffing with Puppeteer” (2018), Monica Dinculescue’s blog - Grumpy cat says “no new friends” - Question party @veronica_hanus