-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add missing icons and compile them into sprite, closes #56 #94
Conversation
@raimund-schluessler svg files could use some cleanup, I noticed a lot of unneeded code. Also, default for Nextcloud is 16x16 size for svg viewbox (20x20 is used for app icons only). If you want, I can create a PR with updated SVGs, but it should be done before sprite is made, because |
@pixelipo Optimizing the SVGs would be very welcome. However, before optimization I need to add all missing icons first, since some of them are only available in the sprites file anymore. I will let you know, when I am done so you can optimize the SVGs. About the size I am not sure. They are all 20x20px² and I am not sure if they would all fit into 16x16px². |
@pixelipo I extracted all icons from the sprite and saved them as separate files. Feel free to have a look and optimize them. But I think some of them didn't take the extraction well and might be pretty broken (although shown correctly). I will maybe need to redraw some of them once everything else is done to get them nice. But maybe you can clean them up anyway, this would be awesome. 😃 I will now focus on adjusting the css file and get everything else nice. In case you want to compile the sprite file, |
@raimund-schluessler I'm about 80% done with optimization. This includes resizing svgs, replacing some with the core counterparts and getting rid of few that are not needed. I would like to replace divider.svg with Additionally, I think it would make sense to remove checkbox svgs and use border + checkmark.svg instead - it would look like this: Lastly, where do you want me to commit this? In a separate branch/PR, in this branch/PR or in a new branch based on this branch? |
Thanks for optimizing them! 😃 Could you tell me, which ones you replaced/deleted? Some of the currently unused were used for features currently not implemented anymore, but which might come back in future versions (e.g. the clock and toggle icons were used for reminders). I must admit I am a bit skeptical about the resizing, but lets see how that turns out.
Yes, that's fine with me. The difference is not this big.
Ok as well, although the checkmark is slightly smaller than before. Could be solved by a separate and larger element on top, but maybe not necessary.
Just commit in this branch/PR, we can adjust everything necessary here. |
Btw. which software do you use for editing and optimizing the SVGs? |
Inkscape for editing, scour for optimization (same script available in core ). 16px won't affect view at all, but scales better and maintains consistency across Nextcloud |
Ok, @raimund-schluessler , I've pushed my changes. There is one known bug: Another known issue is that opacities are not 100% sorted out. Somewhere it's too dark, elsewhere too light, but it shouldn't be too hard to fix. Please check for other bugs. I have put all the icons into a new folder Size of I have replaced some of the icons with the ones existing in nextcloud core - notable example is categories, which are swapped with |
P.S. I've pushed 2 versions of |
@pixelipo Thanks for all the work, I will have a look as soon as I can. I already saw, that you adjusted the background-positions ins |
I had a look at the optimized icons and I am fine with most of the adjustments. However, there are some changes I don't find optimal:
I would adjust the icons accordingly, but would like to have feedback why this changed. 😉 Regarding the css, I will take care. Some positions of text etc. changed due to the changed icon size. Also, the stars look quite chubby now, but I guess this is the standard Nextcloud design?! Also @jancborchardt could have a look. |
Solution is to match classnames and icon file names, will do so. |
@raimund-schluessler thanks for the feedback. You raise some valid points and I'll try to address them all:
|
css/style.css
Outdated
.icon.none { | ||
background-position: 0px -20px; |
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.
if this is used for icons where no background should be shown, I propose background-image: unset;
as a more permanent solution
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.
Yes. I need to cleanup css anyway, see #95 .
Yes, that's fine. I will take care and adjust everything.
Ok, then lets keep it consistent and maybe create a core issue.
Yes, could work. I maybe just need to get used to it.
My bad, this icon was used to reload the tasks inside the app. We do not need it any more, this function will not come back. Was not related to sorting at all.
Great, thanks!
Alright, then I will work with opacity.
I liked the old one better, but consistency > taste I guess. Maybe core issue.
It is currently not used, but it was used to exchange the reminder type. Can't give you a sample at the moment, obviously. Sorry.
Thought about that too, might make sense.
Roughly, yes. Some icons are slightly smaller, but I guess this is only visible in a direct comparison.
Core issue? 🙈 |
Wide |
OK, I'm done for now. Everything but icons 8 and 9 have been updated/fixed. I propose to ignore icon 9 for now and make something up when the feature returns.Regarding icon 8, two possible solutions:
I've prepared a new Compared to current one from core: I haven't ran sprite script - I've left it to you, @raimund-schluessler because you will be updating CSS. |
@pixelipo Thanks for your support, the icons look good now. I will adjust the CSS. |
No problem. I pushed one more small change - sprite svg is now generated in the correct folder ( |
I fixed all issues with the icons, their position is now given by the compiled sprites.css file. I suppose in general, everything should be fine now. In case there are smaller issues, I would like to fix them in follow up PRs, since this one here is already huge. There is still a lot to do on the css side, it has to be cleaned up. But this I will do when moving to SCSS, otherwhise we will have to do the work twice. @pixelipo Mind having a look? |
I just fixed a small javascript error, which I missed before. |
@raimund-schluessler I will try to review this again as soon as possible, but right off the bat - I don't think it's a good idea to change the icon prefix. App-specific icons should be 100% compatible with core CSS. |
@pixelipo I would also prefer to have it named Before, the css class setting the icon's Now all the classes would be named If you have a better solution for this, feel free to tell me (or just implement it 😉). |
We could maybe make the CSS icon rule of Tasks more specific than the one of core. But since |
@pixelipo Please see #108 (comment) for a solution of the |
After is with #108 applied, but that should not make any major difference. |
Ok, I will rebase and merge this one here, since we need it for other PRs which are impossible to review at the moment without this one here merged. I don't really like that, but I think it is the best way at the moment. We can fix everything in follow-up PRs. The Edit: Waiting for @skjnldsv to have a look 😄 |
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.
All clear! :)
@@ -77,36 +77,36 @@ | |||
</div> | |||
</div> --> | |||
<div class="section detail-priority handler" ng-class="{'editing':route.parameter=='priority','high':task.priority>5,'medium':task.priority==5,'low':task.priority > 0 && task.priority < 5, 'date':task.priority>0}" ng-click="editPriority($event, task)"> | |||
<span class="icon detail-priority"></span> | |||
<span class="icon ico-star" ng-class="{'ico-star-high':task.priority>5,'ico-star-medium':task.priority==5,'ico-star-low':task.priority > 0 && task.priority < 5}"></span> |
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.
It could be great to have a small function for that, much cleaner! :)
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 idea, I created an issue #113 for this to tackle it after all this PR mess 😄
@skjnldsv Thanks for reviewing, I will rebase/squash and merge. 👍 |
739f72a
to
dc7bd6a
Compare
- CSS fixes - Add missing svg files as separate files
Removed checkbox and divider SVG icons. Fixed some positioning issues. Cleanup of some CSS declarations. Signed-off-by: Marin Treselj <marin.treselj@forlagshuset.no>
- Fix popover menu opacity - Fix positioning and opacity problems Signed-off-by: Marin Treselj <marin.treselj@forlagshuset.no>
- fix small bug in `checkmark.svg` and `checkmark-color.svg` - use wide version of percent.svg icon - update `current.svg` icon - remove deprecated `update.svg` icons - better clock icons Signed-off-by: Marin Treselj <marin@pixelipo.com>
Signed-off-by: Marin Treselj <marin@pixelipo.com>
- Remove dims rules - change icon prefix - rename star icons - add hovered icon - fix positioning of all static icons - fix messed up position of progress bar - fix collection icons - fix app-navigation-entry opacities
dc7bd6a
to
92293b1
Compare
See #56
compile css files into single file(will be done when moving to SCSS, see Cleanup CSS code and move to SCSS #95)