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

Add status badge template option to OcResourceIcon #9568

Merged
merged 16 commits into from
Aug 16, 2023

Conversation

lookacat
Copy link
Contributor

@lookacat lookacat commented Aug 10, 2023

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:
Screenshot (51)

Light mode:
Screenshot (55)

Example with loading spinner:
Screenshot (52)

Tiles view:
Screenshot (53)

Condensed table:
Screenshot (54)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Aug 10, 2023

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.

@lookacat lookacat changed the title WIP: Add status badge to OcResourceIcon Add status badge template option to OcResourceIcon Aug 10, 2023
@lookacat lookacat marked this pull request as ready for review August 11, 2023 08:02
@@ -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 {
Copy link
Contributor Author

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)

@@ -51,6 +51,7 @@ export interface Resource {
thumbnail?: string
status?: number
processing?: boolean
locked?: boolean
Copy link
Contributor Author

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

@lookacat lookacat enabled auto-merge (squash) August 14, 2023 12:17
Copy link
Collaborator

@JammingBen JammingBen left a 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 🙂

Copy link
Contributor

@AlexAndBear AlexAndBear left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Aug 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lookacat lookacat merged commit 5d4649d into master Aug 16, 2023
4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the oc-resource-icon-status-badge branch August 16, 2023 10:14
AlexAndBear pushed a commit that referenced this pull request Dec 13, 2023
* 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
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.

None yet

3 participants