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

Show/Hide on blocks on different device/screen types #61445

Open
syhussaini opened this issue Feb 24, 2022 · 6 comments
Open

Show/Hide on blocks on different device/screen types #61445

syhussaini opened this issue Feb 24, 2022 · 6 comments
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Feature] Post/Page Editor The editor for editing posts and pages. [Pri] Normal [Type] Feature Request Feature requests

Comments

@syhussaini
Copy link

What

I would like to have the option for every single block that would allow to hide/show the block based on device type in the FSE and the regular blocks.

Why

This will give more control to the user to manage the content on the website. This way, they can decide to hide the content that may not be suitable for mobile viewers from being viewed when the site is viewed on mobile and vice versa.

Additionally, they can decide to create multiple variations of the same content by choosing to display one set for the mobile viewers and another only for desktop and tablet viewers.

Overall, it will enhance the website development experience to a whole new level with precise control on the block elements based on the device types.

How

For example, see this image.
hide-show

@syhussaini syhussaini added the [Type] Feature Request Feature requests label Feb 24, 2022
@syhussaini syhussaini added this to Needs triage in HE Triaging Board (new bugs) via automation Feb 24, 2022
@Greatdane
Copy link

FYI: This has been a feature on Elementor for a long time and would be a great addition!

@Greatdane Greatdane changed the title Show/Hide on Different Device Types Show/Hide on blocks on different device/screen types Mar 9, 2022
@Greatdane Greatdane moved this from Needs triage to Triaged in HE Triaging Board (new bugs) Mar 9, 2022
@cometgrrl cometgrrl moved this from Triaged to Prioritized - Feature requests in HE Triaging Board (new bugs) Mar 28, 2022
@Greatdane
Copy link

Added to Gutenberg core; WordPress/gutenberg#39968

HE Triaging Board (new bugs) automation moved this from Prioritized - Feature requests to Closed Apr 1, 2022
@syhussaini
Copy link
Author

I am re-opening this thread as the thread we created on Gutenberg core, WordPress/gutenberg#39968, is closed.

I request to have this feature considered especially for the Simple Sites, as these sites do not have the option to add Plugins.

@syhussaini syhussaini reopened this Mar 20, 2023
HE Triaging Board (new bugs) automation moved this from Closed to Needs triage Mar 20, 2023
@sharonlaker19
Copy link

I received a request for a similar feature in 41566798-hc.

@cuemarie
Copy link

📌 ACTIONS

  • Feature request kept for tracking user/HE requests

For context, here are some related core discussions that I think play a factor here:

@cuemarie cuemarie added [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Feature] Post/Page Editor The editor for editing posts and pages. and removed [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. labels May 25, 2023
@cuemarie cuemarie moved this from Needs triage to Triaged - Not yet prioritized in HE Triaging Board (new bugs) May 25, 2023
@cat-og
Copy link

cat-og commented May 21, 2024

Hoping to revive this discussion!

Rather than applying this to all blocks, perhaps this could be instead added to Container blocks like Group, Row, Column, and Grid? This could work in the same way that the Position settings for container blocks work; when that option is selected for a group, the Group is given a unique identifier and the code position: sticky; is applied to that Group.

Similarly, if a Display or Visibility setting is added in these container block settings, it could use the same unique identifier method to apply the code display: none; to that container.

Here is an example of how that would look applied to a group with a unique identifier on a site where that Group is hidden on mobile:

@media only screen and (max-width: 480px) {
.wp-container-26 {
	  display: none;
  }
}

This simple addition would give the user immediate control over how their site will display on any screen size. They will be able create unique layouts for different screen sizes on a single post or page without having to add additional plugins or site-building tools.

We could even include this as a feature starting on the Explorer plan like Style options, and market that in the plan descriptions as Custom Mobile Responsiveness or Extended Mobile Optimization.

As people turn to mobile browsing over desktop more each year, having full mobile responsiveness and ability to control the view of their site no matter the device will an essential asset for every site builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Feature] Post/Page Editor The editor for editing posts and pages. [Pri] Normal [Type] Feature Request Feature requests
Projects
HE Triaging Board (new bugs)
Triaged - Not yet prioritized
Development

No branches or pull requests

5 participants