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

revert(content-explorer): Revert rename dialog #3704

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions i18n/en-US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -592,16 +592,10 @@ be.renameDialogErrorInUse = An item with the same name already exists.
be.renameDialogErrorInvalid = This name is invalid.
# Error text for rename dialog when name is too long
be.renameDialogErrorTooLong = This name is too long.
# Header for rename file dialog
be.renameDialogFileHeader = Rename File
# Header for rename folder dialog
be.renameDialogFolderHeader = Rename Folder
# Label for rename dialog
be.renameDialogLabel = Rename
# Text for rename dialog
be.renameDialogText = Please enter a new name for {name}:
# Header for rename web link dialog
be.renameDialogWebLinkHeader = Rename Link
# Label for resume action for a single file.
be.resume = Resume
# Label for resume action for multiple files.
Expand Down
15 changes: 0 additions & 15 deletions src/elements/common/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,21 +317,6 @@ const messages = defineMessages({
description: 'Error text for rename dialog when name is too long',
defaultMessage: 'This name is too long.',
},
renameDialogFileHeader: {
id: 'be.renameDialogFileHeader',
description: 'Header for rename file dialog',
defaultMessage: 'Rename File',
},
renameDialogFolderHeader: {
id: 'be.renameDialogFolderHeader',
description: 'Header for rename folder dialog',
defaultMessage: 'Rename Folder',
},
renameDialogWebLinkHeader: {
id: 'be.renameDialogWebLinkHeader',
description: 'Header for rename web link dialog',
defaultMessage: 'Rename Link',
},
createDialogLabel: {
id: 'be.createDialogLabel',
description: 'Label for create folder dialog',
Expand Down
1 change: 1 addition & 0 deletions src/elements/content-explorer/ContentExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,7 @@ class ContentExplorer extends Component<Props, State> {
isLoading={isLoading}
errorCode={errorCode}
parentElement={this.rootElement}
appElement={this.appElement}
/>
) : null}
{canShare && selected && !!this.appElement ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import type { BoxItem } from '../../common/types/core';

type Props = {
appElement: HTMLElement,
errorCode: string,
intl: IntlShape,
isLoading: boolean,
Expand Down Expand Up @@ -101,6 +102,7 @@ const RenameDialog = ({

return (
<Modal
appElement={appElement}
className={CLASS_MODAL_CONTENT}
contentLabel={intl.formatMessage(messages.renameDialogLabel)}
isOpen={isOpen}
Expand Down
6 changes: 0 additions & 6 deletions src/elements/content-explorer/RenameDialog.scss

This file was deleted.

130 changes: 0 additions & 130 deletions src/elements/content-explorer/RenameDialog.tsx

This file was deleted.

115 changes: 0 additions & 115 deletions src/elements/content-explorer/__tests__/RenameDialog.test.tsx

This file was deleted.

51 changes: 0 additions & 51 deletions src/elements/content-explorer/stories/RenameDialog.stories.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const openRenameDialog = {
expect(renameButton).toBeInTheDocument();
await userEvent.click(renameButton);

expect(await screen.findByText('Rename File')).toBeInTheDocument();
expect(await screen.findByText('Please enter a new name for Book Sample:')).toBeInTheDocument();
},
};

Expand All @@ -97,12 +97,12 @@ export const closeRenameDialog = {
expect(renameButton).toBeInTheDocument();
await userEvent.click(renameButton);

expect(await screen.findByText('Rename File')).toBeInTheDocument();
expect(await screen.findByText('Please enter a new name for Book Sample:')).toBeInTheDocument();
const cancelButton = screen.getByText('Cancel');
await userEvent.click(cancelButton);

await waitFor(() => {
expect(screen.queryByText('Rename File')).not.toBeInTheDocument();
expect(screen.queryByText('Please enter a new name for Book Sample:')).not.toBeInTheDocument();
});
},
};
Expand Down
Loading
Loading