-
Notifications
You must be signed in to change notification settings - Fork 48
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
Conversation
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>
There was a problem hiding this 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!
services/tenant-ui/frontend/src/components/common/LoadingLabel.vue
Outdated
Show resolved
Hide resolved
Signed-off-by: jamshale <jamiehalebc@gmail.com>
There was a problem hiding this 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.
Should be updated now. |
Thank you, merging to main. |
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.