Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Add a sidebar #258

Closed
joyously opened this issue Oct 23, 2018 · 9 comments
Closed

Add a sidebar #258

joyously opened this issue Oct 23, 2018 · 9 comments
Labels
enhancement New feature or request

Comments

@joyously
Copy link

I mentioned it in another issue, but most people like sidebars to put ads, calls to action, shopping carts, and a bunch of other stuff. A page without a sidebar feels like a dead end, and a site without them feels even worse. I once developed a theme mimicing one I had seen and it had no sidebars. I had a hard time testing everything because it was so dead-ended.

Widget areas in the footer are not a good substitute because each page can be long.
I think the default theme should be showing how to deal with the new wide alignment with a sidebar.

@nielslange nielslange added the enhancement New feature or request label Oct 23, 2018
@00travelgirl00
Copy link
Contributor

I agree. Cause it is a default Theme, we should give the user the option to use a sidebar, or to style the pages and posts without a sidebar.

I think it still would be a good idea to also have at least one widget area in the footer.

@nielslange
Copy link
Collaborator

@00travelgirl00 I've analysed how to implement a sidebar earlier today and, unfortunately, it's not trivial, as the Twenty Nineteen theme does not use any centred container, but all elements are positioned using margins. This makes the implementation of a sidebar a bit more challenging, but not impossible.

Implementing the widget area, as mentioned in #14, is already in progress though. 😉

@kjellr
Copy link
Collaborator

kjellr commented Oct 24, 2018

With Gutenberg, users can add the sorts of rich content, CTAs, and widgets that typically lived in sidebars directly into the body of the page. This was possible before, but it required the technical knowledge of shortcodes or HTML, and was not easily discoverable. Gutenberg greatly improves on this, and gives users much greater control over the exact placement of items on their page.

To fully embrace and encourage this aspect of Gutenberg, Twenty Nineteen is designed so that right-floated blocks extend beyond the text column. This allows for sidebar-like functionality within a single post:

screen shot 2018-10-24 at 9 39 56 am

Many sidebar implementations simply hide sidebars entirely on mobile devices, whereas this implementation allows these "widget" blocks to remain exactly where the author intended within the flow of content, and behave in a truly responsive manner:

ad-responsive

It's common for >50% of a typical website's visitors to arrive on mobile devices, so this is a more modern and universal approach to how sidebar elements are often handled. It is also just a small step compared to phase 2 of Gutenberg, which will expand beyond the editor and allow for more granular control over placement and behavior of sidebar-like elements — even beyond the post body itself. This will open up many great opportunities for improvement and iteration on more global sidebars.

As noted in #14, we will be adding a sidebar area in the footer of the page. There are no plans for adding a second, traditional sidebar at this point.

I think the default theme should be showing how to deal with the new wide alignment with a sidebar.

In case you missed it, the Gutenberg documentation includes a straightforward example of how to implement this.

@joyously
Copy link
Author

Having to add things in individual pages is not the same thing as putting navigation, CTAs, feeds, and other useful things in a sidebar that appears on every page.
Most themes do not hide sidebars on mobile. Most show them after the content, which is where the widget area for this theme already is. Footer widget areas are nice, but not very useful.
Also, this theme is for the current state of WordPress. We will have a different default theme next year when phase 2 is actually implemented, so planning this theme for next year's state is not helpful.

There might be documentation for how to implement wide alignment with a sidebar, but it's better if it's already baked in to the default theme, and users can just use it without having to know how to code.

@rpkoller
Copy link

And on a side note from my understanding a sidebar is a requirement listed in the themes handbook: https://make.wordpress.org/themes/handbook/review/required/

@kjellr
Copy link
Collaborator

kjellr commented Oct 24, 2018

@rpkoller The handbook defines a sidebar as "any widgetized area of your theme", which we do plan to add in #14.

The name “sidebars” comes from a time when widget areas were normally created in a long strip to the lefthand or righthand side of a blog. Today, sidebars have evolved beyond their original name. They can be included anywhere on your website. Think of a sidebar as any area that contains widgets.

via https://developer.wordpress.org/themes/functionality/sidebars/

@joyously
Copy link
Author

@rpkoller No, not required. But very useful.

@kjellr
Copy link
Collaborator

kjellr commented Oct 24, 2018

Since we have no current plans to add a sidebar as per my notes above, I'm going to go ahead and close this. Feel free to continue discussing in here — we can always reopen issues if needed.

@kjellr kjellr closed this as completed Oct 24, 2018
@joyously
Copy link
Author

Right now, there is no useful place for a user to add a search (useful excludes the footer).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants