-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement global header/footer design for News site #6
Comments
I was thinking of creating a "global header" dynamic block, and include that in I don't think that's actually necessary, though. That block would contain the entire header area, and I'm assuming we're not going to want users changing the global header/footer. So, I think we can just skip FSE for the header/footer area, and treat it like a classic theme. The sidebar/content area would still be FSE, though. How does that sound @coreymckrill ? |
If we can get that to work, that's probably fine for now. I still don't have a great understanding at this point of how block templates are loaded, and if you can even mix and match php and html template parts... |
Oh, huh, it looks like the If it's not used, then I think we'll need a header block after all. I'll take a closer look tomorrow. |
I think it's only used in the 404.php template. |
huh, but there's a maybe it's just for translation? Automattic/themes@ae7e63d |
Ah, interesting. Good find. |
Thinking more about this. It does seem like this would be feasible, for both the header and the footer, it could just use a server side render and not have any options or UI. Maybe it would go in a separate plugin,
Yeah this seems related to #14. I haven't looked into whether specific templates can be locked (i.e. prevent users from editing them/creating versions stored in the db), but it seems like this should be doable. I suspect at first we'd just want to lock everything down, and then unlock things as the need arises. |
rough sketch of that here: |
Another thought: given the current limitations of FSE, we could have this theme take a hybrid approach: Use a theme.json file, but still use classic PHP-style templates instead of block templates. If we wanted to keep the door open for refactoring to full FSE later, the PHP templates could still include block grammar where feasible, so they'd be easier to convert to block templates in the future... |
🤔 , my gut feeling is that'd introduce more technical debt overall, and it'd be better to commit to one or the other. But then, if we end up having to create faux blocks for a lot of stuff... it might be less awkward to just use the parts of FSE that work for us today, and hold off on the others 🤷🏻♂️ I don't feel too strongly. Are you leaning one way or the other? |
I've been vacillating on this. If it turns out that global header and footer are the only things we need "faux" blocks for, maybe we can, in fact, stick with block templates as well. I'm working on #17 right now, and I might have a firm opinion after that. |
The foundation for this has been merged in WordPress/wporg-mu-plugins#4 and #20. I'll work on the actual content next. |
@coreymckrill, what was your process for creating the markup in #21? I was thinking about using Did you come up with something better? If not, maybe we could write an mu-plugin that would save wp-admin changes to the PHP file in addition to the db? That'd probably wipe out any PHP comments that we'd want, so we'd have to make them HTML comments, which would be a pain Gutenberg. I guess we could have a delimiter in the PHP file, and only things after it would be overwritten. |
hey @beafialho 👋🏻
The current footer has those links, along w/ the Twitter/FB logos to their left. In Figma, the logos are floating in the bottom right, so they don't seem attached to the text, and the link text isn't descriptive enough for users to know what they'd be clicking on. Should the text be removed in the new design, or did you want to keep it there and just have the logos in a different location? |
Hi @iandunn thanks for pointing that out, I missed that detail! The intent is to have the social links be the icons at the bottom, so let's remove the last column of links. |
Sounds good, thanks! |
…ontent` This will be necessary so that CSS and other assets will have a publicly accessible URL, so that they can be enqueued. See WordPress/wporg-mu-plugins@422e41f See #6
Because they only contain a single element, they're no longer useful. Having them as a template part adds extra & unneccessary `<header>` / `<footer>` tags to the page. See #6
The styles will be refined in future commits. See WordPress/wporg-news-2021#6
I took the liberty of adding I also added OpenVerse to the header and footer, since it should launch before this does. We can adjust if that changes though. |
* Rename files, since they'll no longer be directly `include`'d by classic themes * Restore FSE editor formatting, to avoid future diff noise * Add OpenVerse, since it'll launch before this does See WordPress/wporg-news-2021#6
Good idea, I see no reason why they shouldn't be there. |
Nope. I used the block editor a few times and just switched to Code View to copy/paste, but after I had enough sample material in my files, I just started copy/pasting it from there and changing the block names and attributes by hand. |
Yeah, that's what I've mostly ended up doing too 👍🏻 |
@beafialho , in the mockup, the header menu is Should the menu wrap to a 2nd row? If so, what kind of spacing do you want, etc? |
@iandunn this should be the behaviour of the header in different screen sizes:
I've added a responsive section to the Figma file with all these mockups there. |
* Header/Footer: Refine header styles. See WordPress/wporg-news-2021#6
This should be all done, except for pixel perfect tweaks. |
https://www.figma.com/file/O9I8Jl7kaUMTX39LlRGbGO/News-Page?node-id=4659%3A8203
It may be easiest to get it working for News first, and the roll it out to the rest of the network in #7.
It should take into account any foreseeable needs for the network-wide rollout, though.
The text was updated successfully, but these errors were encountered: