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

Hide private links based on capabilities, refactor spans in sidebar t… #5034

Merged
merged 3 commits into from
Apr 28, 2021

Conversation

pascalwengerter
Copy link
Contributor

Description

This is a WIP PR, I'll push some more changes and add a changelog item later. Feel free to contribute suitable changes!

@update-docs
Copy link

update-docs bot commented Apr 27, 2021

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.

@pascalwengerter pascalwengerter requested a review from kulmann April 27, 2021 15:50
@@ -140,8 +141,8 @@
<div class="uk-flex uk-flex-nowrap uk-flex-middle">
<oc-button
v-if="$_editButtonVisible"
:aria-label="$gettext('Edit share')"
:uk-tooltip="$gettext('Edit share')"
:aria-label="$gettext(`Edit share with ${ collaborator.collaborator.displayName }`)"
Copy link
Member

@kulmann kulmann Apr 28, 2021

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I recall seeing this somewhere in the codebase, will push an update later today! Thanks ;)

Copy link
Member

Choose a reason for hiding this comment

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

👍

@@ -39,7 +37,7 @@ export default {
}),

computed: {
...mapGetters('Files', ['highlightedFile']),
...mapGetters('Files', ['highlightedFile'], ['capabilities']),
Copy link
Member

Choose a reason for hiding this comment

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

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. ;-)

@pascalwengerter pascalwengerter force-pushed the 27042021_improve-files-sidebar branch 2 times, most recently from 1b3d4b9 to 702ea81 Compare April 28, 2021 11:45
<oc-spinner
v-if="loading"
key="avatar-loading"
:aria-label="$gettext('Loading')"
:aria-label="$gettext('Loading user avatar')"
Copy link
Member

Choose a reason for hiding this comment

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

you can remove the aria-label entirely since the wrapper is aria-hidden

@pascalwengerter pascalwengerter force-pushed the 27042021_improve-files-sidebar branch from 702ea81 to 07ce4b9 Compare April 28, 2021 12:15
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

LGTM 🥇

@pascalwengerter pascalwengerter force-pushed the 27042021_improve-files-sidebar branch from 07ce4b9 to 03bec6f Compare April 28, 2021 12:23
- 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
Copy link
Member

Choose a reason for hiding this comment

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

IMO this is worth its own bugfix changelog

@pascalwengerter pascalwengerter force-pushed the 27042021_improve-files-sidebar branch from 03bec6f to 319c7dd Compare April 28, 2021 15:49
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

LGTM (again) 👍

@pascalwengerter pascalwengerter merged commit 4dc1371 into a11y-swarming Apr 28, 2021
@delete-merged-branch delete-merged-branch bot deleted the 27042021_improve-files-sidebar branch April 28, 2021 16:07
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.

2 participants