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

task/wg-76-project-listing-query #265

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

sophia-massie
Copy link
Contributor

Overview:

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

Updates project type and hook so that the merged response from DesignSafe and Hazmapper load before loading the project listing

Testing Steps:

  1. Go to http://localhost:4200/ and make sure that the Project immediately loads with table and map name. There previously was a delay as the component got the DesignSafe response.
  2. Change if (isError) or if {isLoading} to if (!isError) or if (isLoading) to check the display of those states.
  3. Review code to make sure the project type and hooks are efficient.

UI Photos:

Screenshot 2024-09-30 at 12 32 41 PM

Notes:

TODO:
Edit and Trash buttons just open the map at this point. A delete and edit request have not been added yet.

@@ -1,11 +1,7 @@
import React, { useState } from 'react';
import { Project, DesignSafeProject } from '../../types';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop these.

<th>Project</th>
<th>
<CreateMapModal isOpen={isModalOpen} toggle={toggleModal} />
<Button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a linter preference in syntax formatting (prefers one line apparently).

Copy link
Contributor

@taoteg taoteg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 3 linting errors that are tiny (drop line 2, tweak formatting on line 40 button), but otherwise all works for me locally. LGTM after the linting is cleaned up.

apiService: ApiService.DesignSafe,
});
return query;
};

export const mergeDesignSafeProject = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Could useProjects be used like useDsProject within mergeDesignSafeProject to reduce complexity when using the hook in components?
  • follow on suggestion: could this be renamed to something like useProjectsWithDesignSafeInformation 🤔
  • there is an issue currently where ProjectListing component is rendering table even though data isn't completely loaded and processed (will move to slack to discuss).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! That was exactly what I was going for but couldn't get right. Appreciate the feedback and have updated the PR.

Copy link
Collaborator

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sophia-massie sophia-massie merged commit 0fc9690 into main Oct 3, 2024
5 checks passed
@sophia-massie sophia-massie deleted the task/wg-76-project-listing-query branch October 3, 2024 20:10
nathanfranklin added a commit that referenced this pull request Oct 18, 2024
* Update config files

* task/wg-76-project-listing-query (#265)

* task/wg-76-project-listing-query

* Address linting errors

* - Combines DesignSafe and Hazmapper project get
requests into one hook

* - Linting

* Add local version of QueryNavItem to illustrate issue

* Use @tacc/core-components version 0.0.3-beta.0

* Fix prettier issues

* Update package lock

* Update package-lock.json again

* hotfix: simplify imports in react app (#260)

* Simplify imports in react app

* Fix linting

* Revert changes to core-wrappers

* Add maping to jest

* Fix linting

* Fix pretty issues

* Remove unused imports from mistake in conflict resolution

* Update as core-components is now installed from package

---------

Co-authored-by: sophia-massie <96220951+sophia-massie@users.noreply.github.com>
nathanfranklin added a commit that referenced this pull request Oct 21, 2024
* feat: tup-700 replace core-components + /wrappers

* fix: FieldWrapperFormik not found

Problem was forgetting to build core-components before packing.

* fix: FieldWrapper… fields crashed form

Problem was… core-components not coded/tested for external usage.

Fixes in TACC/tup-ui:
TACC/tup-ui@cb73d54
TACC/tup-ui@836f372

* chore: save latest core-components hash

* Feat/tup 700 core components node pkg  use pkg  fixes (#272)

* Update config files

* task/wg-76-project-listing-query (#265)

* task/wg-76-project-listing-query

* Address linting errors

* - Combines DesignSafe and Hazmapper project get
requests into one hook

* - Linting

* Add local version of QueryNavItem to illustrate issue

* Use @tacc/core-components version 0.0.3-beta.0

* Fix prettier issues

* Update package lock

* Update package-lock.json again

* hotfix: simplify imports in react app (#260)

* Simplify imports in react app

* Fix linting

* Revert changes to core-wrappers

* Add maping to jest

* Fix linting

* Fix pretty issues

* Remove unused imports from mistake in conflict resolution

* Update as core-components is now installed from package

---------

Co-authored-by: sophia-massie <96220951+sophia-massie@users.noreply.github.com>

* Bump package-lock.json

* Remove local QueryNavItem

---------

Co-authored-by: Nathan Franklin <nathan.franklin@gmail.com>
Co-authored-by: sophia-massie <96220951+sophia-massie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants