Use the correct text color for info boxes in workflow side panel section

pull/10467/head
Thibaud Colas 2023-05-23 09:26:11 +01:00
rodzic 88417e1567
commit 770a01f458
3 zmienionych plików z 58 dodań i 58 usunięć

Wyświetl plik

@ -42,15 +42,15 @@
<div class="w-p-4 w-bg-info-50 w-rounded w-flex w-space-x-3">
{% icon name='calendar-check' classname='w-w-4 w-h-4 w-text-info-100' %}
<div class="w-flex w-flex-1 w-items-start w-justify-between">
<div class="w-flex w-flex-col w-flex-1 w-pr-5 w-space-y-1 w-help-text">
<div class="w-flex w-flex-col w-flex-1 w-pr-5 w-space-y-1 w-help-text w-text-grey-400">
<div>
<span class="w-text-text-label">{% trans 'Expiry:' %}</span>
<span class="w-text-grey-600">{% trans 'Expiry:' %}</span>
{{ live_expire_at }}
</div>
</div>
{% if show_schedule_publishing_toggle and not has_draft_publishing_schedule and not lock_context.locked %}
{% trans 'Edit schedule' as edit_schedule_text %}
{% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-text-link-default hover:w-text-text-link-hover w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %}
{% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-secondary hover:w-text-secondary-400 w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %}
{% endif %}
</div>
</div>
@ -140,26 +140,26 @@
{% icon name='calendar' classname='w-w-4 w-h-4 w-text-info-100' %}
{% endif %}
<div class="w-flex w-flex-1 w-items-start w-justify-between">
<div class="w-flex w-flex-col w-flex-1 w-pr-5 w-space-y-1 w-help-text">
<div class="w-flex w-flex-col w-flex-1 w-pr-5 w-space-y-1 w-help-text w-text-grey-400">
{% if scheduled_go_live_at %}
<div><span class="w-text-text-label">{% trans 'Go-live:' %}</span> {{ scheduled_go_live_at }}</div>
<div><span class="w-text-grey-600">{% trans 'Go-live:' %}</span> {{ scheduled_go_live_at }}</div>
{% endif %}
{% if scheduled_expire_at %}
<div><span class="w-text-text-label">{% trans 'Expiry:' %}</span> {{ scheduled_expire_at }}</div>
<div><span class="w-text-grey-600">{% trans 'Expiry:' %}</span> {{ scheduled_expire_at }}</div>
{% endif %}
{% if draft_go_live_at or draft_expire_at %}
<div class="w-label-3">{% trans 'Once published:' %}</div>
<div class="w-label-3 w-text-grey-600">{% trans 'Once published:' %}</div>
{% if draft_go_live_at %}
<div><span class="w-text-text-label">{% trans 'Go-live:' %}</span> {{ draft_go_live_at }}</div>
<div><span class="w-text-grey-600">{% trans 'Go-live:' %}</span> {{ draft_go_live_at }}</div>
{% endif %}
{% if draft_expire_at %}
<div><span class="w-text-text-label">{% trans 'Expiry:' %}</span> {{ draft_expire_at }}</div>
<div><span class="w-text-grey-600">{% trans 'Expiry:' %}</span> {{ draft_expire_at }}</div>
{% endif %}
{% endif %}
</div>
{% if show_schedule_publishing_toggle and not lock_context.locked %}
{% trans 'Edit schedule' as edit_schedule_text %}
{% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-text-link-default hover:w-text-text-link-hover w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %}
{% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-secondary hover:w-text-secondary-400 w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %}
{% endif %}
</div>
</div>

Wyświetl plik

@ -405,19 +405,19 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# Should show the draft go_live_at and expire_at under the "Once published" label
self.assertContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -498,13 +498,13 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# and should be in the user's timezone
self.assertContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
count=1,
)
self.assertContains(
response,
'<span class="w-text-text-label">Go-live:</span> March 20, 2022, 6 a.m.',
'<span class="w-text-grey-600">Go-live:</span> March 20, 2022, 6 a.m.',
html=True,
count=1,
)
@ -760,18 +760,18 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -924,18 +924,18 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -1099,7 +1099,7 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# Should still show the active expire_at in the live object
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -1107,19 +1107,19 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# Should also show the draft go_live_at and expire_at under the "Once published" label
self.assertContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(new_expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(new_expire_at)}',
html=True,
count=1,
)
@ -1210,25 +1210,25 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# override the existing expire_at when it goes live
self.assertNotContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
)
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(new_expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(new_expire_at)}',
html=True,
count=1,
)
@ -1313,7 +1313,7 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# unpublished (expired) -> published (scheduled) -> unpublished (expired again)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -1321,18 +1321,18 @@ class TestPageEdit(WagtailTestUtils, TestCase):
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(new_expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(new_expire_at)}',
html=True,
count=1,
)

Wyświetl plik

@ -2095,19 +2095,19 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# Should show the draft go_live_at and expire_at under the "Once published" label
self.assertContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -2240,18 +2240,18 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -2415,18 +2415,18 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -2597,7 +2597,7 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# Should still show the active expire_at in the live object
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -2605,19 +2605,19 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# Should also show the draft go_live_at and expire_at under the "Once published" label
self.assertContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(new_expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(new_expire_at)}',
html=True,
count=1,
)
@ -2711,25 +2711,25 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# override the existing expire_at when it goes live
self.assertNotContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
)
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(new_expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(new_expire_at)}',
html=True,
count=1,
)
@ -2825,7 +2825,7 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# unpublished (expired) -> published (scheduled) -> unpublished (expired again)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(expire_at)}',
html=True,
count=1,
)
@ -2833,18 +2833,18 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView):
# Should show the go_live_at and expire_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(go_live_at)}',
html=True,
count=1,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Expiry:</span> {rendered_timestamp(new_expire_at)}',
f'<span class="w-text-grey-600">Expiry:</span> {rendered_timestamp(new_expire_at)}',
html=True,
count=1,
)
@ -2905,13 +2905,13 @@ class TestScheduledForPublishLock(BaseTestSnippetEditView):
# Should show the go_live_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(self.go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(self.go_live_at)}',
html=True,
count=1,
)
@ -2972,13 +2972,13 @@ class TestScheduledForPublishLock(BaseTestSnippetEditView):
# Should show the go_live_at without the "Once published" label
self.assertNotContains(
response,
'<div class="w-label-3">Once published:</div>',
'<div class="w-label-3 w-text-grey-600">Once published:</div>',
html=True,
)
self.assertContains(
response,
f'<span class="w-text-text-label">Go-live:</span> {rendered_timestamp(self.go_live_at)}',
f'<span class="w-text-grey-600">Go-live:</span> {rendered_timestamp(self.go_live_at)}',
html=True,
count=1,
)