Add to .forceignore as a command option in context-click (right-click for PC) #5804
Replies: 4 comments
-
Hi @jonathanegan - Thanks for taking the time to log this feedback! Thank you for attending TDX and checking out the demo yesterday also! Do you have any estimate of the time this feature might save you? I can see the usefulness and a bit more data on productivity would help with prioritizing in the future. |
Beta Was this translation helpful? Give feedback.
-
@smaddox-sf - Firstly, great job on TDX. Every session that I attended was beyond brilliant! In my typical workflow I would say it would save me about 20m every time I'm pulling changes from Scratch Orgs. I estimate that based off running sfdx force:source:status, the thought process that goes into what to pull, the tidy up of when I do pull every change (e.g going through each file to see whether I really do want those changes or not) and then not having to reset source tracking when I discard the changes. On top of that, for our wider team of developers it allows a more convenient way to add to .forceignore (even temporarily) and therefore is more likely to get used. So, to explode that out - typically when working on features I'd pull changes from Scratch Orgs sometimes daily (I prefer to keep a Scratch Org alive for 1 day) or for larger features once a week. Therefore I'd estimate a total time saving of, give or take, 1hr per week so I guess I'll say about 50hrs per year... That said, I'd be surprised if other developers haven't had the same thought on a convenience feature like this and it could be worth validation via other developers whether they too feel they might benefit from this. |
Beta Was this translation helpful? Give feedback.
-
Excellent! I'm so happy to hear that the TDX content was worthwhile for you! Thank you very much for this detail - it's extremely helpful. We'll gather more input and consider it for the roadmap |
Beta Was this translation helpful? Give feedback.
-
I'd like to add that I was about to make this exact feature request. The way that my organization operates, we are less frequently in Scratch orgs, and more frequently in shared sandboxes that are more "at risk" of having multiple projects deployed on them. With this in mind, this capability would probably save me more on the order of 100-200 hours per year. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
Use Case: After pulling source from a Scratch Org it would be very useful to have the ability to context-click (or right-click for PC fans!) on a file and choose to add to .forceignore in a similar way to add to .gitignore works. What I often find is some files accidentally getting committed or other times not committed and sometimes breaking the pull/push commands since it recognises it as a change and it would be beneficial to be able to highlight a file (or multiple files) and choose to add to .forceignore
Describe the solution you'd like
A simple and fast way to add file(s) to .forceignore so that it isn't recognised in pull/push commands for source tracked orgs (Scratch Orgs and source tracked sandboxes). It may even be useful to be able to include an entire folder. I know how to do all of that manually, and regularly do - so the implementation of this feature request is simply converting that into a mouse-click (convenience) but also can speed up general developers workflow (e.g. highlight 10 files and add to .forceignore as opposed to manually copy/paste them into the file).
Describe alternatives you've considered
The most obvious alternative is to simply copy/paste the path of the file into the .forceignore which works in most cases. From time to time I have gone a step too far (e.g. already discarded changes) and when I try sfdx push I sometimes get an error where there are certain files (e.g. object-meta.xml files) that can't be changed (or at least not in my circumstance where I'm changing objects that are part of a Managed Package - sfdx recognises those changes).
On top of that is simply having a consistent and defined approach to the contents of the .forceignore generally in advance (and making ongoing corrections). I would envisage the above as a quick approach to updating the .forceignore rather than a real strategy on what needs to be in there (since I wouldn't necessarily see .forceignore being 100 lines of files I didn't want to pull as there would be a cleaner way to use wildcards for that requirement).
Additional context
None - however just to be clear I would definitely see this as a convenience and can probably be way way down the ranked feature request list :-)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions