-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add status badge template option to OcResourceIcon #9568
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
@@ -229,6 +242,32 @@ export default defineComponent({ | |||
max-height: $oc-size-icon-default * 1.5; | |||
width: $oc-size-icon-default * 1.5; | |||
max-width: $oc-size-icon-default * 1.5; | |||
|
|||
&-status-badge { |
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 is because we need a different status badge for preview items (since its not an normal file icon)
packages/design-system/src/components/OcResource/OcResource.vue
Outdated
Show resolved
Hide resolved
@@ -51,6 +51,7 @@ export interface Resource { | |||
thumbnail?: string | |||
status?: number | |||
processing?: boolean | |||
locked?: boolean |
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.
not needed in this PR but i use this property to set the locked status of a file
packages/design-system/src/components/OcResourceIcon/OcResourceIcon.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcResource/OcResource.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcResourceIcon/OcResourceIcon.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcResource/OcResource.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcResourceIcon/OcResourceIcon.vue
Outdated
Show resolved
Hide resolved
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.
LGTM. Unit tests would be nice, but I guess it makes sense to add them with your next PR 🙂
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.
LGTM
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
* Add status badge to OcResourceIcon * Refactor code / add template option / add spinner alignment & color * Cleanup code * Fix thumbnail badge * Implement condensed badge view * Remove dev leftover * fix bug * fix bug * Fix bug * Implement for tiles view * Update snapshots * Move styles out of OcResourceIcon
Description
We've added the option to set an additional status badge to be displayed on the lower right on the OcResourceIcon (e.g. for locking information or loading spinner)
Related Issue
Screenshots (if appropriate):
Example with icon
Dark mode:
Light mode:
Example with loading spinner:
Tiles view:
Condensed table:
Types of changes
Checklist: