[arvados-workbench2] created: 2.4.0-410-g30a7fda3

git repository hosting git at public.arvados.org
Thu Dec 15 16:04:35 UTC 2022


        at  30a7fda372e1a2288097af73a40f4b02f330e996 (commit)


commit 30a7fda372e1a2288097af73a40f4b02f330e996
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Dec 14 21:52:10 2022 +0100

    19865: Sets the input search component to clear on route change.
    
    Instead of passing the UUID of the selected object, pass the current location
    path, so navigation actions that change said path will trigger an input
    field reset, but selecting different items in the table won't.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index e4eef593..ff0b6fc7 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -172,7 +172,7 @@ export const DataExplorer = withStyles(styles)(
                                         {!hideSearchInput && <SearchInput
                                             label={searchLabel}
                                             value={searchValue}
-                                            selfClearProp={currentItemUuid}
+                                            selfClearProp={this.props.currentRoute || ''}
                                             onSearch={onSearch} />}
                                     </div>}
                                     {actions}
diff --git a/src/components/search-input/search-input.tsx b/src/components/search-input/search-input.tsx
index 6d85ed22..fbb4f599 100644
--- a/src/components/search-input/search-input.tsx
+++ b/src/components/search-input/search-input.tsx
@@ -71,7 +71,7 @@ export const SearchInput = (props: SearchInputProps) => {
             () => {
                 props.onSearch(eventValue);
             },
-             props.debounce || DEFAULT_SEARCH_DEBOUNCE
+            props.debounce || DEFAULT_SEARCH_DEBOUNCE
         ));
     };
 
diff --git a/src/views-components/data-explorer/data-explorer.tsx b/src/views-components/data-explorer/data-explorer.tsx
index 46aca455..48046987 100644
--- a/src/views-components/data-explorer/data-explorer.tsx
+++ b/src/views-components/data-explorer/data-explorer.tsx
@@ -33,7 +33,7 @@ const mapStateToProps = (state: RootState, { id }: Props) => {
         currentRefresh: currentRefresh,
         currentRoute: currentRoute,
         paperKey: currentRoute,
-        currentItemUuid
+        currentItemUuid,
     };
 };
 

commit 5c54f6a238b114248fe2222fec3b8eeec2893a35
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Dec 15 16:58:42 2022 +0100

    19865: Adds integration test exposing the bug.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/cypress/integration/project.spec.js b/cypress/integration/project.spec.js
index bbb3571a..7c3f9f7a 100644
--- a/cypress/integration/project.spec.js
+++ b/cypress/integration/project.spec.js
@@ -223,6 +223,40 @@ describe('Project tests', function() {
         });
     });
 
+    it('resets the search box only when navigating out of the current project', function() {
+        const fooProjectNameA = `Test foo project ${Math.floor(Math.random() * 999999)}`;
+        const fooProjectNameB = `Test foo project ${Math.floor(Math.random() * 999999)}`;
+        const barProjectNameA = `Test bar project ${Math.floor(Math.random() * 999999)}`;
+
+        [fooProjectNameA, fooProjectNameB, barProjectNameA].forEach(projName => {
+            cy.createGroup(activeUser.token, {
+                name: projName,
+                group_class: 'project',
+            });
+        });
+
+        cy.loginAs(activeUser);
+        cy.get('[data-cy=project-panel]')
+            .should('contain', fooProjectNameA)
+            .and('contain', fooProjectNameB)
+            .and('contain', barProjectNameA);
+
+        cy.get('[data-cy=search-input]').type('foo');
+        cy.get('[data-cy=project-panel]')
+            .should('contain', fooProjectNameA)
+            .and('contain', fooProjectNameB)
+            .and('not.contain', barProjectNameA);
+
+        // Click on the table row to select it, search should remain the same.
+        cy.get(`p:contains(${fooProjectNameA})`)
+            .parent().parent().parent().parent().click();
+        cy.get('[data-cy=search-input] input').should('have.value', 'foo');
+
+        // Click to navigate to the project, search should be reset
+        cy.get(`p:contains(${fooProjectNameA})`).click();
+        cy.get('[data-cy=search-input] input').should('not.have.value', 'foo');
+    });
+
     it('navigates to the root project after trashing the parent of the one being displayed', function() {
         cy.createGroup(activeUser.token, {
             name: `Test root project ${Math.floor(Math.random() * 999999)}`,

commit d0959ecba44ae52fc2e7b27674ef7a5076bf9eb2
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Dec 15 15:24:32 2022 +0100

    19865: Ignores /public/_health/ dir.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/.gitignore b/.gitignore
index ead5e35a..7358d627 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,7 @@ yarn-error.log*
 .idea
 .vscode
 /public/config.json
+/public/_health/
 
 # see https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
 .pnp.*

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list