diff --git a/CHANGELOG.md b/CHANGELOG.md index a3fe09565..67efb0747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.10.1] + +### Fixed + +- WP-778: Fix infinite loop for state update in useEffect (#1019) +- Quick: CSS regression fixes- testing session (#1018) + +## [3.10.0] + +### Added + +- deps/react-18: Update React to v18 (#979) +- WP-50: Fix sizing of buttons "as-link" (#986) +- WP-509: Handle file/folder download feature with large number of files (#981) +- WP-520: AppTray should use versionEnabled for list of apps instead of enabled (#991) +- WP-24: Disabling Google Drive Integration (#988) +- WP-730: Refactor useRename to use react-query (#993) +- WP-728: Mutation hook: Copy file (#1000) +- WP-78: V3 Shared Workspaces Tests (#987) + +### Fixed + +- WP-419 Public Data Header Left Margin (#1003) +- WP-765: Fix job status button to show background (#1015) + + ## [3.9.0] ### Fixed @@ -1115,7 +1141,9 @@ WP-306: Fix target path regression (#871) ## [1.0.0] - 2020-02-28 v1.0.0 Production release as of Feb 28, 2020. -[unreleased]: https://github.com/TACC/Core-Portal/compare/v3.9.0...HEAD +[unreleased]: https://github.com/TACC/Core-Portal/compare/v3.10.1...HEAD +[3.10.1]: https://github.com/TACC/Core-Portal/releases/tag/v3.10.1 +[3.10.0]: https://github.com/TACC/Core-Portal/releases/tag/v3.10.0 [3.9.0]: https://github.com/TACC/Core-Portal/releases/tag/v3.9.0 [3.8.2]: https://github.com/TACC/Core-Portal/releases/tag/v3.8.2 [3.8.1]: https://github.com/TACC/Core-Portal/releases/tag/v3.8.1 diff --git a/client/src/components/Applications/AppForm/AppForm.jsx b/client/src/components/Applications/AppForm/AppForm.jsx index ddb106435..e2372c24c 100644 --- a/client/src/components/Applications/AppForm/AppForm.jsx +++ b/client/src/components/Applications/AppForm/AppForm.jsx @@ -152,7 +152,6 @@ const HandleDependentFieldChanges = ({ app, formStateUpdateHandler }) => { const { values, setValues } = useFormikContext(); React.useEffect(() => { if (previousValues) { - let valueUpdated = false; let updatedValues = { ...values }; // Set the current allocation @@ -171,7 +170,6 @@ const HandleDependentFieldChanges = ({ app, formStateUpdateHandler }) => { updatedValues, formStateUpdateHandler ); - valueUpdated = true; } if (previousValues.execSystemId !== values.execSystemId) { updatedValues = execSystemChangeHandler( @@ -179,16 +177,16 @@ const HandleDependentFieldChanges = ({ app, formStateUpdateHandler }) => { values, formStateUpdateHandler ); - valueUpdated = true; } if ( previousValues.execSystemLogicalQueue !== values.execSystemLogicalQueue ) { updatedValues = updateValuesForQueue(app, values); - valueUpdated = true; } - if (valueUpdated) setValues(updatedValues); + if (JSON.stringify(updatedValues) !== JSON.stringify(values)) { + setValues(updatedValues); + } } setPreviousValues(values); }, [app, values, setValues, formStateUpdateHandler]); diff --git a/client/src/components/DataFiles/DataFilesListing/DataFilesListing.test.jsx b/client/src/components/DataFiles/DataFilesListing/DataFilesListing.test.jsx index 6a75abfd5..3d4a3ea9a 100644 --- a/client/src/components/DataFiles/DataFilesListing/DataFilesListing.test.jsx +++ b/client/src/components/DataFiles/DataFilesListing/DataFilesListing.test.jsx @@ -324,3 +324,102 @@ describe('DataFilesListing - Section Name Determination', () => { ).toBeInTheDocument(); }); }); +describe('DataFilesListing - showViewPath', () => { + afterEach(() => { + vi.restoreAllMocks(); + }); + it('renders the "Path" column when showViewPath is true', () => { + const testfile = { + system: 'test.system', + path: '/path/to/file', + name: 'testfile', + format: 'file', + length: 4096, + lastModified: '2019-06-17T15:49:53-05:00', + _links: { self: { href: 'href.test' } }, + }; + const history = createMemoryHistory(); + history.push('/workbench/data/tapis/private/test.system/'); + const store = mockStore({ + ...initialMockState, + files: { + ...initialMockState.files, + listing: { FilesListing: [testfile] }, + }, + workbench: { + config: { + viewPath: true, + }, + }, + }); + // Spy on useMemo to capture the cells array + const useMemoSpy = vi + .spyOn(React, 'useMemo') + .mockImplementation((fn) => fn()); + const { getByText } = renderComponent( + , + store, + history + ); + // Path cell is added + expect(getByText('Path')).toBeDefined(); + // Check the length of the cells array + const cellsArray = useMemoSpy.mock.results.find((result) => + Array.isArray(result.value) + ).value; + expect(cellsArray.length).toBe(6); + }); + it('does not render the "Path" column when showViewPath is false', () => { + const testfile = { + system: 'test.system', + path: '/path/to/file', + name: 'testfile', + format: 'file', + length: 4096, + lastModified: '2019-06-17T15:49:53-05:00', + _links: { self: { href: 'href.test' } }, + }; + const history = createMemoryHistory(); + history.push('/workbench/data/tapis/private/test.system/'); + const store = mockStore({ + ...initialMockState, + files: { + ...initialMockState.files, + listing: { FilesListing: [testfile] }, + }, + workbench: { + config: { + viewPath: false, + }, + }, + }); + // Spy on useMemo to capture the cells array + const useMemoSpy = vi + .spyOn(React, 'useMemo') + .mockImplementation((fn) => fn()); + const { queryByText } = renderComponent( + , + store, + history + ); + // Path should not exist as a new cell + expect(queryByText('Path')).toBeNull(); + // Check the length of the cells array + const cellsArray = useMemoSpy.mock.results.find((result) => + Array.isArray(result.value) + ).value; + expect(cellsArray.length).toBe(5); + }); +}); diff --git a/client/src/components/DataFiles/DataFilesModals/DataFilesPreviewModal.jsx b/client/src/components/DataFiles/DataFilesModals/DataFilesPreviewModal.jsx index 6d215463f..169bfb171 100644 --- a/client/src/components/DataFiles/DataFilesModals/DataFilesPreviewModal.jsx +++ b/client/src/components/DataFiles/DataFilesModals/DataFilesPreviewModal.jsx @@ -101,11 +101,10 @@ const DataFilesPreviewModal = () => { )} {previewUsingHref && !previewUsingBrainmap && ( -
+