-
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
[full-ci] Use icon from app registered for the file type #9088
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. |
88a2597
to
db01090
Compare
db01090
to
97d53c4
Compare
b57eaef
to
1be55dd
Compare
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.
super nice! two nitpicks for possible improvements (see comments), but already works like a charm. 🚀
packages/design-system/src/components/OcResourceIcon/OcResourceIcon.vue
Outdated
Show resolved
Hide resolved
}, | ||
"accdb": { | ||
"name": "resource-type-file", | ||
"color": "var(--oc-color-text-default)" |
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.
ultra nit pick of the day: you could remove the color
from all icon mappings where the value is "var(--oc-color-text-default)"
since your implementation handles the default color as fallback if no color is defined 😁
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.
I would prefer to handle that in a follow up at some point, when we add more mlmetype handling
Kudos, SonarCloud Quality Gate passed! |
Description
Use app icons as resource icons.
Motivation and Context
Apps can already specify an icon (with filltype and color), but it's not used for resource icons.
If a filetype does not exist in our default mappings, we just show a default file icon although we could (and want to) show the app icon.
How Has This Been Tested?
With my gpx viewer app. See screenshots and the definition in code here:
https://github.com/dschmidt/web-app-gpx-viewer/blob/main/src/index.ts#L12L14
Screenshots (if appropriate):
Notice the file icon which is a green map
Types of changes
Checklist:
Open tasks:
resourceIconColorExtensionMapping.json
andresourceIconExtensionMapping.json
to one file implementingOcResourceIconMapping
Follow up tasks