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

Feat/449 step 2 validation fe #674

Merged
merged 39 commits into from
Nov 29, 2023
Merged

Feat/449 step 2 validation fe #674

merged 39 commits into from
Nov 29, 2023

Conversation

mgaseta
Copy link
Collaborator

@mgaseta mgaseta commented Nov 22, 2023

Description

Closes #449, #686, #687, #688, #689

Changelog

New

  • Added correct validation for the ownership step
  • Made the progress bar responsive to the ownership changes
  • Updated style to make compliant with the new design
    Screenshot from 2023-11-22 11-55-55

Changed

  • Fixed the annoying misalignment between location code and agency fields
  • Changed the applicant fields component to use states, it solved some bugs regarding data sync
  • Fixed a bug on the applicant fields component that happened when editing the agency and not editing the location code
  • Corrected the style of applicant fields inputs on read-only mode

Removed

  • Some old validation processes
  • Unused styles
  • No longer used utils functions

How was this tested?

  • 🧠 Not needed
  • 👀 Eyeball
  • 🤖 Added tests

I maybe became biased when testing this feature, so please test it widely when reviewing it :)

Extra Comments

  • Just a small note for the design, this new small select box cut off some text of the options, shown in the images below, should we change it? @SLDonnelly @mmarsoleta
    Screenshot from 2023-11-22 15-51-34
    Screenshot from 2023-11-22 15-51-49

What gif/image best describes this PR or how it makes you feel?


Thanks for the PR!

Any successful deployments (not always required) will be available below.
Backend
Frontend
Oracle-API

Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow


Thanks for the PR!

Any successful deployments (not always required) will be available below.
Backend
Frontend
Oracle-API

Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow

mgaseta and others added 29 commits November 2, 2023 11:01
…from-main' of github.com:bcgov/nr-spar into feat/588-modularize-client-selection-and-location-code-from-main
@mgaseta mgaseta added the front-end front-end related task label Nov 22, 2023
@mgaseta
Copy link
Collaborator Author

mgaseta commented Nov 22, 2023

@mgaseta , I don't see how we could fix the text truncation inside the dropdown menu, other than changing the field width again or removing the agency number (but then, the text would probably truncate again for small screen sizes).

So for me one solution that we could use for now could be showing a tooltip on hover to show the full text to users. Ref: Truncation - Carbon DS

image (Print from storybook)

This is already implemented:
image

So can we leave like that for the time being or should we try @craigyu 's suggestion?
(Seems like we replied almost at the same time, so I got my answer already, thanks!)

@mgaseta
Copy link
Collaborator Author

mgaseta commented Nov 22, 2023

Before pushing to the branch, this is the result:

Screenshot from 2023-11-22 17-39-22

Should we go with it? @mmarsoleta @craigyu @SLDonnelly

Also, we still have the problem for the selected value:
Screenshot from 2023-11-22 15-51-34

@mmarsoleta
Copy link

Before pushing to the branch, this is the result:

Screenshot from 2023-11-22 17-39-22

Should we go with it? @mmarsoleta @craigyu @SLDonnelly

Also, we still have the problem for the selected value: Screenshot from 2023-11-22 15-51-34

Yeah, it seems fine! Thank you for developing it.
We would still need the tooltip for the selected value and for smaller screens, but we could go with using 2 rows and then truncate the text if it's still too long.

Thank you @mgaseta , Thank you @craigyu

@craigyu
Copy link
Collaborator

craigyu commented Nov 22, 2023

two rows looks a lot more pleasant to me 😬

@mgaseta mgaseta mentioned this pull request Nov 23, 2023
2 tasks
Copy link
Collaborator

@craigyu craigyu left a comment

Choose a reason for hiding this comment

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

Everything looks good except for the behaviour of the client combo box

Current

When clicking into the combo box, options aren't displayed to users in a drop down. To view the options users have to click on the down arrow button.
image

Desired

The current version on main displays a drop down when users click into it
image

ALMOST over

@mgaseta
Copy link
Collaborator Author

mgaseta commented Nov 24, 2023

Thanks for flagging that @craigyu! Fixed here: 9fd9c9b

@mgaseta mgaseta requested a review from craigyu November 24, 2023 17:22
Copy link
Collaborator

@craigyu craigyu left a comment

Choose a reason for hiding this comment

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

ok the combobox work now!
but I found another small UI issue with the input 😬:

The inputs here get fused together when the screen narrows:
image

A solution is removing the min-inline-size property for the number input:

Screenshot 2023-11-24 at 9 34 40 AM

@mgaseta
Copy link
Collaborator Author

mgaseta commented Nov 24, 2023

@craigyu Nice catch! Fixed here: 1e8a921

@mgaseta mgaseta requested a review from craigyu November 24, 2023 18:57
Copy link
Contributor

@RMCampos RMCampos left a comment

Choose a reason for hiding this comment

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

Just one questions regarding prefix. Great job! 😎

frontend/src/components/ApplicantAgencyFields/styles.scss Outdated Show resolved Hide resolved
Copy link
Collaborator

@craigyu craigyu left a comment

Choose a reason for hiding this comment

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

@mgaseta mgaseta requested a review from RMCampos November 27, 2023 18:51
@craigyu craigyu merged commit 949a1b4 into main Nov 29, 2023
@craigyu craigyu deleted the feat/449-step-2-validation-fe branch November 29, 2023 00:36
DerekRoberts pushed a commit that referenced this pull request May 13, 2024
* feat: created new component to deal with agency information

* feat: separated commom texts to use on the component

* feat: adjusting texts

* feat: changng type of agency options

* fix: fixing form review component

* fix: adjusting declaration of states

* feat: adjusted types and replaced agency fields

* fix: adjusting onblur event

* feat: changing useEffect of ownership step

* feat: validation for the portion field

* feat: adding new handling functions and other minor fixes

* fix: small fixes

* feat: removing add button from inside accordion

* fix: fixing applicant fields component

* fix: minor adjustments

* feat: update progress bar for ownership step

* fix: adjusting multioptobj fields validation

* feat: adjusting style of applicant field

* feat: adjusting ownership style

* fix: fixed location input when creating a new owner

* fix: removing unused functions

* fix: fixing form review

* fix: removing unused entry of the mock server

* fix: fixing options size

* fix: removing onclick function

* fix: fixing style for small screens

* fix: adjusting class name on scss
DerekRoberts pushed a commit that referenced this pull request May 14, 2024
* feat: created new component to deal with agency information

* feat: separated commom texts to use on the component

* feat: adjusting texts

* feat: changng type of agency options

* fix: fixing form review component

* fix: adjusting declaration of states

* feat: adjusted types and replaced agency fields

* fix: adjusting onblur event

* feat: changing useEffect of ownership step

* feat: validation for the portion field

* feat: adding new handling functions and other minor fixes

* fix: small fixes

* feat: removing add button from inside accordion

* fix: fixing applicant fields component

* fix: minor adjustments

* feat: update progress bar for ownership step

* fix: adjusting multioptobj fields validation

* feat: adjusting style of applicant field

* feat: adjusting ownership style

* fix: fixed location input when creating a new owner

* fix: removing unused functions

* fix: fixing form review

* fix: removing unused entry of the mock server

* fix: fixing options size

* fix: removing onclick function

* fix: fixing style for small screens

* fix: adjusting class name on scss
DerekRoberts pushed a commit that referenced this pull request May 14, 2024
* feat: created new component to deal with agency information

* feat: separated commom texts to use on the component

* feat: adjusting texts

* feat: changng type of agency options

* fix: fixing form review component

* fix: adjusting declaration of states

* feat: adjusted types and replaced agency fields

* fix: adjusting onblur event

* feat: changing useEffect of ownership step

* feat: validation for the portion field

* feat: adding new handling functions and other minor fixes

* fix: small fixes

* feat: removing add button from inside accordion

* fix: fixing applicant fields component

* fix: minor adjustments

* feat: update progress bar for ownership step

* fix: adjusting multioptobj fields validation

* feat: adjusting style of applicant field

* feat: adjusting ownership style

* fix: fixed location input when creating a new owner

* fix: removing unused functions

* fix: fixing form review

* fix: removing unused entry of the mock server

* fix: fixing options size

* fix: removing onclick function

* fix: fixing style for small screens

* fix: adjusting class name on scss
DerekRoberts pushed a commit that referenced this pull request May 14, 2024
* feat: created new component to deal with agency information

* feat: separated commom texts to use on the component

* feat: adjusting texts

* feat: changng type of agency options

* fix: fixing form review component

* fix: adjusting declaration of states

* feat: adjusted types and replaced agency fields

* fix: adjusting onblur event

* feat: changing useEffect of ownership step

* feat: validation for the portion field

* feat: adding new handling functions and other minor fixes

* fix: small fixes

* feat: removing add button from inside accordion

* fix: fixing applicant fields component

* fix: minor adjustments

* feat: update progress bar for ownership step

* fix: adjusting multioptobj fields validation

* feat: adjusting style of applicant field

* feat: adjusting ownership style

* fix: fixed location input when creating a new owner

* fix: removing unused functions

* fix: fixing form review

* fix: removing unused entry of the mock server

* fix: fixing options size

* fix: removing onclick function

* fix: fixing style for small screens

* fix: adjusting class name on scss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end front-end related task
Projects
None yet
4 participants