-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
[WIP] Allow user to add a name to a deployment so that in history it can be… #359
base: main
Are you sure you want to change the base?
Conversation
… more easily identified Adding new functionality that will allow users to save deployments. This should be accessible from all deployment options resolves #331
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 88049fe. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
@paustint I am curious what opinions you have on the current build so far. At the moment, I have it working but it feels disjointed. I have worked it out for one scenario, the Deploy to Org button. This is how the logic gets called for displaying the deployment options: The logic gets called for displaying the deployment status: The logic gets passed to and from I am also running into the following error for And into this error in Thank you in advance! |
@joiecosby - I didn't review everything in full detail, but here are some thoughts: I would probably do something like this (I did not do a full analysis, just a cursory glance) Basically just store the name locally wherever it is needed, and then pass it along with the function call to initiate the deployment (basically everywhere // deploy-metadata.utils.tsx
export async function saveHistory({
...
deployOptions: DeployOptions;
+/** Optional name to use for history */
+name?: string;
...
}) {
// there are a few places very similar to this
// useDeployMetadata....tsx
-const deployMetadata = useCallback(async () => {
+const deployMetadata = useCallback(async (deploymentHistoryName?: string) => {
saveHistory({
...
+name: deploymentHistoryName,
...
}); |
Notes from pair programming:
|
<Input label="Deployment History Name" className="slds-grow"> | ||
<input | ||
className="slds-input" | ||
value={undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paustint do you have a suggestion on how to not automatically pass this as undefined?
When I navigate away from the modal and back, I ideally want to have the name the user inputted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(unrelated) for an input, you never want the value to start as undefined
otherwise you will get an error saying "input is changing from uncontrolled to controlled"
Just like you are passing in setDeploymentHistoryName
, you also need to pass in the value you want to use as the initial state (and this should start as empty string, not undefined)
☁️ Nx Cloud ReportCI is running/has finished running commands for commit cd77497. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud. |
… more easily identified
Adding new functionality that will allow users to save deployments. This should be accessible from all deployment options
resolves #331