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

576 - Create and use loading label component and refactor #709

Merged
merged 9 commits into from
Jul 18, 2023

Conversation

jamshale
Copy link
Collaborator

@jamshale jamshale commented Jul 14, 2023

This is addressing issue 576 in the backlog. Thought I would pick up a smaller task for some practice.

Added a component that shows a spinner when a label is waiting to become defined. I'm not sure this would be visible very often because it would need to have the other stores loaded but not contacts. But anyway I think it looks decent and the component might be useful elsewhere.

I forced the contacts to delay loading for 3 seconds to see the effect.

Traction.Tenant.Console.webm

I refactored some code because the findByConnectionName function in the contacts store was only needed. Made it so if the contacts are loading findByConnectionName returns undefined type and if it can't find a match it returns a blank string (Maybe should should say not found or something other than blank ? Could be null but then would render blank anyway)

Wrote some tests and some mocks. Found a couple annoying things and added gotchas in the readme and some comments.

I like to use VS code organize imports and sort lines so some imports go mix around.

Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Copy link
Collaborator

@loneil loneil left a comment

Choose a reason for hiding this comment

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

Other than comment about prop default/format it looks good to me, solution is pretty much what I had in mind for this. Tested locally (faked delay to see spinners).
Likely won't ever see these spinners much in real operations 😄 but it's a good thing to have if the connections ever load slowly (or slower than the main tables' datas)

Thanks again!

Signed-off-by: jamshale <jamiehalebc@gmail.com>
@loneil loneil self-requested a review July 18, 2023 21:58
Copy link
Collaborator

@loneil loneil left a comment

Choose a reason for hiding this comment

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

Looks all good and I've tested out locally.
@jamshale can you just update the branch and then we will merge it.

@jamshale
Copy link
Collaborator Author

Looks all good and I've tested out locally. @jamshale can you just update the branch and then we will merge it.

Should be updated now.

@loneil loneil merged commit 31d7592 into bcgov:main Jul 18, 2023
15 of 21 checks passed
@loneil
Copy link
Collaborator

loneil commented Jul 18, 2023

Looks all good and I've tested out locally. @jamshale can you just update the branch and then we will merge it.

Should be updated now.

Thank you, merging to main.

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.

2 participants