-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5468 from owncloud/feedback-link
Feedback link
- Loading branch information
Showing
11 changed files
with
94 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Enhancement: Feedback link | ||
|
||
We've added a feedback link in the topbar which opens a survey in a new tab. The intention is to gather feedback from users. There is a config option to disable the link (see docs "getting started"). | ||
|
||
https://github.com/owncloud/web/pull/5468 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div> | ||
<oc-button | ||
v-oc-tooltip="description" | ||
type="a" | ||
:href="href" | ||
target="_blank" | ||
appearance="raw" | ||
:aria-label="ariaLabel" | ||
aria-describedby="oc-feedback-link-description" | ||
> | ||
<oc-icon name="feedback" /> | ||
</oc-button> | ||
<p id="oc-feedback-link-description" class="oc-invisible-sr" v-text="description" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'FeedbackLink', | ||
computed: { | ||
href() { | ||
return 'https://owncloud.com/web-design-feedback' | ||
}, | ||
ariaLabel() { | ||
return this.$gettext('ownCloud feedback survey') | ||
}, | ||
description() { | ||
return this.$gettext( | ||
"Provide your feedback: We'd like to improve the web design and would be happy to hear your feedback. Thank you! Your ownCloud team." | ||
) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/web-runtime/tests/unit/components/FeedbackLink.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import FeedbackLink from '../../../src/components/FeedbackLink' | ||
import { createLocalVue, mount } from '@vue/test-utils' | ||
import { axe, toHaveNoViolations } from 'jest-axe' | ||
import DesignSystem from 'owncloud-design-system' | ||
const localVue = createLocalVue() | ||
localVue.use(DesignSystem) | ||
const OcTooltip = jest.fn() | ||
expect.extend(toHaveNoViolations) | ||
|
||
describe('FeedbackLink component', () => { | ||
it('has no accessibility violations', async () => { | ||
const wrapper = mount(FeedbackLink, { | ||
localVue, | ||
directives: { | ||
OcTooltip | ||
} | ||
}) | ||
|
||
expect( | ||
await axe(wrapper.html(), { | ||
rules: { | ||
region: { enabled: false } | ||
} | ||
}) | ||
).toHaveNoViolations() | ||
expect(wrapper).toMatchSnapshot() | ||
}) | ||
}) |
7 changes: 7 additions & 0 deletions
7
packages/web-runtime/tests/unit/components/__snapshots__/FeedbackLink.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`FeedbackLink component has no accessibility violations 1`] = ` | ||
<div><a aria-label="ownCloud feedback survey" href="https://owncloud.com/web-design-feedback" class="oc-button oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw" target="_blank" aria-describedby="oc-feedback-link-description"><span class="oc-icon oc-icon-m oc-icon-passive"><svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"> <path xmlns="http://www.w3.org/2000/svg" d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"></path> </svg></span></a> | ||
<p id="oc-feedback-link-description" class="oc-invisible-sr">Provide your feedback: We'd like to improve the web design and would be happy to hear your feedback. Thank you! Your ownCloud team.</p> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8150,10 +8150,10 @@ [email protected]: | |
dependencies: | ||
glob "^7.1.3" | ||
|
||
owncloud-design-system@^8.0.0-rc2: | ||
version "8.0.0-rc2" | ||
resolved "https://registry.yarnpkg.com/owncloud-design-system/-/owncloud-design-system-8.0.0-rc2.tgz#e82f948ead4f9f6258cb6bf49556da4a2aa6503b" | ||
integrity sha512-HJlI+UMN/F5cqU2KKeh0RqiLj6RLwB41xoTERUzet7hT48tDRRwBDsdXhjx4p1uqyasm2Gq1Kwqg/xe+rdJ+hg== | ||
owncloud-design-system@^8.0.0-rc3: | ||
version "8.0.0-rc3" | ||
resolved "https://registry.yarnpkg.com/owncloud-design-system/-/owncloud-design-system-8.0.0-rc3.tgz#3c471411e8b96a335f75707a6b4bf904b270015c" | ||
integrity sha512-cWUNiL0fFbusxmbP24RN9MAri8Zcx4Hc/BQP3ZDaZ3dc482Qvmde22M7cqyD63s1uV7sLdaad8MAu0FZAXVdqQ== | ||
|
||
[email protected]: | ||
version "1.0.0-2296" | ||
|