Commit 2fe5eccf authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Don't show the "only me" icon when annotation is being edited

Do not render the only-me icon while an annotation is being edited, as
the user can switch privacy settings in the editing mode, and those
changes could be at odds with "only me."
parent a8af0247
......@@ -49,7 +49,7 @@ export default function AnnotationHeader({
return (
<header className="annotation-header">
<div className="annotation-header__row">
{annotationIsPrivate && (
{annotationIsPrivate && !isEditing && (
<SvgIcon
className="annotation-header__icon"
name="lock"
......
......@@ -61,6 +61,15 @@ describe('AnnotationHeader', () => {
assert.isTrue(wrapper.find('SvgIcon').filter({ name: 'lock' }).exists());
});
it('should not render an "Only Me" icon if the annotation is being edited', () => {
fakeIsPrivate.returns(true);
const wrapper = createAnnotationHeader({ isEditing: true });
assert.isFalse(wrapper.find('SvgIcon').filter({ name: 'lock' }).exists());
});
it('should not render an "Only Me" icon if the annotation is not private', () => {
fakeIsPrivate.returns(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment