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

BHBC-866: Date improvements #134

Merged
merged 3 commits into from
Mar 17, 2021
Merged

BHBC-866: Date improvements #134

merged 3 commits into from
Mar 17, 2021

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Mar 17, 2021

Overview

Links to jira tickets

https://quartech.atlassian.net/browse/BHBC-866

Deployed app: https://biohubbc-app-134-af2668-dev.apps.silver.devops.gov.bc.ca/projects

This PR contains the following changes

Improvements to date pickers.
In chrome the year should be limited to 4 digits, firefox it still allows 6.
Added better validation so now it will error if the date is invalid (ie: if you enter 6 digits for the year in firefox)
Includes an initial pass at some re-usable yup schemas.

Added a handful of max string length checks, so we should get less errors when people enter long project names, etc.

This PR contains the following types of changes

  • New feature (change which adds functionality)
  • Enhancement (improvements to existing functionality)
  • Bug fix (change which fixes an issue)
  • Misc cleanup / Refactoring / Documentation
  • Version change

Checklist

A list of items that are good to consider when making any changes.

Note: this list is not exhaustive, and not all items are always applicable.

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

Knock Knock! 🔍

Just thought I'd let you know that your PR title and story title look quite different. PR titles that closely resemble the story title make it easier for reviewers to understand the context of the PR.

An easy-to-understand PR title a day makes the reviewer review away! 😛⚡️
Story Title Implement General Information section for "Create Project" form - second pass
PR Title BHBC-866: Date improvements

Check out this guide to learn more about PR best-practices.

@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #134 (c622bc9) into dev (54d22e1) will increase coverage by 0.04%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #134      +/-   ##
==========================================
+ Coverage   42.16%   42.21%   +0.04%     
==========================================
  Files          93       94       +1     
  Lines        1909     1921      +12     
  Branches      428      429       +1     
==========================================
+ Hits          805      811       +6     
- Misses       1030     1036       +6     
  Partials       74       74              
Impacted Files Coverage Δ
...res/projects/components/ProjectCoordinatorForm.tsx 100.00% <ø> (ø)
...eatures/projects/components/ProjectDetailsForm.tsx 63.63% <ø> (+5.30%) ⬆️
...res/projects/components/ProjectFundingItemForm.tsx 35.71% <ø> (+1.23%) ⬆️
...atures/projects/components/ProjectLocationForm.tsx 92.30% <ø> (ø)
...ures/projects/components/ProjectObjectivesForm.tsx 75.00% <ø> (ø)
...features/projects/components/ProjectPermitForm.tsx 81.25% <ø> (ø)
app/src/utils/YupValidations.ts 42.85% <42.85%> (ø)

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 54d22e1...c622bc9. Read the comment docs.

@github-actions
Copy link

💔 The detected issue is not in one of the allowed statuses 💔

Detected Status Peer Review
Allowed Statuses In Progress ✔️

Please ensure your jira story is in one of the allowed statuses

@github-actions
Copy link

💔 The detected issue is not in one of the allowed statuses 💔

Detected Status Peer Review
Allowed Statuses In Progress ✔️

Please ensure your jira story is in one of the allowed statuses

@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
2.6% 2.6% Duplication

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.

Awesome :)

@sdevalapurkar sdevalapurkar merged commit a74d15f into dev Mar 17, 2021
@sdevalapurkar sdevalapurkar deleted the BHBC-866 branch March 17, 2021 02:35
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