Skip to content
Luca Ubiali Web Developer

How to Contribute to Open Source - 11/13 - Implementing Feedback: Part 1

August 23rd, 2024
Continuous Learning

Episode - https://laracasts.com/series/how-to-contribute-to-open-source/episodes/11


Initial feed-backs by Jess Archer - the maintainer - for the PR are here https://github.com/laravel/prompts/pull/118#issuecomment-1965639102. They are very in-depth and provide interesting suggestion about how to implement the requested changes which are:

  1. add helper methods to steps for each prompt. So instead of calling add + a closure, it’s possible to just use text method to add a step for a text prompt

    1. This is the most interesting suggested change, looking forward to see this implemented

  2. remove the revert functionality

    1. As soon as I read this, I went “ouch this hurts”. Revert was a big part of the PR.

    2. In fact even Luke had the same reaction 😂 but the suggestion made sense and in the end is Jess the one that will have to maintain the code in the long run, so it’s a good thing to leave her code she’s fully happy with

    3. I was a bit confused about what Jess was asking for and assumed revert had to go completely. Turns out what Luke removed was just the closure to run logic when a step is reverted and the flag to prevent a step from being reverted. So it’s still possible to back-trace the steps.

  3. rename steps to form as the whole thing implemented in the PR has analogies with a web form

Luke started with the low-hanging fruits in this video and tacked points 2 and 3.