Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Implemented event listener for when the link input is blurred in the file drop component. #122

Merged
merged 4 commits into from
Jun 8, 2020

Conversation

Blackbaud-TrevorBurch
Copy link
Member

#104

@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #122 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #122   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           29        29           
  Lines          944       951    +7     
  Branches       127       127           
=========================================
+ Hits           944       951    +7     
Impacted Files Coverage Δ
...lic/modules/file-attachment/file-drop.component.ts 100.00% <100.00%> (ø)

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 8078bfc...7d16ece. Read the comment docs.

@blackbaud-ado
Copy link
Member

Copy link
Contributor

@Blackbaud-AlexKingman Blackbaud-AlexKingman left a comment

Choose a reason for hiding this comment

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

Just a couple small comments. Also a question - the original issue was to tell if the form is dirty. This only provides a blur event. They can, of course, check the values to see if the form is truly dirty once the blur event happens. Did we check with the consumer to make sure this is what they expect? (I know this particular component is a little different than our normal form controls, so I'm assuming there's an exception here)

@Blackbaud-TrevorBurch
Copy link
Member Author

@Blackbaud-AlexKingman due to the fact that the items and uploads are handled in two different components it is not possible to make this a control value accessor and thus have this component update the form's states directly. The issue that consumer was having was that due to us having the access to the link input they could not tell whether or not they should mark their outer form dirty.

Our initial stab at this issue was to add that wrapping component that would be able to be a control value accessor and would handle all the form stuff for the consumer but because of design restrictions with the metadata on the item components that was not possible to do.

This change gives the consumer the ability to know when a user has touched the input field and thus will allow them to handle their forms dirty state directly. If there was a way that we could do it for them that would be great but unfortunately it isn't possible with how this component is currently designed and constructed.

@blackbaud-ado
Copy link
Member

@blackbaud-ado
Copy link
Member

@blackbaud-ado
Copy link
Member

@Blackbaud-TrevorBurch Blackbaud-TrevorBurch merged commit d901ee9 into master Jun 8, 2020
@Blackbaud-TrevorBurch Blackbaud-TrevorBurch deleted the link-input-blur-event branch June 8, 2020 17:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants