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

Front end for editing species #170

Merged
merged 26 commits into from
Mar 26, 2021
Merged

Front end for editing species #170

merged 26 commits into from
Mar 26, 2021

Conversation

anissa-agahchen
Copy link
Contributor

@anissa-agahchen anissa-agahchen commented Mar 26, 2021

Overview

This PR contains the following changes

Front -end for editing the Species Component

General

  • I have performed a self-review of my own code

Code

  • New files/classes/functions have appropriately descriptive names and comment blocks to describe their use/behaviour
  • I have avoided duplicating code when possible, moving re-usable pieces into functions
  • I have avoided hard-coding values where possible and moved any re-usable constants to a constants file
  • My code is as flat as possible (avoids deeply nested if/else blocks, promise chains, etc)
  • My code changes account for null/undefined values and handle errors appropriately
  • My code uses types/interfaces to help describe values/parameters/etc, help ensure type safety, and improve readability

Style

  • My code follows the established style conventions
  • My code uses native material-ui components/icons/conventions when possible

Documentation

  • I have commented my code sufficiently, such that an unfamiliar developer could understand my code
  • I have added/updated README's and related documentation, as needed

Tests

  • I have added/updated unit tests for any code I've added/updated
  • I have added/updated the Postman requests/tests to account for any API endpoints I've added/updated

Linting/Formatting

  • I have run the linter and fixed any issues, as needed
    See the lint commands in package.json
  • I have run the formatter and fixed any issues, as needed
    See the format commands in package.json

SonarCloud

  • I have addressed all SonarCloud Bugs, Vulnerabilities, Security Hotspots, and Code Smells

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Screenshots

Please add any relevant UI screenshots, if applicable.

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #170 (c6150b2) into dev (8369eee) will increase coverage by 0.61%.
The diff coverage is 65.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #170      +/-   ##
==========================================
+ Coverage   47.97%   48.59%   +0.61%     
==========================================
  Files         115      115              
  Lines        2414     2447      +33     
  Branches      556      562       +6     
==========================================
+ Hits         1158     1189      +31     
- Misses       1155     1157       +2     
  Partials      101      101              
Impacted Files Coverage Δ
api/src/models/project-view.ts 62.96% <ø> (-1.45%) ⬇️
api/src/paths/project/{projectId}/update.ts 0.00% <0.00%> (ø)
api/src/paths/project/{projectId}/view.ts 0.00% <ø> (ø)
api/src/queries/project/project-view-queries.ts 100.00% <ø> (ø)
...ents/fields/MultiAutocompleteFieldVariableSize.tsx 33.33% <0.00%> (ø)
...es/projects/components/ProjectPartnershipsForm.tsx 100.00% <ø> (ø)
app/src/features/projects/view/ProjectDetails.tsx 100.00% <ø> (ø)
app/src/types/yup.d.ts 0.00% <ø> (ø)
.../src/features/projects/view/components/Species.tsx 86.11% <81.48%> (-13.89%) ⬇️
api/src/models/project-view-update.ts 85.71% <85.71%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8369eee...c6150b2. Read the comment docs.

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@anissa-agahchen anissa-agahchen marked this pull request as ready for review March 26, 2021 03:20
@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

Copy link
Contributor

@sdevalapurkar sdevalapurkar left a comment

Choose a reason for hiding this comment

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

need to do something like this:

const handleDialogEditOpen = async () => {
    let speciesResponseData;

    try {
      const response = await biohubApi.project.getProjectForUpdate(id, [UPDATE_GET_ENTITIES.species]);

      if (!response?.species) {
        showErrorDialog({ open: true });
        return;
      }

      speciesResponseData = response.species;
    } catch (error) {
      const apiError = new APIError(error);
      showErrorDialog({ dialogText: apiError.message, open: true });
      return;
    }

    setSpeciesForUpdate(speciesResponseData );

    setOpenEditDialog(true);
  };

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@anissa-agahchen anissa-agahchen changed the title Editspecies fe Front end for editing species Mar 26, 2021
@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

2 similar comments
@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

sdevalapurkar
sdevalapurkar previously approved these changes Mar 26, 2021
@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: editspeciesFE

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.2% 0.2% Duplication

@sdevalapurkar sdevalapurkar merged commit 023768c into dev Mar 26, 2021
@sdevalapurkar sdevalapurkar deleted the editspeciesFE branch March 26, 2021 19:25
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