Hide private links based on capabilities, refactor spans in sidebar t… - #5034
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. |
| v-if="$_editButtonVisible" | ||
| :aria-label="$gettext('Edit share')" | ||
| :uk-tooltip="$gettext('Edit share')" | ||
| :aria-label="$gettext(`Edit share with ${ collaborator.collaborator.displayName }`)" |
There was a problem hiding this comment.
Unfortunately doesn't work like this. For inserting a variable into a translation, you need to use gettextInterpolate. And that's a 2-step-process. Translating the string (having a placeholder in the string) and then injecting the value into the translated string, which replaces the placeholder. See docs: https://github.com/Polyconseil/vue-gettext#interpolation-support-1 - I'd recommend to do this in a computed property.
There was a problem hiding this comment.
Yeah I recall seeing this somewhere in the codebase, will push an update later today! Thanks ;)
|
|
||
| computed: { | ||
| ...mapGetters('Files', ['highlightedFile']), | ||
| ...mapGetters('Files', ['highlightedFile'], ['capabilities']), |
There was a problem hiding this comment.
mapGetters expects two params: the namespace (can be omitted for root level) and one array or object. Please merge the two getter names into one array. ;-)
1b3d4b9 to
702ea81
Compare
| v-if="loading" | ||
| key="avatar-loading" | ||
| :aria-label="$gettext('Loading')" | ||
| :aria-label="$gettext('Loading user avatar')" |
There was a problem hiding this comment.
you can remove the aria-label entirely since the wrapper is aria-hidden
702ea81 to
07ce4b9
Compare
07ce4b9 to
03bec6f
Compare
| - Gave `role="presentation" to the collaborator avatar | ||
| - Refactored `<span>` and `<div>` tags into `<p>` tags and unified translations a bit | ||
| - Enhanced hints in the collaborator quick action buttons with collaborator name | ||
| - Hide private links if the capability is not enabled |
There was a problem hiding this comment.
IMO this is worth its own bugfix changelog
03bec6f to
319c7dd
Compare
Description
This is a WIP PR, I'll push some more changes and add a changelog item later. Feel free to contribute suitable changes!