Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

As a SO/CE I need to have a block be visible or hidden depending on the type of display it is being viewed on (desktop, tablet, mobile) #832

Closed
kevincrafts opened this issue Feb 27, 2017 · 8 comments
Assignees
Milestone

Comments

@kevincrafts
Copy link
Member

kevincrafts commented Feb 27, 2017

Context

When placing blocks on a page, the best region to place them in for desktop displays and mobile displays is not always the same.

For instance, having a lead generation form at the top of the sidebar is great for desktop, but ends up at the bottom of the page on a mobile display.

Process

Create duplicate blocks and add them in multiple locations, telling each block which display it should be shown/hidden on
screen shot 2017-03-07 at 4 43 59 pm

screen shot 2017-03-07 at 4 44 10 pm

Possible Solution

https://github.com/CuBoulder/express_responsive_visibility_bundle

@kevincrafts kevincrafts added this to the 2.4.0 milestone Feb 27, 2017
@kevincrafts kevincrafts changed the title Blocks should have configurable options to be visible/hidden on different displays As a SO/CE I need to have a block be visible or hidden depending on the type of display it is being viewed on (desktop, tablet, mobile) Mar 8, 2017
@jwfuller
Copy link
Contributor

jwfuller commented Mar 9, 2017

@kevincrafts and I talked about potential accessibility issues with this feature.

We need to make sure that if a block has custom visibility settings, equivalents are set for all other display viewports.

If we don't enforce this, we run the risk of people hiding content for a particular subset of users. While this isn't much of an issue for a 'touch of whimsy' image, it is a serious accessibility issue for a block of text.

@kevincrafts
Copy link
Member Author

kevincrafts commented Mar 9, 2017

So the ideal situation is the block gets placed in two different regions - the sidebar (for desktop) and main content (for mobile). Block gets configured to be visible in one, but invisible in the other.

But there could be other situations where someone tries to just put something in the sidebar for desktop displays and wants no content for mobile (wrong, I know)...

How do we go about enforcing that the block actually exists in both places? They may have made the proper visibility settings, but if they never placed the block in one of the regions, we still run into the issue @jwfuller mentions above.

@cathysnider
Copy link
Contributor

@cathysnider
Copy link
Contributor

cathysnider commented May 15, 2017

Verified: Changing the visibility mode of a text block works. As does events blocks and article blocks.

screen shot 2017-05-15 at 1 43 51 pm

@cathysnider
Copy link
Contributor

One problem: A block that is visible on mobile only is a block that will be forgotten about when the site-owner is working on their site in desktop view mode. A site could end up with all kinds of hidden blocks sprinkled around, that site-builders have forgotten about because they only edit in desktop view. Suggested improvement: All blocks appear to all logged in users, with some kind of indicator or flag on the blocks that display only on a narrower view; perhaps a pink background similar to that of unpublished pages.

@kevincrafts
Copy link
Member Author

This should be using https://github.com/CuBoulder/express_responsive_visibility_bundle, not a branch of Express.

@kevincrafts
Copy link
Member Author

There are ways to exploit this to where you can provide different content to different displays.

Not sure how we go about fixing this. Open to ideas.

@kevincrafts
Copy link
Member Author

It was decided that while this module gives the opportunity to create different content on different displays, that this module will be added to the requested section and have further documentation and conversation on how to use properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants