Skip to content

Apps not correctly align on apps page #1938

Closed

Description

@schiessle

I really like the latest changes to the apps page, the raster looks much better than the list. But it seems that sometimes the apps are not correctly align, see this screenshot:

apps

I would expect that the "Versions" app is in the second column, under the text editor and not between the second and the third column.

cc @nextcloud/designers

Activity

  1. added this to the Nextcloud 11.0 milestone on Oct 27, 2016
  2. eppfel commented on Oct 27, 2016

    @eppfel
    Member

    Yeah, I was thinking about this might be an issue, but when I created it, it had borders and then it was more clear:
    Flexbox distributes it not in columns, but uses the space more flexible. I can look again, but I think there was no "take same size for all elements option". We could revert this and try with floats...

  3. self-assigned this
    on Oct 27, 2016
  4. jancborchardt commented on Oct 27, 2016

    @jancborchardt
    Member

    @eppfel try table layout ;D

  5. schiessle commented on Oct 28, 2016

    @schiessle
    MemberAuthor

    Yes, I already assumed that it might be not that easy. But maybe someone finds a creative way to create a "clean table layout" with some css magic. Maybe we could fill up the rows with invisible dummy elements?

  6. te-online commented on Oct 28, 2016

    @te-online
    Contributor

    If I remember correctly the only way to enhance that is defining widths for the elements.

    So for example you would need a width of 33.3333% for each element for a 3-column layout and then change the number of columns depending on the breakpoint. But that's a lot of manual work.

    You could also set flex-grow to 0. This would make for a perfect grid, but the elements wouldn't fill up the full page width at some window sizes.

    bildschirmfoto 2016-10-28 um 11 06 43

    Another method is using a hack like this one: http://stackoverflow.com/questions/16377972/how-to-align-left-last-row-line-in-multiple-line-flexbox/31478004#31478004 (I don't like it...)

    I wouldn't use floats (or tables :D) over flexbox in general, though.

  7. rullzer commented on Oct 28, 2016

    @rullzer
    Member

    https://github.com/nextcloud/server/blob/master/settings/css/settings.css#L444 <-- shouldn't this to flex: 0 0 330px; do the trick?

  8. te-online commented on Oct 28, 2016

    @te-online
    Contributor

    Yeah, that's what I mean with flex-grow: 0; 😉
    But then it looks like in the screenshot. So it's not using all the available space all the time.

  9. eppfel commented on Oct 28, 2016

    @eppfel
    Member

    Thx, @jancborchardt, @rullzer, @te-online Correct me if I'm wrong, but flex-grow: 0 makes using flexbox completely obsolete, because we would have a fixed width and nothing "flexible". That's what I meant with reverting to floats.

    The hack needs empty divs, really ugly.

    Another option would be to use a responsive grid, so media-queries and percentages, because right now for most screens it would be 1-4 columns.

    So, in the end it comes down to what we want.... Again, if you look into the original PR #1355 with borders it gets more clear.

  10. te-online commented on Oct 31, 2016

    @te-online
    Contributor

    @eppfel Essentially you're right with your summary 😉

    Personally, I like the purecss grid, which makes use of flexbox. http://purecss.io/grids/
    Maybe we can build our own small grid-css? http://purecss.io/start/#build-your-pure-starter-kit

    However, maybe that's also an overcomplicated idea...
    I don't really know at the moment 😳

  11. 9 remaining items

  12. skjnldsv commented on Nov 4, 2016

    @skjnldsv
    Member

    @jancborchardt I have to said I was really scared for a moment! 😂

  13. eppfel commented on Nov 4, 2016

    @eppfel
    Member

    So, I sense opting for flex-grow: 0 , this would make columns 330px, but the number of columns completely flexible. Horizontal occurs under 400 something pixel, so maybe there has to be added one media-query.

  14. te-online commented on Nov 4, 2016

    @te-online
    Contributor

    Where did the horizontal-scroll-bar-topic come from? 😂
    (We want them as much as we want tables for layout...)

    We have to add one media query for small screens to have a flex of 100%, avoiding horizontal scrolling for screens smaller than 400 something pixel, as @eppfel suggests.

    However, I feel that the solution as shown in the codepen posted by @skjnldsv is the most appropriate solution. With small to no overview of the CSS base 😳 I don't really know if we can afford that, but adding a few media queries to make it work properly doesn't seem too far off.

    After the time we spent on this issue now, I'd consider the flex-grow: 0 solution a less valuable compromise.

  15. eppfel commented on Nov 4, 2016

    @eppfel
    Member

    OK, but the code-pen has to be adjusted, because it ends with a 4 columns. I think it's not a bad idea, I just wont have the time right now.

  16. skjnldsv commented on Nov 4, 2016

    @skjnldsv
    Member

    I have a better solution I think.

    #apps-list .section {
        position: relative;
        margin: 0;
        padding-right: 50px;
        width: 330px;
        flex-grow: 2;
        max-width: 660px;
        min-width: 250px;
    }
    

    This have a pretty display I think.
    We just need to exclude the experimental div separator from the flex flow. by creating two containers or by simply breaking the flex flow.

  17. eppfel commented on Nov 5, 2016

    @eppfel
    Member
  18. skjnldsv commented on Nov 5, 2016

    @skjnldsv
    Member

    Yes, it doesn't fit the column, but it looks better, no?

  19. eppfel commented on Nov 5, 2016

    @eppfel
    Member

    I think the majority opted for the grid look..

  20. jancborchardt commented on Nov 18, 2016

    @jancborchardt
    Member

    Yeah – we use a grid so all items should be aligned on the grid. Even if the last row doesn’t have all elements to fill the width. :)

  21. skjnldsv commented on Nov 18, 2016

    @skjnldsv
    Member

    So we need to go for the same stuff than the codepen.

  22. schiessle commented on Dec 1, 2016

    @schiessle
    MemberAuthor

    this pr will fix it: #2434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions