Skip to content

Conversation

@luka-nextcloud
Copy link
Contributor

@luka-nextcloud luka-nextcloud commented Sep 17, 2021

Signed-off-by: Luka Trovic [email protected]

Summary

The color of the share and more buttons that appear on the header for office documents is now inverted according to the change of the theme color.

http://prntscr.com/1sld74l

@jancborchardt
Copy link
Member

@luka-nextcloud whenever it’s a pull request which changes something visual, mind adding screenshots for quicker design review? Thank you! :)

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems fine. I'll make a real life test when I'll have deployed Collabora locally 😁.

If we decide to include the icon-collabora in a css file in this app, then the change could be included in this PR.

To keep track of what happened: At the moment, icon-collabora class is defined in this PR: nextcloud/server#28877

@luka-nextcloud luka-nextcloud force-pushed the icon-color-invert-issue-in-bright-theme branch from 7a82fc9 to 8929a8c Compare September 28, 2021 14:44
@luka-nextcloud
Copy link
Contributor Author

@eneiluj All changes are now here :)

@jancborchardt You can find out screenshots:
image
image
image

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. You could put the class in a variable for readability but that's fine like that too.

css/viewer.scss Outdated
}

.icon-collabora {
cursor: pointer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Good design-wise, thank you!

Comment on lines 24 to 30
.icon-collabora {
cursor: pointer;
opacity: 0.6;
&:hover {
opacity: 1;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use tabs instead of spaces 😉

_addHeaderShareButton() {
if ($('header').length) {
const $button = $('<div id="richdocuments-sharing"><a class="icon-shared icon-white"></a></div>')
const isInverted = window.OCA.Theming.inverted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be on the safe side if the theming app is disabled:

Suggested change
const isInverted = window.OCA.Theming.inverted
const isInverted = Boolean(window?.OCA?.Theming?.inverted)

OC.unregisterMenu($('#richdocuments-actions .icon-more'), $('#richdocuments-actions-menu'))
$('#richdocuments-actions').remove()
const actionsContainer = $('<div id="richdocuments-actions"><div class="icon-more icon-white"></div><ul id="richdocuments-actions-menu" class="popovermenu"></ul></div>')
const isInverted = window.OCA.Theming.inverted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small code style comments, otherwise looks good 👍

Signed-off-by: Luka Trovic <[email protected]>
@juliusknorr
Copy link
Member

@luka-nextcloud Quick tip for the pull request description, if you mention the issue number in the description of your pull request it is easier to check the original report and the issue will also be closed automatically once the PR gets merged, e.g. with * Resolves: #680 as i updated the text above.

@juliusknorr juliusknorr merged commit 3804b33 into master Oct 5, 2021
@juliusknorr juliusknorr deleted the icon-color-invert-issue-in-bright-theme branch October 5, 2021 10:35
@juliusknorr juliusknorr mentioned this pull request Nov 10, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When using a bright theme color some icons doesnt invert the color.

5 participants