kuma
kuma copied to clipboard
Consolidate duplicate html and footer tags
We should only have 2 <html />
tags and 2 <footer />
tags. Currently we have 4 of each kind.
See discussion starting here for context: https://github.com/mdn/kuma/pull/6660#discussion_r390460652
Mindy, can you expand on this, so we can scope this?
The issue is right now, using the footer as an example, if we were to update it, we would need to do so in 4 places rather than just 2.
I'm missing historical context, but regarding the footer, perhaps we can remove the footer from react_base.html
since those should be using the React footer. And for socialaccount
, it looks like we can make it extend jinja2/base.html?
Here's the relevant snippet from https://github.com/mdn/kuma/pull/6660#discussion_r391245747:
Footer:
▶ rg '<footer' | rg -v jquery | rg -v ckeditor | rg -v tests | rg -v '\.ltxt' | rg -v l10n.js
jinja2/base.html: <footer id="nav-footer" class="nav-footer">
jinja2/react_base.html: <footer id="nav-footer" class="nav-footer">
kuma/javascript/src/footer.jsx: <footer id="nav-footer" className="nav-footer">
kuma/users/jinja2/socialaccount/base_signup.html: <footer id="nav-footer" class="nav-footer">
HTML tag:
▶ rg '<html ' | rg -v jquery | rg -v ckeditor | rg -v tests | rg -v '\.ltxt'
jinja2/base.html:<html lang="{% block lang %}{{ LANG }}{% endblock %}" dir="{{ DIR }}" class="no-js">
jinja2/react_base.html:<html lang="{% block lang %}{{ LANG }}{% endblock %}" dir="{{ DIR }}" class="no-js">
kuma/wiki/jinja2/wiki/react_document.html:<html lang="{{ document_data['hrefLang'] }}" dir="{{ DIR }}">
kuma/users/jinja2/socialaccount/base_signup.html:<html lang="{% block lang %}{{ LANG }}{% endblock %}" dir="{{ DIR }}" class="no-js">
Need to investigate to scope effort.
Once https://github.com/mdn/kuma/pull/6872 is landed, we can adapt /payments/pages/page.jsx
to be able to be used by Search and Documents, and look into fixing the header and footer duplicates.