Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(settings): control switching to Output panel when Push-or-deploy… #5904

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

tehnrd
Copy link
Contributor

@tehnrd tehnrd commented Oct 18, 2024

What does this PR do?

When Push-or-deploy-on-save is enabled, do not switch the UI to the Output panel when a file is saved.

What issues does this PR fix or reference?

#5903
#5903 @W-17206953@

Functionality Before

https://www.loom.com/share/a59adaa191474e64a835e9d52121f6c3?sid=36357412-c0f6-48b8-93bd-ea2df8b6f16b

Functionality After

https://www.loom.com/share/a59adaa191474e64a835e9d52121f6c3?t=279&sid=9bc3b0f9-7245-4026-aa22-fd3e64d05300 (same video with timestamp start at functionality after)

@tehnrd tehnrd requested a review from a team as a code owner October 18, 2024 01:56
@tehnrd tehnrd requested a review from lahernandezb October 18, 2024 01:56
@@ -19,8 +20,9 @@ import { CompositePostconditionChecker } from './util/compositePostconditionChec
import { TimestampConflictChecker } from './util/timestampConflictChecker';

export class LibraryDeploySourcePathExecutor extends DeployExecutor<string[]> {
constructor() {
constructor(showChannelOutput: boolean = true) {
Copy link
Contributor Author

@tehnrd tehnrd Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one area I debated about. 1) passing in the indicator to show the output panel as a constructor argument or 2) creating a separate instance method like setShowChannelOutput() called after LibraryDeploySourcePathExecutor is instantiated.

Option 2 would make the new SfCommandlet<string[]>( command below a little more complicated as you'd have to instantiate LibraryDeploySourcePathExecutor first and then call the method to set the output, then pass the object to the SfCommandlet constructor.

With the current approach, at least TypeScript/Intelisense makes it easier to understand the constructor argument.

Open to thoughts on either approach.

@tehnrd tehnrd force-pushed the deploy-on-save-panel branch 2 times, most recently from f0dc800 to 3b421e0 Compare October 18, 2024 22:08
@mingxuanzhangsfdx
Copy link
Member

The implementation looks good to me. @rsensharma would you like to take a look at the proposal?

@brian-krynitsky
Copy link

@tehnrd I was recently looking for a way to turn off the auto focus on the output panel and came across this PR, thank you for contributing to this. Question about the behavior if you have the bottom panel hidden...assuming there are no errors in the save, does the panel stay hidden all together?

@tehnrd tehnrd force-pushed the deploy-on-save-panel branch 2 times, most recently from 3b421e0 to 4ca61d0 Compare October 27, 2024 15:19
@klouf-threshold
Copy link

klouf-threshold commented Nov 4, 2024

This would be a huge QOL improvement. I would suggest 2 changes:

  1. Apply to all deploy operations (or have options for both), not just push/deploy-on-save.
  2. Have the option be configurable to suppress the panel open/switch as a select list with options, instead of a boolean:
    a. Always
    b. Success only
    c. Failure only
    d. Never

Personally (and I imagine there's a decent overall user split) I don't use deploy-on-save so this actually wouldn't benefit me as currently implemented. Additionally (and I would venture a guess that I'm probably not the only one, although admittedly maybe more likely in the minority here), I don't use the Problems view since I have a chaotic workspace with dozens of files open and therefore a Problems tab with hundreds of warnings/errors at any given time. I actually didn't even realize that deployment errors were surfaced there 😆 . Now that I know that, I could potentially transition to use it instead of the Output tab, though.

tl;dr love it, but would like to see more flexibility/options 😄

@tehnrd
Copy link
Contributor Author

tehnrd commented Nov 4, 2024

@klouf-threshold, I am definitely open to adding that, but I would like someone from Salesforce to provide some input on what they would like to see.

@tehnrd tehnrd force-pushed the deploy-on-save-panel branch from 4ca61d0 to 0893341 Compare November 4, 2024 19:41
@rsensharma
Copy link

The implementation looks good to me. @rsensharma would you like to take a look at the proposal?

@mingxuanzhangsfdx As a first step, this looks good. We can add more flexibility in the future.

@rsensharma
Copy link

@tehnrd - We currently don't have the bandwidth to work on this. Your initial use case/implementation looks fine. We can get that added. For adding flexibility and the other use cases, I can provide more clear requirements, if you are up for to do the development. Let me know. fyi - @mingxuanzhangsfdx

Copy link
Member

@mingxuanzhangsfdx mingxuanzhangsfdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the enhancement. If you would like to support more flexibility for the feature, please continue the discussion on Github Issue and tag me or @rsensharma .

@mingxuanzhangsfdx mingxuanzhangsfdx merged commit 22df9f8 into forcedotcom:develop Nov 12, 2024
6 of 7 checks passed
@tehnrd
Copy link
Contributor Author

tehnrd commented Nov 18, 2024

Amazing, thanks all. Unfortunately, I don't have the bandwidth to expand on this either, but if someone opens a new issue and tags me, I might be able to get to it someday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants