diff --git a/app/assets/javascripts/attachments/AttachmentsWidget.js b/app/assets/javascripts/attachments/AttachmentsWidget.js index d6b359163d..fd77762e02 100644 --- a/app/assets/javascripts/attachments/AttachmentsWidget.js +++ b/app/assets/javascripts/attachments/AttachmentsWidget.js @@ -252,7 +252,7 @@ export const AttachmentsWidget = ({ + + +{% endmacro %} diff --git a/app/templates/views/storybook/indicator.html b/app/templates/views/storybook/indicator.html index a4b63971c2..45e9f28da4 100644 --- a/app/templates/views/storybook/indicator.html +++ b/app/templates/views/storybook/indicator.html @@ -2,18 +2,19 @@ {% from "components/badge.html" import badge %} {% from "components/task-shortcut.html" import task_shortcut %} {% from 'components/remaining-messages.html' import remaining_messages with context %} +{% from 'components/new-feature.html' import new_feature %} {% block maincolumn_content %} -
Indicator component examples
+
Indicator and new feature banner

The indicator component wraps any element and displays a badge in the corner.

Button with "New" Badge

-
+
{{ indicator('', badge('New', variant='blue')) }}

Code

-
+
{% raw %}
 {{ indicator(
     '<button type="button" class="button">Inbox</button>',
@@ -24,7 +25,7 @@ 

Code

Task Shortcut with Badge

-
+
{{ indicator( task_shortcut( description=_("Start here to write a new message."), @@ -35,7 +36,7 @@

Task Shortcut with Badge

badge('New', variant='blue') ) }}

Code

-
+
{% raw %}
 {{ indicator(
     task_shortcut(
@@ -49,4 +50,31 @@ 

Code

{% endraw %}
+ +

New Feature Banner

+

The feature banner sits within the page flow. This keeps content visible and accessible.

+

You can optionally anchor the banner to an element using CSS. A caret points to the anchor, creating a visual connection..

+
+
+ + {{ new_feature( + title="You can do something with this new thing", + cta="About this new thing", + cta_link="/new-features", + anchored_to="new-feature-example" + ) }} +
+

Code

+
+
{% raw %}
+<button type="button" class="button [anchor-name:--new-feature-example]" id="new-feature-example">Anchoring element</button>
+{{ new_feature(
+    title=_("You can do something with this new thing"),
+    cta=_("About this new thing"),
+    cta_link="/new-features",
+    anchored_to="new-feature-example"
+) }}
+{% endraw %}
+
+
{% endblock %} diff --git a/app/templates/views/storybook/storybook-menu.html b/app/templates/views/storybook/storybook-menu.html index 53cbb11709..365176d8ac 100644 --- a/app/templates/views/storybook/storybook-menu.html +++ b/app/templates/views/storybook/storybook-menu.html @@ -47,7 +47,7 @@ 'path': 'focus_management/full-form' }, { - 'name': 'Indicator', + 'name': 'Indicator and new feature banner', 'path': 'indicator' }, { diff --git a/app/templates/views/templates/template.html b/app/templates/views/templates/template.html index 7a007e2995..98ef59ec13 100644 --- a/app/templates/views/templates/template.html +++ b/app/templates/views/templates/template.html @@ -7,6 +7,7 @@ {% from "components/textbox.html" import textbox %} {% from "components/api-key.html" import api_key %} {% from "components/page-header.html" import page_header %} +{% from "components/new-feature.html" import new_feature %} {% block service_page_title %} {{ page_title_folder_path(current_service.get_template_path(template._template)) }} @@ -90,7 +91,7 @@ {% endif %}
-
+
{% if file_attachments_enabled_for_service %} {% if template.template_type == 'email' and current_service.has_permission("upload_document") and current_user.has_permissions('manage_templates') %} {{ attachments_widget( @@ -102,6 +103,12 @@ url_for('main.template_attachment_status', service_id=current_service.id, template_id=template.id), url_for('main.download_template_attachment', service_id=current_service.id, template_id=template.id) ) }} + {{ new_feature( + title=_("Upload attachments without the API"), + cta=_("About file attachments"), + cta_link="/new-features", + anchored_to="new-feature-attachments" + ) }} {% else %}

{{ _('Attached files') }}

{% if current_user.has_permissions('manage_service') %} diff --git a/app/translations/csv/en_base.csv b/app/translations/csv/en_base.csv index 649c5bb944..e867e852ae 100644 --- a/app/translations/csv/en_base.csv +++ b/app/translations/csv/en_base.csv @@ -10,4 +10,5 @@ "many {selection} of {total} folders","{selection} of {total} folders" "many {selection} of {total} team members","{selection} of {total} team members" "many left today","left today" -"text-message-parts","text message parts" \ No newline at end of file +"text-message-parts","text message parts" +"Dismiss","Hide" \ No newline at end of file diff --git a/app/translations/csv/fr.csv b/app/translations/csv/fr.csv index a4fa73c05d..11c27a9b5a 100644 --- a/app/translations/csv/fr.csv +++ b/app/translations/csv/fr.csv @@ -2506,3 +2506,6 @@ "Attachment","Pièce jointe" "files attached","fichiers joints" "Files attached to this template","Fichiers joints à ce gabarit" +"Upload attachments without the API","Téléverser des pièces jointes sans l’API" +"About file attachments","À propos des pièces jointes" +"Dismiss","Ignorer" \ No newline at end of file