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

Expose handler to allow CSS selectors #1281

Merged
merged 1 commit into from Jul 20, 2022

Conversation

luka-nextcloud
Copy link
Contributor

@skjnldsv skjnldsv added bug Something isn't working 2. developing Work in progress labels Jul 7, 2022
Copy link
Member

@skjnldsv skjnldsv left a 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?

@luka-nextcloud
Copy link
Contributor Author

@skjnldsv Please check discussions on this PR:
https://github.com/nextcloud/text/pull/2441/files

@skjnldsv
Copy link
Member

skjnldsv commented Jul 7, 2022

@skjnldsv Please check discussions on this PR: nextcloud/text#2441 (files)

I should have been mentioned in the other thread 🤷
Replied there :)

@@ -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,
Copy link
Member

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 :)

'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}`]"
Copy link
Member

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

Copy link
Member

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.

Copy link
Member

@jancborchardt jancborchardt left a 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! :)

@juliushaertl juliushaertl changed the title Improve header bar Expose handler to allow CSS selectors Jul 19, 2022
@juliushaertl
Copy link
Member

/compile amend /

Signed-off-by: Luka Trovic <luka@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants