-
Notifications
You must be signed in to change notification settings - Fork 54
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
Expose handler to allow CSS selectors #1281
Conversation
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.
I'm getting uncomfortable having text changes merged in viewer thinking
Why can't this be done in Text?
@skjnldsv Please check discussions on this PR: |
I should have been mentioned in the other thread 🤷 |
e63d45d
to
85b42ca
Compare
src/views/Viewer.vue
Outdated
@@ -25,8 +25,9 @@ | |||
<Modal v-if="initiated || currentFile.modal" | |||
id="viewer" | |||
size="full" | |||
:class="{'icon-loading': !currentFile.loaded && !currentFile.failed, | |||
'theme--undefined': theme === null, 'theme--dark': theme === 'dark', 'theme--light': theme === 'light', 'theme--default': theme === 'default'}" | |||
:class="[{'icon-loading': !currentFile.loaded && !currentFile.failed, |
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.
Make we can move this to a computed property to make it more readable :)
src/views/Viewer.vue
Outdated
'theme--undefined': theme === null, 'theme--dark': theme === 'dark', 'theme--light': theme === 'light', 'theme--default': theme === 'default'}" | ||
:class="[{'icon-loading': !currentFile.loaded && !currentFile.failed, | ||
'theme--undefined': theme === null, 'theme--dark': theme === 'dark', | ||
'theme--light': theme === 'light', 'theme--default': theme === 'default'}, `app-${handlerId}`]" |
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.
I'd prefer to set a data attribute like :data-handler="handlerId"
as the handler id might also contain characters that are not supported in css selector classes
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.
I agree, it will be more future-proof and prevents CSS conflicts.
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.
Looks great design-wise! :)
85b42ca
to
e4062b2
Compare
/compile amend / |
Signed-off-by: Luka Trovic <luka@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
e4062b2
to
f52dc17
Compare
nextcloud/text#2440