Skip to content

Conversation

lokanandaprabhu
Copy link
Contributor

Hey, I just made a Pull Request!

Story:

https://issues.redhat.com/browse/FLPATH-2770

Orchestrator-disable-next-onfetch

Orchestrator-disable-next-01

Disable Next button when active widgets are fetching and processing data

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Oct 17, 2025

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-orchestrator-form-api workspaces/orchestrator/plugins/orchestrator-form-api minor v2.1.0
@red-hat-developer-hub/backstage-plugin-orchestrator-form-react workspaces/orchestrator/plugins/orchestrator-form-react minor v2.1.0
@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets workspaces/orchestrator/plugins/orchestrator-form-widgets minor v1.1.0

Copy link

setAuthTokenDescriptors: (
authTokenDescriptors: AuthTokenDescriptor[],
) => void;
handleFetchStarted?: () => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a need to have those as optional?

}, [formApi]);

return <NewComponent {...props} />;
const propsWithFetchHandlers = useMemo(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be left to the FormComponent? Similar to the handleValidate* hooks.


setLabels(selectedLabels);
setValues(selectedValues);
await wrapProcessing(async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is that? Isn't tracking of the fetch enough?
These applySelector* are just sort of filtering the already loaded data

* @param handleFetchEnded - Optional callback to notify when processing ends
* @returns Object containing processing state management
*/
export const useProcessingState = (
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure we need this additional hook. All the data is in the form context, including isFecthing

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants