Skip to content

Conversation

@jashkenas
Copy link
Member

Here's a first draft — (but it fixes a lot of wonkiness and mobile bugs, and kills a bit of complexity, so I think it's worth merging) — of responsive document viewers.

New API options: {responsive: true}, and {responsiveOffset: 100}.

The responsiveOffset defaults to 100, but you can override it. You'd use it to determine how much smaller you'd like your document to be than the vertical viewport size. For example, large fixed headers like the New Yorker might want 150.

Kick the tires on the test page that has the container CSS'd with a few different breakpoints: viewer-responsive.html

knowtheory added a commit that referenced this pull request Dec 9, 2014
Add responsive flag to automatically switch between desktop & mini versions of viewer.
@knowtheory knowtheory merged commit 8565cf3 into master Dec 9, 2014
knowtheory added a commit to documentcloud/documentcloud that referenced this pull request Dec 9, 2014
@eyeseast
Copy link

We can probably add these options to the wordpress plugin, too, right?

@knowtheory
Copy link
Member

@eyeseast yep. Goal is to use the responsive flag for now, and then once we've got everything nailed down, shift the behavior to default and ignore the responsive flag.

@knowtheory knowtheory deleted the responsive branch December 29, 2014 16:14
@eyeseast
Copy link

Cool. What do you think about making responsive the default for the shortcode? Or maybe adding it to the site options, like width and height?

@jashkenas
Copy link
Member Author

Whoa there -- we shouldn't change the default. That would break all of the old "fluid" embeds.

Instead, we should make "responsive: true" part of the default embed code that the workspace generates for you... That can be done whenever.

@eyeseast
Copy link

I'm just talking about the WP Plugin that writes the embed code. I can make it use responsive: true by default, or not (here).

I'll probably do this in a WP setting, so people can default to responsive or not, like we do for width and height.

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.

3 participants