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

Horizontal scrolling instead of single column view #1127

Open
mcnesium opened this issue Aug 25, 2019 · 8 comments · Fixed by #1133
Open

Horizontal scrolling instead of single column view #1127

mcnesium opened this issue Aug 25, 2019 · 8 comments · Fixed by #1133

Comments

@mcnesium
Copy link
Contributor

I was trying to implement an alternative to the single-column mode for long articles and imho more intuitive and magazine-like reading style for long articles: horizontal scrolling

This will look like this (kind of):

Screenshot from 2019-08-25 17-38-45

and the CSS is actually as easy as

    .entry-content {
        column-count: auto;
        column-width: 10em;
        overflow-x: auto;
    }

-> the width of the columns is chosen arbitrarily for this example

There are a couple of caveats here, which I would like to discuss.

First of all, .entry-content must have a height: 100% or so (maybe calc(100% - 100px), whatever) and for this to work .entry must have a defined height as well. That's the tricky part, because it must only have it while it is flipped open, and collapse if closed.

Problem: in the current implementation .entry does not know whether it is flipped open or not.

So I tried to add parent.addClass('open'); to it after here and parent.removeClass('open'); after here and after here

This seemed to work in the first place, but then I found that those toggles are not fired when using keyboard short cuts. So I was about to search for where those are implemented, but then figured that the resulting code would make this pretty messy.

So I wondered, whether there are some meta toggles somewhere in the code, where adding or removing open class would be more appropriate, or maybe this approach is completely stupid and people who know the code better than me may have a different suggestion on how to achieve horizontal scrolling for long articles. Maybe I should rather wait for upcoming v3, because all the code will be rewritten anyway? I don't know, so please discuss.

@niol
Copy link
Collaborator

niol commented Aug 26, 2019

Having spent some time with the client code, I'd say that there are no meta toggles for entryOpen and entryClose and that I would create them in selfoss-ui.js (if they are more than one line) and refactor the existing code to use them.

@jtojnar
Copy link
Member

jtojnar commented Sep 16, 2019

#1133 will allow you matching expanded item contents using .entry[aria-expanded="true"] .entry-content CSS selector.

@akash07k
Copy link
Contributor

Hi @niol Have you done anything in regards to that?

@niol
Copy link
Collaborator

niol commented Sep 24, 2019

I'm sorry but I do not understand what you are refering to. Please be more specific.

@akash07k
Copy link
Contributor

I was trying to say that have you done any progress in regards to Horizontal scrolling instead of single column?

@niol
Copy link
Collaborator

niol commented Sep 24, 2019

I'm note sure why this was closed as it does not seem to be fixed.
I'll look into this when I have time if it's not fixed.

@jtojnar
Copy link
Member

jtojnar commented Sep 24, 2019

Sorry, should not have closed this.

@jtojnar jtojnar reopened this Sep 24, 2019
@jtojnar
Copy link
Member

jtojnar commented Sep 24, 2019

#1134 will use .expanded class on the .entry.

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 a pull request may close this issue.

4 participants