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

fix(metadata-sidebar): UnsavedChangesModal changes #3691

Merged
merged 17 commits into from
Oct 7, 2024

Conversation

JakubKida
Copy link
Contributor

@JakubKida JakubKida commented Oct 2, 2024

  • Rename onUnsavedChangesModalCancel to new prop onDiscardUnsavedChanges added on UnsavedChangesModal redesign

  • Add storybook test for switching the templates through unsaved changes modal

  • move disabling the templates with setSelectedTemplates for AddTemplateDropdown to own useEffect to avoid conflicts

@JakubKida JakubKida requested a review from a team as a code owner October 2, 2024 10:38
@CLAassistant
Copy link

CLAassistant commented Oct 2, 2024

CLA assistant check
All committers have signed the CLA.

@JakubKida JakubKida requested a review from a team as a code owner October 2, 2024 11:22
@JakubKida JakubKida changed the title fix(metadata-sidebar): Rename prop for unsaved changes callback fix(metadata-sidebar): Unsaved Changes Modal changes Oct 2, 2024
@JakubKida JakubKida changed the title fix(metadata-sidebar): Unsaved Changes Modal changes fix(metadata-sidebar): UnsavedChangesModal changes Oct 2, 2024
@JakubKida JakubKida force-pushed the unsaved-modal-changes branch 14 times, most recently from 38c18dd to 5698d74 Compare October 4, 2024 09:31
setSelectedTemplates(templateInstances);
}, [templateInstances]);
// disable only pre-existing template instances from dropdown if not editing or editing pre-exiting one
if (!editingTemplate || templateInstances.some(t => t.templateKey === editingTemplate.templateKey)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets's add scope attribute to the filter condition

wpiesiak
wpiesiak previously approved these changes Oct 4, 2024
wpiesiak
wpiesiak previously approved these changes Oct 4, 2024
<AutofillContextProvider isAiSuggestionsFeatureEnabled={isBoxAiSuggestionsEnabled}>
<AutofillContextProvider
isAiSuggestionsFeatureEnabled={isBoxAiSuggestionsEnabled}
fetchSuggestions={() => Promise.resolve([])}

Choose a reason for hiding this comment

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

Is this going to be implemented in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a temporary placeholder while the feature is still being implemented in metadata-editor

<MetadataInstanceForm
areAiSuggestionsAvailable={true}

Choose a reason for hiding this comment

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

can we just pass areAiSuggestionsAvailable without the explicit boolean assignment since it is always true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a temporary placeholder while the feature is still being implemented in metadata-editor

bfoxx1906
bfoxx1906 previously approved these changes Oct 7, 2024
@JakubKida JakubKida dismissed stale reviews from bfoxx1906 and wpiesiak via 2323843 October 7, 2024 17:12
@mergify mergify bot merged commit 305d3af into box:master Oct 7, 2024
6 checks passed
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.

6 participants