Skip to content
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
3 changes: 2 additions & 1 deletion src/elements/content-uploader/ContentUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ type State = {
const CHUNKED_UPLOAD_MIN_SIZE_BYTES = 104857600; // 100MB
const FILE_LIMIT_DEFAULT = 100; // Upload at most 100 files at once by default
const HIDE_UPLOAD_MANAGER_DELAY_MS_DEFAULT = 8000;
const HIDE_MODERNIZED_UPLOAD_MANAGER_DELAY_MS = 5000;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
const SLIDE_OUT_ANIMATION_NAME = 'bcu-modernized-slideOut';
const EXPAND_UPLOADS_MANAGER_ITEMS_NUM_THRESHOLD = 5;
const UPLOAD_CONCURRENCY = 6;
Expand Down Expand Up @@ -1653,7 +1654,7 @@ class ContentUploader extends Component<ContentUploaderProps, State> {
this.modernizedDismissTimer = setTimeout(() => {
this.setState({ modernizedPanelState: 'dismissing' });
this.modernizedDismissTimer = null;
}, HIDE_UPLOAD_MANAGER_DELAY_MS_DEFAULT);
}, HIDE_MODERNIZED_UPLOAD_MANAGER_DELAY_MS);
};

finalizeModernizedDismiss = (): void => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ describe('elements/content-uploader/ContentUploader', () => {
});

describe('modernized panel open/close lifecycle', () => {
const HIDE_DELAY_MS = 8000;
const HIDE_DELAY_MS = 5000;

const makeItem = (name, status) => {
let progress = 0;
Expand Down Expand Up @@ -1931,10 +1931,10 @@ describe('elements/content-uploader/ContentUploader', () => {
});
expect(instance.modernizedDismissTimer).not.toBeNull();

jest.advanceTimersByTime(3000);
jest.advanceTimersByTime(HIDE_DELAY_MS - 1);
expect(wrapper.state('modernizedPanelState')).toBe('shown');

jest.advanceTimersByTime(5000);
jest.advanceTimersByTime(1);
expect(wrapper.state('modernizedPanelState')).toBe('dismissing');
});

Expand Down
Loading