Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Include wp.org header/footer in the application #447

Closed
wants to merge 4 commits into from

Conversation

zackkrida
Copy link
Member

@zackkrida zackkrida commented Nov 23, 2021

Relevant discussion of the header and footer: WordPress/wporg-mu-plugins#38

Fixes

Fixes #[issue number] by @[issue author]

Description

Work in progress. Style conflicts (of course) between WP.org CSS and Openverse CSS. Will need to do something fancy to scope the CSS for each.

This should be paired with some code in our WordPress PHP theme to:

  • deregister default WordPress CSS files and JavaScript as much as possible
  • Hide the header and footer in the theme

Testing Instructions

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@zackkrida
Copy link
Member Author

Oooh, this could help: https://github.com/tillschander/postcss-prefix-all-rules

@zackkrida
Copy link
Member Author

It would be awesome to test this with the new header style, on a test page, we can use the same flag as WordPress coe does to enable the new header: FEATURE_2021_GLOBAL_HEADER_FOOTER

Context: https://meta.trac.wordpress.org/changeset/11388

@zackkrida
Copy link
Member Author

CleanShot 2021-12-17 at 20 28 54@2x

Example with the new header via a new feature flag.

@iandunn
Copy link
Member

iandunn commented Jan 3, 2022

Hey 👋🏻

I'm not familiar w/ your non-WP architecture, long term plans, etc, but I don't think you'll need to do anything to get the new header/footer in your current PHP WP theme. The work being done in WordPress/wporg-mu-plugins#38 will make it apply to all Classic themes. It's working well on my sandbox for w.org/openverse already.

Long term, if you want to move away from the wp + iframe approach, you could use the API endpoint that we'd building for non-WP apps. That would give you the markup and styles without having to scrape anything, and you could cache it in the app.

What are your thoughts/needs/etc?

@zackkrida
Copy link
Member Author

Hey, thanks @iandunn that endpoint would likely meet all of our needs. Our intention, quite strangely, is to actually move the global header and footer into our iframe long-term, to fix some styling/height issues we're dealing with.

@iandunn
Copy link
Member

iandunn commented Jan 3, 2022

Ah, that sounds good 👍🏻

@zackkrida zackkrida added the 🚧 status: blocked Blocked & therefore, not ready for work label Jan 5, 2022
@zackkrida
Copy link
Member Author

As we no longer need this short-term, and ultimately intend to move away from the iframe, I'm going to close this.

@zackkrida zackkrida closed this Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚧 status: blocked Blocked & therefore, not ready for work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants