-
Notifications
You must be signed in to change notification settings - Fork 118
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
fix: Make edit mode in interactive widgets opt-in #3619
Conversation
/backport to stable29 |
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.
Code looks good. Added two minor comments.
src/view/Office.vue
Outdated
@@ -83,11 +83,18 @@ | |||
:style="{visibility: showIframe ? 'visible' : 'hidden' }" | |||
:src="iframeSrc" /> | |||
|
|||
<NcButton v-if="isEmbedded && !hasToggledInteractiveEmbedding" class="toggle-interactive" @click="toggleEdit"> | |||
{{ t('text', 'Edit') }} |
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.
{{ t('text', 'Edit') }} | |
{{ t('richdocuments', 'Edit') }} |
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.
🙈
src/view/Office.vue
Outdated
toggleEdit() { | ||
this.hasToggledInteractiveEmbedding = true | ||
}, | ||
|
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.
Minor naming nitpicks:
- This does not really toggle. It only sets to true.
- the names do not match well -
Edit
vs.InteractiveEmbedding
.
How about this?
toggleEdit() { | |
this.hasToggledInteractiveEmbedding = true | |
}, | |
enableEditing() { | |
this.hasEditingEnabled = true | |
}, | |
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.
Good call, used hasWidgetEditingEnabled now to be more explicit about where its used.
Signed-off-by: Julius Härtl <[email protected]>
df7fb7b
to
442213f
Compare
Cypress fails due to the new 24.04 release of Collabora with changed selectors, will address separately |
Fix #3540
A copy of nextcloud/text#5579 in most parts