Use ad-hoc styles for generic create/edit form heading instead of using w-header's

pull/11714/head
Sage Abdullah 2024-02-23 17:30:12 +00:00 zatwierdzone przez Thibaud Colas
rodzic 6c0e638c9a
commit 049e7dad54
2 zmienionych plików z 10 dodań i 16 usunięć

Wyświetl plik

@ -4,9 +4,9 @@
{% block main_header %}
{% if breadcrumbs_items %}
<div class="w-header nice-padding w-mt-8">
<h2 class="w-header__title" id="header-title">
{% icon classname="w-header__glyph" name=header_icon %}
<div class="nice-padding w-mt-8">
<h2 class="w-relative w-h1" id="header-title">
{% icon classname="w-absolute w-top-1 -w-left-11 w-max-w-[1em] w-max-h-[1em]" name=header_icon %}
{{ page_subtitle }}
</h2>
</div>

Wyświetl plik

@ -2407,19 +2407,13 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
)
self.assertContains(response, "Unpublish")
# Should use the latest draft content for the title
self.assertContains(
response,
"""
<h2 class="w-header__title" id="header-title">
<svg class="icon icon-snippet w-header__glyph" aria-hidden="true">
<use href="#icon-snippet"></use>
</svg>
Draft-enabled Bar, In Draft
</h2>
""",
html=True,
)
soup = self.get_soup(response.content)
h2 = soup.select_one("#header-title")
self.assertIsNotNone(h2)
icon = h2.select_one("svg use")
self.assertIsNotNone(icon)
self.assertEqual(icon["href"], "#icon-snippet")
self.assertEqual(h2.text.strip(), "Draft-enabled Bar, In Draft")
# Should use the latest draft content for the form
self.assertTagInHTML(