-
Notifications
You must be signed in to change notification settings - Fork 17
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
[OP#41124] Display loading icon while fetching workpackages #55
Conversation
427d131
to
2cd0787
Compare
src/components/tab/SearchInput.vue
Outdated
<template #noResult> | ||
{{ noResultMessages }} | ||
</template> |
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.
@eneiluj The messages in this slot are not being displayed in the UI. The default one No result
is displayed but if I define a custom message it's not displayed. Am I doing something wrong or that slot can't be used?
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.
the #noResult
slot is actually from vue-multiselect
library and is already implemented inside the Multiselect.vue
so I think, we cannot further use it as a slot here.
src/components/tab/SearchInput.vue
Outdated
@@ -177,10 +191,11 @@ export default { | |||
async getWorkPackageColorAttributes(path, id) { |
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.
this whole function seems not to be covered well with tests, maybe this PR is a good option to add more
2cd0787
to
5b819af
Compare
5b819af
to
35c59ee
Compare
55e8728
to
6b27735
Compare
data: { | ||
color: 'red', | ||
}, |
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.
data
is also redundant here imo
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.
it gives me the error TypeError: Cannot read property 'color' of undefined
, if I don't define data
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.
can be done in an other PR, but I would suggest to improve getWorkPackageColorAttributes
it checks if (response.status === 200) {
and the assumes that the response has a color attribute, but what if not?
Should be something like if (response.status === 200 && response.data.color !== undefined) {
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
b7f03f2
to
28a2ad5
Compare
PHP Code CoverageCoverage after merging loading-icon into master will be
Coverage Report
|
part of OP#41124: This PR adds a loading icon when fetching work packages
It looks something like this:
![loading](https://user-images.githubusercontent.com/41103328/154950930-69e09f9e-b72a-4eaf-b34c-e761b7493e7a.png)