Skip to content

Commit

Permalink
feat(metadata-sidebar): Get and pass isBetaLanguageEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kajarosz committed Feb 10, 2025
1 parent 0770d07 commit 8901e51
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"@box/frontend": "^10.0.0",
"@box/item-icon": "^0.9.58",
"@box/languages": "^1.0.0",
"@box/metadata-editor": "^0.87.1",
"@box/metadata-editor": "^0.88.1",
"@box/react-virtualized": "9.22.3-rc-box.9",
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
"@chromatic-com/storybook": "^1.6.1",
Expand Down Expand Up @@ -310,7 +310,7 @@
"@box/box-ai-content-answers": "^0.86.0",
"@box/cldr-data": ">=34.2.0",
"@box/item-icon": "^0.9.58",
"@box/metadata-editor": "^0.79.1",
"@box/metadata-editor": "^0.88.1",
"@box/react-virtualized": "9.22.3-rc-box.9",
"@hapi/address": "^2.1.4",
"axios": "^0.25.0",
Expand Down
2 changes: 1 addition & 1 deletion src/elements/content-sidebar/MetadataInstanceEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const MetadataInstanceEditor: React.FC<MetadataInstanceEditorProps> = ({
<MetadataInstanceForm
areAiSuggestionsAvailable={areAiSuggestionsAvailable}
isAiSuggestionsFeatureEnabled={isBoxAiSuggestionsEnabled}
iaBetaLanguageEnabled={isBetaLanguageEnabled}
isBetaLanguageEnabled={isBetaLanguageEnabled}
isDeleteButtonDisabled={isDeleteButtonDisabled}
isUnsavedChangesModalOpen={isUnsavedChangesModalOpen}
onCancel={onCancel}
Expand Down
2 changes: 1 addition & 1 deletion src/elements/content-sidebar/MetadataSidebarRedesign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function MetadataSidebarRedesign({
<MetadataInstanceList
areAiSuggestionsAvailable={areAiSuggestionsAvailable}
isAiSuggestionsFeatureEnabled={isBoxAiSuggestionsEnabled}
// iaBetaLanguageEnabled={isBetaLanguageEnabled}
isBetaLanguageEnabled={isBetaLanguageEnabled}
onEdit={templateInstance => {
setEditingTemplate(templateInstance);
setIsDeleteButtonDisabled(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,9 @@ describe('elements/content-sidebar/Metadata/MetadataSidebarRedesign', () => {

test('should correctly render empty state when AI feature is enabled', () => {
renderComponent({}, { 'metadata.aiSuggestions.enabled': true });
expect(screen.getByRole('heading', { level: 2, name: 'Autofill Metadata with Box AI' })).toBeInTheDocument();
expect(screen.getByRole('heading', { level: 2, name: 'Add Metadata Templates' })).toBeInTheDocument();
expect(
screen.getByText(
'Use the power of Box AI to quickly capture document metadata, with ever-increasing accuracy.',
),
screen.getByText('Add Metadata to your file to support business operations, workflows, and more!'),
).toBeInTheDocument();
});

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1528,10 +1528,10 @@
resolved "https://registry.yarnpkg.com/@box/languages/-/languages-1.1.2.tgz#cd4266b3da62da18560d881e10b429653186be29"
integrity sha512-d64TGosx+KRmrLZj4CIyLp42LUiEbgBJ8n8cviMQwTJmfU0g+UwZqLjmQZR1j+Q9D64yV4xHzY9K1t5nInWWeQ==

"@box/metadata-editor@^0.87.1":
version "0.87.1"
resolved "https://registry.yarnpkg.com/@box/metadata-editor/-/metadata-editor-0.87.1.tgz#933ed2eeab9b159b7a02378a530d0b20fcffd35b"
integrity sha512-U1BNdpmx7hvCW95Jm91GzHQMr9XjNls6aSlEBWqfqbY0OrVYHxP5Q+R7fSU9fvqtoWYKQT1bfv7Kr+l+OiNPhQ==
"@box/metadata-editor@^0.88.1":
version "0.88.1"
resolved "https://registry.yarnpkg.com/@box/metadata-editor/-/metadata-editor-0.88.1.tgz#6beedb9e7c73cdd8824f9f52e641ac1ff1899967"
integrity sha512-Q6GXv9B0wSbDh9Uy7tLOg9lMeBiNx3d2WYoEZsf8Jm9kC2w8dWIGbHRqiD3E6GpvomhSrWfHzt2Zy/Bn7BRXDg==

"@box/[email protected]":
version "9.22.3-rc-box.9"
Expand Down

0 comments on commit 8901e51

Please sign in to comment.