-
Notifications
You must be signed in to change notification settings - Fork 263
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
Fit app-navigation to css guidelines #521
Conversation
@jancborchardt, it's an easy fix with a single line on the mail app css. That being said, we should wait the end of my work here to really see what it would look like! :) |
Okidoke! I just snook a peek :) |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6d4ac2d
to
a54cbab
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@jancborchardt Feeling better? 😉 |
@skjnldsv not yet – this would be the correct indentation ;) As it is in the current design too. That’s why I mentioned it’s unusual, but we don’t want to have it look like a strange tree view by default. |
I disagree, folders are subitems of the account, they should appear as indented. |
The folders are not subitems of an account. The account name is simply the header of the set of folders. :) What do you think @ChristophWurst @Gomez? |
I'm okay with both! :) If we go for NOT a subitem, the work will be far more considerable though. |
I agree with @jancborchardt regarding indentation. Account name is not clickable and it's not collapsible, hence it shouldn't pretend to be a parent folder. However, as far as headers go, account name could be styled better. Right now, it's styled to like like a folder (mailbox). It's very hard to differentiate it from actual mailboxes (inbox, sent etc.) App-navbar doesn't seem to support headers at the moment, so I don't know how it should look :) |
@@ -1,32 +1,35 @@ | |||
{{#if emailAddress}} | |||
<div class="mail-account-color" style="background-color: {{accountColor emailAddress}}"></div> | |||
<div class="mail-account-color app-navigation-entry-bullet" style="background-color: {{accountColor emailAddress}}"></div> |
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.
Shouldn't this be rendered via CSS, similar to the way folders' icons are done?
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.
You mean the background color?
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.
Not only that, the whole .mail-account-color
could be moved over to .mail-account-email:before
. That would make for a cleaner DOM.
edit: Because the bullet is just decoration
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.
The bullet is now integrated into server. It's part of the css guidelines.
see nextcloud/server#6399
It’s greyed out for now, and has the colored circle. That’s what differentiates it from the folders – any other ideas? :) @skjnldsv so should we in the mail app simply override that one first indent? Or how to do it? :) I mean, semantically the accounts are not a »parent folder« of the mail folders, as @pixelipo also said, so they shouldn’t be like that in the markup. |
If we start overriding the default server, let's drop this full pr. I don't see the point. :) |
@skjnldsv Well I think we need to decide whether we want to support list headings in the app navbar. In my opinion, it's logical to have this - semantically, list usually have titles. No app that I know of (apart from Mail) has the need for them - so far, but if you look at Calendar, you will notice that regular and webcals are separated and the "New ***" button is acting as a heading: I would also like to attach Geary sidebar - they are indenting folders within accounts, even though accounts themselves are not clickable (they are collapsible, though). |
Thanks @pixelipo! :) |
@pixelipo and that sidebar look is precisely what I find annoying with Geary. :) It’s complicating the view and makes the structure look more complex than it actually is. |
@skjnldsv that’s the thing though – the Mail app doesn’t need to override it if the accounts are headers and not parent folders. We could add a bit of vertical whitespace like in the Calendar too, to make the separation more clear. (Note that the buttons being used as headings in the Calendar is by design.) Also the mail app automatically collapses stuff already, like all the folders which are secondary. (Except inbox, sent, drafts, favorites.) You already can easily see 2–3 accounts in the list without scrolling. Being able to collapse the whole account just introduces a 2-step process. Sorry if it sounds like I’m arguing against standardization – in certain respects the design just needs to be adjusted to be more seamless for the specific app we are looking at. And apps like Mail and Calendar are designed that way for a reason. The goal of standardizing the CSS is not to put everything down to a lowest common denominator. ;) |
I'm OK with you @jancborchardt! :) |
Nice callout, this is a core bug!
Because it's a sub item :)
Good question. I'm not sure we can put everything as first items. This would require a big change in the backbone/marionette controllers! :/ |
Regarding
and
IMO of course, folders belong to an account and thus reflect a hierarchy. However, I'm not a big fan of indenting that in the sidebar as that seems like a lot of wasted space to me. I like the idea of having list heading/separators that we could use to separate different accounts. @skjnldsv is something like that feasible? Like something that could be used by any app somehow? I image that as one entry in the list with a dedicated class which makes the font a bit stronger/darker/whatsoever. We wouldn't then add it for the unified account of course, but rather for the specific ones only. I'd gladly implement it for this app, I just have to know how to structure the HTML and I'll fight with/against backbone/marionette to achieve that 😉 A rough structure would look like this
To comply with the current design, list headings should have the ability to show an icon on the left (like the other entries in the list, I think we have the styling in place already). As before, we wouldn't go deeper than one subfolder. Does that make sense? :) |
In addition to my comment above, this would be the rough HTML structure: <div id="app-navigation">
<ul>
<li>
<a href="#">All inboxes</a>
</li>
<li class="heading">
<a href="#">user1@domain.tld</a>
</li>
<li>
<a href="#">Inbox</a>
</li>
<li>
<a href="#">Drafts</a>
</li>
<li>
<a href="#">Sent</a>
</li>
<li>
<a href="#">Folder with sub folders</a>
<ul>
<li><a href="#">Subfolder 1</a></li>
<li><a href="#">Subfolder 2</a></li>
</ul>
</li>
<li class="heading">
<a href="#">user2@domain.tld</a>
</li>
<li>
<a href="#">Inbox</a>
</li>
<li>
<a href="#">Drafts</a>
</li>
<li>
<a href="#">Sent</a>
</li>
</ul>
</div> |
That is perfect!! |
Awesome. Then let me try to adjust our views to generate a HTML closely to what I've sketched above. Could be that Marionette requires us to have some additional elements due its requirement of an surrounding element and our nested view hierarchy. Should be fine though :) |
@ChristophWurst good luck. The div wrapping is a pain!! :( |
Indeed they are. And from experience I can tell it's super hard to get rid of them without introducing random bugs. Thus I'd like to ask whether it would be possible to relax the CSS rules a bit to be a bit less strict about the HTML structure. As in: ignore some wrapping divs. Something like core/css/apps.scss | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/css/apps.scss b/core/css/apps.scss
index 9978c38033..fa984ef90b 100644
--- a/core/css/apps.scss
+++ b/core/css/apps.scss
@@ -104,7 +104,7 @@ kbd {
box-sizing: border-box;
display: flex;
flex-direction: column;
- > li {
+ li {
display: inline-flex;
flex-wrap: wrap;
order: 1;
@@ -201,8 +201,8 @@ kbd {
}
}
/* Menu and submenu */
- > li,
- > li > ul > li {
+ li,
+ li > ul > li {
position: relative;
width: 100%;
box-sizing: border-box; seems to allow styling Mail according to the guidelines while still using some additional divs. @skjnldsv how bad is that? 😨 |
To answer my own question: very bad. Now the stlye is applied to any |
Putting this on hold until #521 (comment) has been answered. So far, so good |
It's done on purpose to force the correct css guidelines. :) |
I see. Unfortunately, that means I'm out of idea on how to solve this. I definitely won't merge all the views into one to remove the wrapping divs and I also won't work on hacks to remove the existing divs. With the tools we currently use (Backbone+Marionette), it seems very hard to obey those strict rules. And a switch to another front-end framework is not planned right now as it would require a lot of effort. |
2e723e9 removes two unnecessary wrapping divs. The other ones cannot be removed that easily it seems. |
I'll think about what we can do on mail. On the other hand, it seems incredible that a very used engine like backbone forces users to wrap in div... I don't get their idea on this. 🤔 What is the main problem with your latest changes @ChristophWurst? The screenshot seems great? |
Only because I've adjusted the server css with the patch from above 🙈
I guess jashkenas/backbone#546 (comment) |
Looks very good so far! :) Much better |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and questions. |
Fix #516
Fix #528