A platform for community discussion. Free, open, simple.
REFACTOR: consolidate empty states, add invite variant (#33455)
Kris6bcb38f410fb
diff --git a/app/assets/javascripts/discourse/app/components/empty-state.gjs b/app/assets/javascripts/discourse/app/components/empty-state.gjsindex 4587a308f41..ff986859126 100644--- a/app/assets/javascripts/discourse/app/components/empty-state.gjs+++ b/app/assets/javascripts/discourse/app/components/empty-state.gjs@@ -1,10 +1,56 @@+import { concat } from "@ember/helper";+import { or } from "truth-helpers";+import DButton from "discourse/components/d-button";+import icon from "discourse/helpers/d-icon";+const EmptyState = <template>- <div class="empty-state-container">+ <div+ class="empty-state__container+ {{if @identifier (concat '--' @identifier)}}+ {{if @svgContent '--with-image' '--text-only'}}"+ ><div class="empty-state">- <span data-test-title class="empty-state-title">{{@title}}</span>- <div class="empty-state-body">- <p data-test-body>{{@body}}</p>- </div>+ {{#if @svgContent}}+ <div class="empty-state__image">+ {{@svgContent}}+ </div>+ {{/if}}++ {{#if @title}}+ <div data-test-title class="empty-state__title">{{@title}}</div>+ {{/if}}++ {{#if @body}}+ <div class="empty-state__body">+ <p data-test-body>{{@body}}</p>+ </div>+ {{/if}}++ {{#if @ctaLabel}}+ <div class="empty-state__cta">+ <DButton+ @action={{@ctaAction}}+ @href={{@ctaHref}}+ @route={{@ctaRoute}}+ @translatedLabel={{@ctaLabel}}+ @icon={{@ctaIcon}}+ class="btn-primary"+ />+ </div>+ {{/if}}++ {{#if (or @tipText (has-block "tip"))}}+ <div class="empty-state__tip">+ {{#if @tipIcon}}+ {{icon @tipIcon}}+ {{/if}}+ {{#if (has-block "tip")}}+ {{yield to="tip"}}+ {{else}}+ {{@tipText}}+ {{/if}}+ </div>+ {{/if}}</div></div></template>;diff --git a/app/assets/javascripts/discourse/app/components/empty-topic-filter.gjs b/app/assets/javascripts/discourse/app/components/empty-topic-filter.gjsindex 3bb73a12a3c..dda84e49c0a 100644--- a/app/assets/javascripts/discourse/app/components/empty-topic-filter.gjs+++ b/app/assets/javascripts/discourse/app/components/empty-topic-filter.gjs@@ -1,9 +1,9 @@import Component from "@glimmer/component";import { service } from "@ember/service";-import DButton from "discourse/components/d-button";+import EmptyState from "discourse/components/empty-state";+import SvgDocumentsCheckmark from "discourse/components/svg/documents-checkmark";import basePath from "discourse/helpers/base-path";import htmlSafe from "discourse/helpers/html-safe";-import { emojiUnescape } from "discourse/lib/text";import { i18n } from "discourse-i18n";export default class EmptyTopicFilter extends Component {@@ -22,310 +22,18 @@ export default class EmptyTopicFilter extends Component {}<template>- <div class="empty-topic-filter">-- <div class="empty-topic-filter__image">- <svg- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 285 248"- fill="none"- >- <g id="no-unreads">- <g id="rocket">- <path- id="rocket-path"- d="M83.267 188.281C67.7477 172.762 77.7879 123.902 56.7848 123.902C17.4326 130.461 -8.19523 61.6111 6.6608 29.3877"- stroke="var(--tertiary)"- stroke-width="1.82636"- stroke-linecap="round"- stroke-dasharray="2.74 3.65"- />- <g id="rocket_2">- <rect- x="1"- y="7.34277"- width="21.9163"- height="21.9163"- rx="10.9582"- transform="rotate(-16.8237 1 7.34277)"- fill="var(--primary-low)"- />- <path- id="icon"- d="M12.0983 20.9751L10.4441 20.089C10.0172 19.8604 9.74562 19.4058 9.71987 18.877C9.73129 18.4711 9.75891 17.9708 9.79033 17.3352L5.48813 18.6361C5.11937 18.7476 4.74203 18.6828 4.47902 18.4046C4.18743 18.1797 4.07593 17.8109 4.18169 17.4212L5.22206 13.1713C5.48216 12.1089 6.29207 11.2379 7.3164 10.9282L10.7172 9.89989C10.7496 9.71122 10.7944 9.56352 10.8677 9.36246C12.7285 3.38879 17.6776 1.71344 20.8012 1.39505C21.3176 1.32833 21.7979 1.58559 22.0285 2.05249C23.4941 4.82912 24.8417 9.87742 20.8998 14.7363C20.7731 14.9088 20.634 15.0403 20.5359 15.1594L21.5641 18.5602C21.8739 19.5845 21.5976 20.7413 20.8572 21.5465L17.8958 24.7674C17.6176 25.0304 17.2612 25.1829 16.9124 25.0647C16.5351 24.9999 16.2721 24.7217 16.1606 24.3529L14.835 19.9688C14.2823 20.3595 13.8402 20.6721 13.5086 20.9065C13.1074 21.2067 12.5376 21.2448 12.0983 20.9751ZM18.7518 9.25924C19.6532 8.98668 20.1801 8.06713 19.8952 7.12475C19.6226 6.22333 18.6621 5.70882 17.7607 5.98138C16.8183 6.26632 16.3448 7.21446 16.6173 8.11587C16.9023 9.05825 17.8094 9.54419 18.7518 9.25924Z"- fill="var(--tertiary)"- />- </g>- </g>- <g id="files">- <g id="bg-file">- <rect- id="Rectangle 18"- x="29.9023"- y="24.3738"- width="136.064"- height="162.546"- rx="1.36977"- transform="rotate(-7.6929 29.9023 24.3738)"- fill="var(--tertiary-100)"- stroke="var(--tertiary-high)"- stroke-width="0.913181"- />- <rect- id="Rectangle 19"- x="51.8054"- y="34.2859"- width="136.064"- height="162.546"- rx="1.36977"- transform="rotate(-5.70639 51.8054 34.2859)"- fill="var(--tertiary-100)"- stroke="var(--tertiary-high)"- stroke-width="0.913181"- />- </g>- <g id="top-file">- <g id="top-file-bg">- <path- id="Rectangle 20"- d="M89.1055 41.8417L204.031 50.6123C204.308 50.6335 204.572 50.7377 204.787 50.9109L204.875 50.9895L221.594 67.0239C221.851 67.2697 222 67.604 222.015 67.9549L222.012 68.1055L212.218 212.007C212.166 212.763 211.511 213.333 210.755 213.28L77.7588 203.98C77.0043 203.927 76.4358 203.273 76.4886 202.518L87.6353 43.1124L87.652 42.9726C87.763 42.3314 88.3142 41.8553 88.9647 41.8387L89.1055 41.8417Z"- fill="var(--secondary)"- stroke="var(--tertiary-high)"- stroke-width="0.913181"- />- <path- id="Vector 11"- d="M204.263 50.848L202.894 66.34L221.613 67.742"- stroke="var(--tertiary-high)"- stroke-width="0.913181"- />- </g>- <g id="lines">- <path- id="Line 9"- d="M97.8594 67.9902L169.124 72.9735"- stroke="var(--primary-low)"- stroke-width="4"- stroke-linecap="round"- />- <path- id="Line 10"- d="M96.0391 84.3369L185.541 90.5955"- stroke="var(--primary-low)"- stroke-width="4"- stroke-linecap="round"- />- <path- id="Line 14"- d="M92.3721 140.227L160.912 145.019"- stroke="var(--primary-low)"- stroke-width="4"- stroke-linecap="round"- />- <path- id="Line 11"- d="M95.1338 102.51L184.635 108.768"- stroke="var(--primary-low)"- stroke-width="4"- stroke-linecap="round"- />- <path- id="Line 15"- d="M93.3525 120.959L195.581 128.107"- stroke="var(--primary-low)"- stroke-width="4"- stroke-linecap="round"- />- </g>- </g>- </g>- <g id="overflow-text">- <path- id="Line 16"- d="M227.575 93.8076L272.466 96.9467"- stroke="var(--tertiary-100)"- stroke-width="4"- stroke-linecap="round"- />- <path- id="Line 17"- d="M225.76 111.087L282.621 115.063"- stroke="var(--tertiary-100)"- stroke-width="4"- stroke-linecap="round"- />- <path- id="Line 18"- d="M224.82 129.087L269.711 132.226"- stroke="var(--tertiary-100)"- stroke-width="4"- stroke-linecap="round"- />- <path- id="Star 2"- d="M268.849 136.566C268.849 136.566 270.219 139.757 271.588 141.225C273.066 142.809 275.698 143.415 275.698 143.415C275.698 143.415 273.066 144.11 271.588 145.694C270.219 147.163 268.849 150.264 268.849 150.264C268.849 150.264 267.479 147.163 266.109 145.694C264.632 144.11 262 143.415 262 143.415C262 143.415 264.848 142.809 266.326 141.225C267.695 139.757 268.849 136.566 268.849 136.566Z"- fill="var(--tertiary)"- />- <path- id="Star 3"- d="M237.62 77.0838C237.62 77.0838 239.486 78.8152 240.841 79.3924C242.303 80.015 244.247 79.6388 244.247 79.6388C244.247 79.6388 242.689 80.8868 242.17 82.3881C241.688 83.7799 241.692 86.2662 241.692 86.2662C241.692 86.2662 239.852 84.5943 238.497 84.0171C237.035 83.3945 235.065 83.7113 235.065 83.7113C235.065 83.7113 236.794 82.4584 237.313 80.9571C237.795 79.5653 237.62 77.0838 237.62 77.0838Z"- fill="var(--tertiary-high)"- />- <path- id="Star 4"- d="M279.086 132.585C279.086 132.585 279.014 134.343 279.319 135.314C279.649 136.362 280.719 137.214 280.719 137.214C280.719 137.214 279.364 136.956 278.342 137.357C277.394 137.729 276.09 138.848 276.09 138.848C276.09 138.848 276.142 137.13 275.837 136.159C275.508 135.112 274.456 134.218 274.456 134.218C274.456 134.218 275.891 134.564 276.913 134.163C277.861 133.791 279.086 132.585 279.086 132.585Z"- fill="var(--tertiary-high)"- />- </g>- <ellipse- id="shadow"- cx="141.254"- cy="241.246"- rx="95.4274"- ry="6.39227"- fill="var(--primary-low)"- />- <g id="star">- <g id="Group 18">- <g id="Group 17">- <line- id="Line 19"- x1="58.8772"- y1="199.759"- x2="56.0508"- y2="206.288"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- <line- id="Line 20"- x1="53.7239"- y1="211.666"- x2="50.8975"- y2="218.196"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- </g>- </g>- <g id="Group 21">- <g id="Group 17_2">- <line- id="Line 19_2"- x1="63.9768"- y1="205.522"- x2="57.361"- y2="208.141"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- <line- id="Line 20_2"- x1="51.9124"- y1="210.298"- x2="45.2966"- y2="212.916"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- </g>- </g>- <g id="Group 20">- <g id="Group 17_3">- <line- id="Line 19_3"- x1="51.1972"- y1="199.286"- x2="53.8159"- y2="205.902"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- <line- id="Line 20_3"- x1="55.9727"- y1="211.351"- x2="58.5914"- y2="217.966"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- </g>- </g>- <g id="Group 19">- <g id="Group 17_4">- <line- id="Line 19_4"- x1="45.4316"- y1="204.386"- x2="51.9614"- y2="207.212"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- <line- id="Line 20_4"- x1="57.3388"- y1="209.539"- x2="63.8685"- y2="212.365"- stroke="var(--tertiary)"- stroke-width="0.913181"- />- </g>- </g>- </g>- <g id="checkmark">- <path- id="Vector 13"- d="M219.714 224.808C230.759 222.047 241.672 204.355 243.703 192.847C244.616 173.67 240.051 162.255 218.591 151.754"- stroke="var(--tertiary)"- stroke-width="1.82636"- stroke-linecap="round"- stroke-dasharray="2.74 3.65"- />- <g id="check">- <rect- x="182.457"- y="140.796"- width="73.0545"- height="73.0545"- rx="36.5272"- transform="rotate(21.1652 182.457 140.796)"- fill="var(--secondary)"- />- <path- id="icon_2"- d="M169.231 174.956C176.495 156.195 197.588 146.766 216.483 154.082C235.244 161.346 244.621 182.572 237.357 201.333C230.042 220.228 208.867 229.472 190.106 222.208C171.211 214.893 161.915 193.851 169.231 174.956ZM220.863 188.215C222.893 187.318 223.769 185.056 222.872 183.025C221.975 180.995 219.713 180.119 217.683 181.016L197.748 189.823L194.027 181.65C193.13 179.62 190.868 178.744 188.838 179.641C186.808 180.538 185.932 182.8 186.829 184.83L192.048 196.643C192.944 198.673 195.206 199.549 197.237 198.652L220.863 188.215Z"- fill="var(--tertiary)"- />- </g>- </g>- </g>- </svg>- </div>-- <div class="empty-topic-filter__text">- <p>{{this.educationText}}</p>- </div>-- <div class="empty-topic-filter__cta">- <DButton- @route="discovery.latest"- @label="topic.browse_latest_topics"- class="btn-primary"- />-- <div class="empty-topic-filter__preferences-hint">- {{htmlSafe (emojiUnescape ":bulb:")}}- {{htmlSafe- (i18n- "topics.none.education.topic_tracking_preferences"- basePath=(basePath)- )- }}- </div>- </div>- </div>+ <EmptyState+ @identifier="empty-topic-filter"+ @title={{this.educationText}}+ @ctaLabel={{i18n "topic.browse_latest_topics"}}+ @ctaRoute="discovery.latest"+ @tipIcon="circle-info"+ @tipText={{htmlSafe+ (i18n+ "topics.none.education.topic_tracking_preferences" basePath=(basePath)+ )+ }}+ @svgContent={{SvgDocumentsCheckmark}}+ /></template>}diff --git a/app/assets/javascripts/discourse/app/components/svg/documents-checkmark.gjs b/app/assets/javascripts/discourse/app/components/svg/documents-checkmark.gjsnew file mode 100644index 00000000000..f399d211744--- /dev/null+++ b/app/assets/javascripts/discourse/app/components/svg/documents-checkmark.gjs@@ -0,0 +1,278 @@+const SvgDocumentsCheckmark = <template>+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 285 248" fill="none">+ <g id="no-unreads">+ <g id="rocket">+ <path+ id="rocket-path"+ d="M83.267 188.281C67.7477 172.762 77.7879 123.902 56.7848 123.902C17.4326 130.461 -8.19523 61.6111 6.6608 29.3877"+ stroke="var(--tertiary)"+ stroke-width="1.82636"+ stroke-linecap="round"+ stroke-dasharray="2.74 3.65"+ />+ <g id="rocket_2">+ <rect+ x="1"+ y="7.34277"+ width="21.9163"+ height="21.9163"+ rx="10.9582"+ transform="rotate(-16.8237 1 7.34277)"+ fill="var(--primary-low)"+ />+ <path+ id="icon"+ d="M12.0983 20.9751L10.4441 20.089C10.0172 19.8604 9.74562 19.4058 9.71987 18.877C9.73129 18.4711 9.75891 17.9708 9.79033 17.3352L5.48813 18.6361C5.11937 18.7476 4.74203 18.6828 4.47902 18.4046C4.18743 18.1797 4.07593 17.8109 4.18169 17.4212L5.22206 13.1713C5.48216 12.1089 6.29207 11.2379 7.3164 10.9282L10.7172 9.89989C10.7496 9.71122 10.7944 9.56352 10.8677 9.36246C12.7285 3.38879 17.6776 1.71344 20.8012 1.39505C21.3176 1.32833 21.7979 1.58559 22.0285 2.05249C23.4941 4.82912 24.8417 9.87742 20.8998 14.7363C20.7731 14.9088 20.634 15.0403 20.5359 15.1594L21.5641 18.5602C21.8739 19.5845 21.5976 20.7413 20.8572 21.5465L17.8958 24.7674C17.6176 25.0304 17.2612 25.1829 16.9124 25.0647C16.5351 24.9999 16.2721 24.7217 16.1606 24.3529L14.835 19.9688C14.2823 20.3595 13.8402 20.6721 13.5086 20.9065C13.1074 21.2067 12.5376 21.2448 12.0983 20.9751ZM18.7518 9.25924C19.6532 8.98668 20.1801 8.06713 19.8952 7.12475C19.6226 6.22333 18.6621 5.70882 17.7607 5.98138C16.8183 6.26632 16.3448 7.21446 16.6173 8.11587C16.9023 9.05825 17.8094 9.54419 18.7518 9.25924Z"+ fill="var(--tertiary)"+ />+ </g>+ </g>+ <g id="files">+ <g id="bg-file">+ <rect+ id="Rectangle 18"+ x="29.9023"+ y="24.3738"+ width="136.064"+ height="162.546"+ rx="1.36977"+ transform="rotate(-7.6929 29.9023 24.3738)"+ fill="var(--tertiary-100)"+ stroke="var(--tertiary-high)"+ stroke-width="0.913181"+ />+ <rect+ id="Rectangle 19"+ x="51.8054"+ y="34.2859"+ width="136.064"+ height="162.546"+ rx="1.36977"+ transform="rotate(-5.70639 51.8054 34.2859)"+ fill="var(--tertiary-100)"+ stroke="var(--tertiary-high)"+ stroke-width="0.913181"+ />+ </g>+ <g id="top-file">+ <g id="top-file-bg">+ <path+ id="Rectangle 20"+ d="M89.1055 41.8417L204.031 50.6123C204.308 50.6335 204.572 50.7377 204.787 50.9109L204.875 50.9895L221.594 67.0239C221.851 67.2697 222 67.604 222.015 67.9549L222.012 68.1055L212.218 212.007C212.166 212.763 211.511 213.333 210.755 213.28L77.7588 203.98C77.0043 203.927 76.4358 203.273 76.4886 202.518L87.6353 43.1124L87.652 42.9726C87.763 42.3314 88.3142 41.8553 88.9647 41.8387L89.1055 41.8417Z"+ fill="var(--secondary)"+ stroke="var(--tertiary-high)"+ stroke-width="0.913181"+ />+ <path+ id="Vector 11"+ d="M204.263 50.848L202.894 66.34L221.613 67.742"+ stroke="var(--tertiary-high)"+ stroke-width="0.913181"+ />+ </g>+ <g id="lines">+ <path+ id="Line 9"+ d="M97.8594 67.9902L169.124 72.9735"+ stroke="var(--primary-low)"+ stroke-width="4"+ stroke-linecap="round"+ />+ <path+ id="Line 10"+ d="M96.0391 84.3369L185.541 90.5955"+ stroke="var(--primary-low)"+ stroke-width="4"+ stroke-linecap="round"+ />+ <path+ id="Line 14"+ d="M92.3721 140.227L160.912 145.019"+ stroke="var(--primary-low)"+ stroke-width="4"+ stroke-linecap="round"+ />+ <path+ id="Line 11"+ d="M95.1338 102.51L184.635 108.768"+ stroke="var(--primary-low)"+ stroke-width="4"+ stroke-linecap="round"+ />+ <path+ id="Line 15"+ d="M93.3525 120.959L195.581 128.107"+ stroke="var(--primary-low)"+ stroke-width="4"+ stroke-linecap="round"+ />+ </g>+ </g>+ </g>+ <g id="overflow-text">+ <path+ id="Line 16"+ d="M227.575 93.8076L272.466 96.9467"+ stroke="var(--tertiary-100)"+ stroke-width="4"+ stroke-linecap="round"+ />+ <path+ id="Line 17"+ d="M225.76 111.087L282.621 115.063"+ stroke="var(--tertiary-100)"+ stroke-width="4"+ stroke-linecap="round"+ />+ <path+ id="Line 18"+ d="M224.82 129.087L269.711 132.226"+ stroke="var(--tertiary-100)"+ stroke-width="4"+ stroke-linecap="round"+ />+ <path+ id="Star 2"+ d="M268.849 136.566C268.849 136.566 270.219 139.757 271.588 141.225C273.066 142.809 275.698 143.415 275.698 143.415C275.698 143.415 273.066 144.11 271.588 145.694C270.219 147.163 268.849 150.264 268.849 150.264C268.849 150.264 267.479 147.163 266.109 145.694C264.632 144.11 262 143.415 262 143.415C262 143.415 264.848 142.809 266.326 141.225C267.695 139.757 268.849 136.566 268.849 136.566Z"+ fill="var(--tertiary)"+ />+ <path+ id="Star 3"+ d="M237.62 77.0838C237.62 77.0838 239.486 78.8152 240.841 79.3924C242.303 80.015 244.247 79.6388 244.247 79.6388C244.247 79.6388 242.689 80.8868 242.17 82.3881C241.688 83.7799 241.692 86.2662 241.692 86.2662C241.692 86.2662 239.852 84.5943 238.497 84.0171C237.035 83.3945 235.065 83.7113 235.065 83.7113C235.065 83.7113 236.794 82.4584 237.313 80.9571C237.795 79.5653 237.62 77.0838 237.62 77.0838Z"+ fill="var(--tertiary-high)"+ />+ <path+ id="Star 4"+ d="M279.086 132.585C279.086 132.585 279.014 134.343 279.319 135.314C279.649 136.362 280.719 137.214 280.719 137.214C280.719 137.214 279.364 136.956 278.342 137.357C277.394 137.729 276.09 138.848 276.09 138.848C276.09 138.848 276.142 137.13 275.837 136.159C275.508 135.112 274.456 134.218 274.456 134.218C274.456 134.218 275.891 134.564 276.913 134.163C277.861 133.791 279.086 132.585 279.086 132.585Z"+ fill="var(--tertiary-high)"+ />+ </g>+ <ellipse+ id="shadow"+ cx="141.254"+ cy="241.246"+ rx="95.4274"+ ry="6.39227"+ fill="var(--primary-low)"+ />+ <g id="star">+ <g id="Group 18">+ <g id="Group 17">+ <line+ id="Line 19"+ x1="58.8772"+ y1="199.759"+ x2="56.0508"+ y2="206.288"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ <line+ id="Line 20"+ x1="53.7239"+ y1="211.666"+ x2="50.8975"+ y2="218.196"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ </g>+ </g>+ <g id="Group 21">+ <g id="Group 17_2">+ <line+ id="Line 19_2"+ x1="63.9768"+ y1="205.522"+ x2="57.361"+ y2="208.141"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ <line+ id="Line 20_2"+ x1="51.9124"+ y1="210.298"+ x2="45.2966"+ y2="212.916"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ </g>+ </g>+ <g id="Group 20">+ <g id="Group 17_3">+ <line+ id="Line 19_3"+ x1="51.1972"+ y1="199.286"+ x2="53.8159"+ y2="205.902"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ <line+ id="Line 20_3"+ x1="55.9727"+ y1="211.351"+ x2="58.5914"+ y2="217.966"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ </g>+ </g>+ <g id="Group 19">+ <g id="Group 17_4">+ <line+ id="Line 19_4"+ x1="45.4316"+ y1="204.386"+ x2="51.9614"+ y2="207.212"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ <line+ id="Line 20_4"+ x1="57.3388"+ y1="209.539"+ x2="63.8685"+ y2="212.365"+ stroke="var(--tertiary)"+ stroke-width="0.913181"+ />+ </g>+ </g>+ </g>+ <g id="checkmark">+ <path+ id="Vector 13"+ d="M219.714 224.808C230.759 222.047 241.672 204.355 243.703 192.847C244.616 173.67 240.051 162.255 218.591 151.754"+ stroke="var(--tertiary)"+ stroke-width="1.82636"+ stroke-linecap="round"+ stroke-dasharray="2.74 3.65"+ />+ <g id="check">+ <rect+ x="182.457"+ y="140.796"+ width="73.0545"+ height="73.0545"+ rx="36.5272"+ transform="rotate(21.1652 182.457 140.796)"+ fill="var(--secondary)"+ />+ <path+ id="icon_2"+ d="M169.231 174.956C176.495 156.195 197.588 146.766 216.483 154.082C235.244 161.346 244.621 182.572 237.357 201.333C230.042 220.228 208.867 229.472 190.106 222.208C171.211 214.893 161.915 193.851 169.231 174.956ZM220.863 188.215C222.893 187.318 223.769 185.056 222.872 183.025C221.975 180.995 219.713 180.119 217.683 181.016L197.748 189.823L194.027 181.65C193.13 179.62 190.868 178.744 188.838 179.641C186.808 180.538 185.932 182.8 186.829 184.83L192.048 196.643C192.944 198.673 195.206 199.549 197.237 198.652L220.863 188.215Z"+ fill="var(--tertiary)"+ />+ </g>+ </g>+ </g>+ </svg>+</template>;++export default SvgDocumentsCheckmark;diff --git a/app/assets/javascripts/discourse/app/components/svg/envelope-zero.gjs b/app/assets/javascripts/discourse/app/components/svg/envelope-zero.gjsnew file mode 100644index 00000000000..ad037bed323--- /dev/null+++ b/app/assets/javascripts/discourse/app/components/svg/envelope-zero.gjs@@ -0,0 +1,60 @@+const SvgEnvelopeZero = <template>+ <svg+ width="259"+ height="211"+ viewBox="0 0 259 211"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M115.981 30.2207C121.745 26.3782 129.255 26.3782 135.019 30.2207L194.898 70.1406C196.289 71.0679 197.125 72.6291 197.125 74.3008C197.125 74.3008 197.125 75.4375 197.125 76.2187C197.125 77 194.5 78.5 193 79.5C191.5 80.5 190.5 81.5 189 82.1875C187.5 82.875 142 111.224 142 111.224C142 111.224 142 111.224 138.5 109C133.5 104.5 124.5 103.5 124.5 103.5C124.5 103.5 118.5 104.5 113 109L110 110.5L108.918 110.257C106.328 109.236 103.825 107.976 101.446 106.483L62.6943 82.1602C61 81 59.5 80 57.5 79C56.1016 78 55 77.5 53.9121 76.6484L53.875 76.625L53.9102 76.6357C53.8892 76.5142 53.875 76.3767 53.875 76.2187V74.3008C53.8751 72.6291 54.7106 71.0679 56.1016 70.1406L115.981 30.2207Z"+ fill="var(--tertiary-50)"+ />+ <path+ d="M196.5 74.3008C196.5 72.8381 195.769 71.4725 194.552 70.6611L134.672 30.7412C129.118 27.0385 121.882 27.0385 116.328 30.7412L56.4482 70.6611C55.2313 71.4725 54.5 72.8381 54.5 74.3008V149.219C54.5 150.636 55.0633 151.995 56.0654 152.997C57.0676 153.999 58.4265 154.563 59.8438 154.563H191.156C192.574 154.563 193.932 153.999 194.935 152.997C195.937 151.995 196.5 150.636 196.5 149.219V74.3008ZM197.75 149.219C197.75 150.968 197.055 152.644 195.818 153.881C194.582 155.117 192.905 155.813 191.156 155.813H59.8438C58.095 155.813 56.4182 155.117 55.1816 153.881C53.9451 152.644 53.25 150.968 53.25 149.219V74.3008C53.25 72.4202 54.1902 70.6643 55.7549 69.6211L115.635 29.7012C121.609 25.7185 129.391 25.7185 135.365 29.7012L195.245 69.6211C196.81 70.6643 197.75 72.4202 197.75 74.3008V149.219Z"+ fill="var(--tertiary-medium)"+ />+ <path+ d="M109.83 110.469L109.17 111.531L53.6699 77.0312L54.3301 75.9688L109.83 110.469Z"+ fill="var(--tertiary-medium)"+ />+ <path+ d="M141.67 110.469L142.33 111.531L197.5 77.2218L197.17 75.9688L141.67 110.469Z"+ fill="var(--tertiary-medium)"+ />+ <path+ d="M54.2295 149.921C53.9452 150.116 53.556 150.045 53.3604 149.761C53.1649 149.476 53.2365 149.087 53.5205 148.892L115.983 105.955C118.784 104.03 122.102 103 125.5 103C128.898 103 132.216 104.03 135.017 105.955L197.479 148.892L197.575 148.973C197.777 149.182 197.811 149.512 197.64 149.761C197.468 150.009 197.149 150.096 196.882 149.982L196.771 149.921L134.309 106.985C131.717 105.204 128.645 104.25 125.5 104.25C122.355 104.25 119.283 105.204 116.691 106.985L54.2295 149.921Z"+ fill="var(--tertiary-medium)"+ />+ <path+ d="M81.9307 169.438C82.4817 169.402 82.9574 169.82 82.9932 170.371C83.0289 170.922 82.6107 171.398 82.0596 171.434C80.0846 171.562 78.1692 171.623 76.3115 171.623C75.7592 171.623 75.3117 171.175 75.3115 170.623C75.3114 170.071 75.7584 169.623 76.3105 169.623C78.1253 169.623 79.9983 169.563 81.9307 169.438ZM65.1035 168.848L66.4619 169.027C67.8328 169.197 69.2431 169.334 70.6943 169.434C71.2452 169.471 71.6616 169.948 71.624 170.499C71.5862 171.05 71.1086 171.467 70.5576 171.429C69.0695 171.327 67.6226 171.187 66.2158 171.013L64.8232 170.827L64.7227 170.808C64.2305 170.686 63.901 170.21 63.9736 169.697C64.0463 169.185 64.4954 168.818 65.002 168.838L65.1035 168.848ZM93.3965 168.775L93.7021 169.728C92.5713 170.09 91.5475 170.351 90.6523 170.488C89.6865 170.637 88.7329 170.77 87.792 170.888C87.244 170.956 86.7444 170.567 86.6758 170.02C86.6072 169.472 86.9959 168.972 87.5439 168.903C88.4659 168.788 89.4004 168.657 90.3477 168.512C91.1043 168.395 92.0207 168.166 93.0918 167.822L93.3965 168.775ZM52.8779 167.119C53.0258 166.623 53.5245 166.327 54.0225 166.422L54.1221 166.446L55.4355 166.825C56.7644 167.195 58.1412 167.54 59.5674 167.852C60.1069 167.97 60.4489 168.503 60.3311 169.042C60.2204 169.548 59.7449 169.88 59.2412 169.822L59.1406 169.806L57.6934 169.475C56.7394 169.247 55.808 169.004 54.8984 168.751L53.5508 168.363L53.4541 168.329C52.9855 168.136 52.7301 167.615 52.8779 167.119ZM93.0918 167.822C93.6175 167.654 94.18 167.944 94.3486 168.47C94.5171 168.996 94.228 169.559 93.7021 169.728L93.0918 167.822ZM104.113 163.059C104.608 162.813 105.208 163.014 105.454 163.509C105.7 164.003 105.498 164.604 105.004 164.85C103.026 165.833 101.176 166.71 99.4736 167.465C98.9688 167.689 98.3781 167.461 98.1543 166.956C97.9308 166.451 98.1585 165.861 98.6631 165.637C100.332 164.897 102.155 164.032 104.113 163.059ZM42.2676 162.997C42.48 162.525 43.0141 162.298 43.4951 162.458L43.5898 162.495L44.833 163.044C45.6745 163.408 46.5425 163.769 47.4375 164.124L48.7998 164.651L48.8936 164.692C49.3475 164.918 49.5663 165.455 49.3838 165.939C49.1891 166.456 48.6116 166.717 48.0947 166.522C46.678 165.989 45.3267 165.437 44.0381 164.879L42.7695 164.319L42.6787 164.272C42.2399 164.019 42.0555 163.469 42.2676 162.997ZM114.842 157.405C115.326 157.14 115.933 157.317 116.199 157.801C116.465 158.285 116.289 158.892 115.805 159.158C113.961 160.171 112.179 161.135 110.466 162.041L110.373 162.084C109.903 162.275 109.356 162.082 109.114 161.624C108.856 161.136 109.042 160.531 109.53 160.272C111.233 159.372 113.006 158.414 114.842 157.405ZM32.084 157.896C32.3338 157.403 32.9353 157.206 33.4277 157.456C34.2165 157.856 35.0139 158.268 35.8486 158.699L38.4951 160.053L38.584 160.104C39.0112 160.376 39.1706 160.934 38.9375 161.397C38.7044 161.859 38.1616 162.062 37.6885 161.881L37.5947 161.839L34.9316 160.477L32.5234 159.24L32.4346 159.189C32.0078 158.916 31.8498 158.357 32.084 157.896ZM25 154.5C25.9792 154.5 27.0158 154.724 28.0967 155.083C28.6208 155.257 28.9045 155.824 28.7305 156.348C28.5564 156.871 27.9907 157.155 27.4668 156.981C26.4968 156.659 25.6856 156.5 25 156.5C24.4477 156.5 24 156.052 24 155.5C24 154.948 24.4477 154.5 25 154.5ZM125.434 151.439C125.912 151.164 126.524 151.329 126.799 151.808C127.074 152.287 126.909 152.898 126.43 153.173C124.626 154.209 122.857 155.218 121.129 156.192C120.648 156.464 120.038 156.294 119.767 155.813C119.495 155.331 119.665 154.722 120.146 154.45C121.869 153.479 123.634 152.473 125.434 151.439ZM135.934 145.327C136.41 145.047 137.023 145.207 137.303 145.683C137.583 146.159 137.424 146.772 136.948 147.052C135.179 148.092 133.428 149.117 131.702 150.122C131.225 150.4 130.613 150.238 130.335 149.761C130.057 149.284 130.219 148.671 130.696 148.394C132.419 147.39 134.166 146.367 135.934 145.327ZM142.185 143.961C141.709 144.242 141.096 144.085 140.814 143.61C140.533 143.135 140.691 142.522 141.166 142.24L142.185 143.961ZM146.483 139.09C146.943 138.876 147.499 139.041 147.764 139.486C148.046 139.961 147.89 140.575 147.415 140.857L142.185 143.961L141.166 142.24C142.896 141.216 144.64 140.18 146.394 139.138L146.483 139.09ZM156.932 132.865C157.391 132.651 157.947 132.815 158.212 133.26C158.495 133.734 158.34 134.348 157.865 134.631L152.642 137.745C152.167 138.028 151.553 137.873 151.271 137.398C150.988 136.924 151.143 136.31 151.617 136.027C153.355 134.992 155.098 133.953 156.842 132.913L156.932 132.865ZM167.296 126.69C167.771 126.409 168.384 126.566 168.666 127.041C168.948 127.516 168.791 128.129 168.316 128.411C166.581 129.441 164.837 130.477 163.09 131.518C162.615 131.8 162.001 131.645 161.719 131.17C161.436 130.695 161.592 130.081 162.066 129.799C163.815 128.758 165.559 127.721 167.296 126.69ZM177.775 120.51C178.252 120.231 178.865 120.392 179.144 120.868C179.423 121.345 179.263 121.957 178.786 122.236L173.548 125.315C173.072 125.596 172.459 125.438 172.179 124.962C171.898 124.486 172.056 123.874 172.531 123.593C174.294 122.553 176.043 121.524 177.775 120.51ZM188.392 114.375C188.855 114.169 189.407 114.344 189.664 114.794C189.938 115.274 189.771 115.885 189.291 116.158L186.683 117.652C185.806 118.156 184.923 118.666 184.033 119.181C183.555 119.457 182.943 119.294 182.666 118.816C182.39 118.339 182.553 117.727 183.031 117.45C184.814 116.418 186.573 115.407 188.301 114.421L188.392 114.375ZM198.957 108.47C199.442 108.206 200.05 108.385 200.313 108.87C200.577 109.355 200.398 109.963 199.913 110.227L197.288 111.665C196.401 112.155 195.501 112.655 194.591 113.164L194.499 113.209C194.034 113.41 193.482 113.231 193.229 112.779C192.96 112.297 193.133 111.688 193.615 111.418L196.321 109.914C197.212 109.423 198.091 108.941 198.957 108.47ZM209.876 102.794C210.351 102.618 210.892 102.827 211.12 103.292C211.363 103.788 211.159 104.387 210.663 104.63L209.36 105.275C208.04 105.935 206.668 106.637 205.25 107.378L205.157 107.421C204.687 107.609 204.14 107.414 203.9 106.955C203.645 106.466 203.835 105.861 204.324 105.605L205.736 104.873C207.133 104.153 208.483 103.472 209.781 102.835L209.876 102.794ZM218.132 99.0703C218.645 98.8671 219.226 99.1186 219.43 99.6319C219.633 100.145 219.381 100.726 218.868 100.93C217.996 101.276 217.073 101.663 216.103 102.089L216.007 102.125C215.524 102.281 214.993 102.048 214.785 101.574C214.563 101.069 214.793 100.479 215.299 100.257C216.288 99.8229 217.234 99.4264 218.132 99.0703Z"+ fill="var(--tertiary)"+ />+ <path+ d="M125 190C178.019 190 221 186.866 221 183C221 179.134 178.019 176 125 176C71.9807 176 29 179.134 29 183C29 186.866 71.9807 190 125 190Z"+ fill="var(--primary-low)"+ />+ <path+ d="M240.118 90.4745L232.711 100.228C232.547 100.47 232.268 100.618 231.967 100.621C231.812 100.603 231.656 100.585 231.502 100.501C231.4 100.446 231.31 100.365 231.235 100.258L228.816 97.2548L226.452 98.4951C226.253 98.6191 226.031 98.5988 225.852 98.5015C225.569 98.3487 225.464 97.9929 225.617 97.7107L226.951 95.2488C227.061 95.0436 227.21 94.8919 227.381 94.8192L236.863 90.6675L225.642 93.3786L223.597 90.8447C223.384 90.5636 223.318 90.196 223.499 89.8626C223.668 89.4898 223.96 89.3166 224.326 89.3157L239.358 89.0008C239.698 88.9859 240.058 89.1804 240.217 89.4988C240.376 89.8173 240.338 90.1945 240.118 90.4745Z"+ fill="var(--tertiary)"+ />+ <path+ d="M169 63.8334C178.389 63.8334 186 55.588 186 45.4167C186 35.2454 178.389 27 169 27C159.611 27 152 35.2454 152 45.4167C152 55.588 159.611 63.8334 169 63.8334Z"+ fill="var(--primary-low)"+ />+ <path+ d="M168.883 35.2708C170.963 35.2708 172.589 36.013 173.761 37.4974C175.157 39.2552 175.855 42.1702 175.855 46.2425C175.855 50.305 175.152 53.2249 173.746 55.0023C172.584 56.4671 170.963 57.1995 168.883 57.1995C166.793 57.1995 165.108 56.3987 163.829 54.7972C162.55 53.1859 161.91 50.3196 161.91 46.1985C161.91 42.1556 162.613 39.2454 164.02 37.4681C165.182 36.0032 166.803 35.2708 168.883 35.2708ZM168.883 38.6839C168.385 38.6839 167.94 38.845 167.55 39.1673C167.159 39.4798 166.856 40.0462 166.642 40.8665C166.358 41.931 166.217 43.723 166.217 46.2425C166.217 48.762 166.344 50.4954 166.598 51.4427C166.852 52.3802 167.169 53.0052 167.55 53.3177C167.94 53.6302 168.385 53.7864 168.883 53.7864C169.381 53.7864 169.825 53.6302 170.216 53.3177C170.606 52.9954 170.909 52.4241 171.124 51.6038C171.407 50.5491 171.549 48.762 171.549 46.2425C171.549 43.723 171.422 41.9944 171.168 41.0569C170.914 40.1097 170.592 39.4798 170.201 39.1673C169.82 38.845 169.381 38.6839 168.883 38.6839Z"+ fill="var(--primary)"+ />+ <path+ d="M56.849 45C56.849 45 58.219 48.191 59.588 49.659C61.066 51.243 63.698 51.849 63.698 51.849C63.698 51.849 61.066 52.544 59.588 54.128C58.219 55.597 56.849 58.698 56.849 58.698C56.849 58.698 55.479 55.597 54.109 54.128C52.632 52.544 50 51.849 50 51.849C50 51.849 52.848 51.243 54.326 49.659C55.695 48.191 56.849 45 56.849 45Z"+ fill="var(--tertiary)"+ />+ <path+ d="M206.01 140.816C206.01 140.816 206.826 142.375 207.576 143.063C208.386 143.806 209.738 144.009 209.738 144.009C209.738 144.009 208.436 144.463 207.751 145.321C207.116 146.117 206.547 147.738 206.547 147.738C206.547 147.738 205.733 146.225 204.983 145.536C204.175 144.794 202.816 144.546 202.816 144.546C202.816 144.546 204.232 144.128 204.917 143.27C205.552 142.473 206.01 140.816 206.01 140.816Z"+ fill="var(--tertiary)"+ />+ </svg>+</template>;++export default SvgEnvelopeZero;diff --git a/app/assets/javascripts/discourse/app/components/user-menu/bookmarks-list-empty-state.gjs b/app/assets/javascripts/discourse/app/components/user-menu/bookmarks-list-empty-state.gjsindex d2f4318b3d0..5ef2ac7ce2f 100644--- a/app/assets/javascripts/discourse/app/components/user-menu/bookmarks-list-empty-state.gjs+++ b/app/assets/javascripts/discourse/app/components/user-menu/bookmarks-list-empty-state.gjs@@ -1,18 +1,13 @@import { htmlSafe } from "@ember/template";+import EmptyState from "discourse/components/empty-state";import icon from "discourse/helpers/d-icon";import { i18n } from "discourse-i18n";const BookmarksListEmptyState = <template>- <div class="empty-state">- <span class="empty-state-title">- {{i18n "user.no_bookmarks_title"}}- </span>- <div class="empty-state-body">- <p>- {{htmlSafe (i18n "user.no_bookmarks_body" icon=(icon "bookmark"))}}- </p>- </div>- </div>+ <EmptyState+ @title={{i18n "user.no_bookmarks_title"}}+ @body={{htmlSafe (i18n "user.no_bookmarks_body" icon=(icon "bookmark"))}}+ /></template>;export default BookmarksListEmptyState;diff --git a/app/assets/javascripts/discourse/app/components/user-menu/items-list-empty-state.gjs b/app/assets/javascripts/discourse/app/components/user-menu/items-list-empty-state.gjsindex eaebebce479..eb07a2dbe49 100644--- a/app/assets/javascripts/discourse/app/components/user-menu/items-list-empty-state.gjs+++ b/app/assets/javascripts/discourse/app/components/user-menu/items-list-empty-state.gjs@@ -1,11 +1,8 @@+import EmptyState from "discourse/components/empty-state";import { i18n } from "discourse-i18n";const ItemsListEmptyState = <template>- <div class="empty-state">- <span class="empty-state-title">- {{i18n "user_menu.generic_no_items"}}- </span>- </div>+ <EmptyState @title={{i18n "user_menu.generic_no_items"}} /></template>;export default ItemsListEmptyState;diff --git a/app/assets/javascripts/discourse/app/components/user-menu/likes-list-empty-state.gjs b/app/assets/javascripts/discourse/app/components/user-menu/likes-list-empty-state.gjsindex 4aead8baf5f..31724d31936 100644--- a/app/assets/javascripts/discourse/app/components/user-menu/likes-list-empty-state.gjs+++ b/app/assets/javascripts/discourse/app/components/user-menu/likes-list-empty-state.gjs@@ -1,23 +1,18 @@import { htmlSafe } from "@ember/template";+import EmptyState from "discourse/components/empty-state";import getUrl from "discourse/helpers/get-url";import { i18n } from "discourse-i18n";const LikesListEmptyState = <template>- <div class="empty-state">- <span class="empty-state-title">- {{i18n "user.no_likes_title"}}- </span>- <div class="empty-state-body">- <p>- {{htmlSafe- (i18n- "user.no_likes_body"- preferencesUrl=(getUrl "/my/preferences/notifications")- )- }}- </p>- </div>- </div>+ <EmptyState+ @title={{i18n "user.no_likes_title"}}+ @body={{htmlSafe+ (i18n+ "user.no_likes_body"+ preferencesUrl=(getUrl "/my/preferences/notifications")+ )+ }}+ /></template>;export default LikesListEmptyState;diff --git a/app/assets/javascripts/discourse/app/components/user-menu/messages-list-empty-state.gjs b/app/assets/javascripts/discourse/app/components/user-menu/messages-list-empty-state.gjsindex dfd1d48420e..e2631cc4ac1 100644--- a/app/assets/javascripts/discourse/app/components/user-menu/messages-list-empty-state.gjs+++ b/app/assets/javascripts/discourse/app/components/user-menu/messages-list-empty-state.gjs@@ -1,25 +1,20 @@import { htmlSafe } from "@ember/template";+import EmptyState from "discourse/components/empty-state";import icon from "discourse/helpers/d-icon";import getUrl from "discourse/helpers/get-url";import { i18n } from "discourse-i18n";const MessagesListEmptyState = <template>- <div class="empty-state">- <span class="empty-state-title">- {{i18n "user.no_messages_title"}}- </span>- <div class="empty-state-body">- <p>- {{htmlSafe- (i18n- "user.no_messages_body"- icon=(icon "envelope")- aboutUrl=(getUrl "/about")- )- }}- </p>- </div>- </div>+ <EmptyState+ @title={{i18n "user.no_messages_title"}}+ @body={{htmlSafe+ (i18n+ "user.no_messages_body"+ icon=(icon "envelope")+ aboutUrl=(getUrl "/about")+ )+ }}+ /></template>;export default MessagesListEmptyState;diff --git a/app/assets/javascripts/discourse/app/components/user-menu/notifications-list-empty-state.gjs b/app/assets/javascripts/discourse/app/components/user-menu/notifications-list-empty-state.gjsindex 152903a63c4..759fede9c23 100644--- a/app/assets/javascripts/discourse/app/components/user-menu/notifications-list-empty-state.gjs+++ b/app/assets/javascripts/discourse/app/components/user-menu/notifications-list-empty-state.gjs@@ -1,25 +1,20 @@import { htmlSafe } from "@ember/template";+import EmptyState from "discourse/components/empty-state";import icon from "discourse/helpers/d-icon";import getUrl from "discourse/helpers/get-url";import { i18n } from "discourse-i18n";const NotificationsListEmptyState = <template>- <div class="empty-state">- <span class="empty-state-title">- {{i18n "user.no_notifications_title"}}- </span>- <div class="empty-state-body">- <p>- {{htmlSafe- (i18n- "user.no_notifications_body"- icon=(icon "bell")- preferencesUrl=(getUrl "/my/preferences/notifications")- )- }}- </p>- </div>- </div>+ <EmptyState+ @title={{i18n "user.no_notifications_title"}}+ @body={{htmlSafe+ (i18n+ "user.no_notifications_body"+ icon=(icon "bell")+ preferencesUrl=(getUrl "/my/preferences/notifications")+ )+ }}+ /></template>;export default NotificationsListEmptyState;diff --git a/app/assets/javascripts/discourse/app/components/user-menu/other-notifications-list-empty-state.gjs b/app/assets/javascripts/discourse/app/components/user-menu/other-notifications-list-empty-state.gjsindex e8b07f71b9b..31307b54cd2 100644--- a/app/assets/javascripts/discourse/app/components/user-menu/other-notifications-list-empty-state.gjs+++ b/app/assets/javascripts/discourse/app/components/user-menu/other-notifications-list-empty-state.gjs@@ -1,17 +1,12 @@import { htmlSafe } from "@ember/template";+import EmptyState from "discourse/components/empty-state";import { i18n } from "discourse-i18n";const OtherNotificationsListEmptyState = <template>- <div class="empty-state">- <span class="empty-state-title">- {{i18n "user.no_other_notifications_title"}}- </span>- <div class="empty-state-body">- <p>- {{htmlSafe (i18n "user.no_other_notifications_body")}}- </p>- </div>- </div>+ <EmptyState+ @title={{i18n "user.no_other_notifications_title"}}+ @body={{htmlSafe (i18n "user.no_other_notifications_body")}}+ /></template>;export default OtherNotificationsListEmptyState;diff --git a/app/assets/javascripts/discourse/app/templates/user-invited-show.gjs b/app/assets/javascripts/discourse/app/templates/user-invited-show.gjsindex 6a6ec1a2962..fa39bbe882b 100644--- a/app/assets/javascripts/discourse/app/templates/user-invited-show.gjs+++ b/app/assets/javascripts/discourse/app/templates/user-invited-show.gjs@@ -5,7 +5,9 @@ import RouteTemplate from "ember-route-template";import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";import DButton from "discourse/components/d-button";import DropdownMenu from "discourse/components/dropdown-menu";+import EmptyState from "discourse/components/empty-state";import LoadMore from "discourse/components/load-more";+import SvgEnvelopeZero from "discourse/components/svg/envelope-zero";import TextField from "discourse/components/text-field";import avatar from "discourse/helpers/avatar";import bodyClass from "discourse/helpers/body-class";@@ -42,21 +44,23 @@ export default RouteTemplate(</div>{{/if}}<section class="user-invite-buttons">- <DButton- @icon="plus"- @action={{@controller.createInvite}}- @label="user.invited.create"- class="btn-default invite-button"- />- {{#if @controller.canBulkInvite}}- {{#if @controller.siteSettings.allow_bulk_invite}}- {{#if @controller.site.desktopView}}- <DButton- @icon="upload"- @action={{@controller.createInviteCsv}}- @label="user.invited.bulk_invite.text"- class="btn-default"- />+ {{#if @controller.model.invites}}+ <DButton+ @icon="plus"+ @action={{@controller.createInvite}}+ @label="user.invited.create"+ class="btn-default invite-button"+ />+ {{#if @controller.canBulkInvite}}+ {{#if @controller.siteSettings.allow_bulk_invite}}+ {{#if @controller.site.desktopView}}+ <DButton+ @icon="upload"+ @action={{@controller.createInviteCsv}}+ @label="user.invited.bulk_invite.text"+ class="btn-default"+ />+ {{/if}}{{/if}}{{/if}}{{/if}}@@ -337,13 +341,26 @@ export default RouteTemplate(@condition={{@controller.invitesLoading}}/>{{else}}- <div class="user-invite-none">- {{#if @controller.canBulkInvite}}- {{htmlSafe (i18n "user.invited.bulk_invite.none")}}- {{else}}- {{i18n "user.invited.none"}}- {{/if}}- </div>+ <EmptyState+ @identifier="empty-channels-list"+ @svgContent={{SvgEnvelopeZero}}+ @title={{i18n "user.invited.none.title"}}+ @ctaLabel={{i18n "user.invited.none.cta"}}+ @ctaAction={{@controller.createInvite}}+ @tipIcon={{if @controller.canBulkInvite "upload"}}+ >+ <:tip>+ {{#if @controller.canBulkInvite}}+ {{i18n "user.invited.none.tip.prefix"}}+ <DButton+ @action={{@controller.createInviteCsv}}+ @label="user.invited.none.tip.action"+ class="btn-link"+ />+ {{i18n "user.invited.none.tip.suffix"}}+ {{/if}}+ </:tip>+ </EmptyState>{{/if}}</section></LoadMore>diff --git a/app/assets/javascripts/discourse/app/templates/users.gjs b/app/assets/javascripts/discourse/app/templates/users.gjsindex 0fd4b22b400..2c6e0d7dba9 100644--- a/app/assets/javascripts/discourse/app/templates/users.gjs+++ b/app/assets/javascripts/discourse/app/templates/users.gjs@@ -5,6 +5,7 @@ import RouteTemplate from "ember-route-template";import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";import DButton from "discourse/components/d-button";import DirectoryTable from "discourse/components/directory-table";+import EmptyState from "discourse/components/empty-state";import LoadMore from "discourse/components/load-more";import PluginOutlet from "discourse/components/plugin-outlet";import basePath from "discourse/helpers/base-path";@@ -108,25 +109,21 @@ export default RouteTemplate(@condition={{@controller.model.loadingMore}}/>{{else}}- <div class="empty-state">- <div class="empty-state-body">- <p>- {{#if @controller.name}}- {{i18n "directory.no_results_with_search"}}- {{else}}- {{i18n "directory.no_results.body"}}- {{#if @controller.currentUser.staff}}- {{htmlSafe- (i18n- "directory.no_results.extra_body"- basePath=(basePath)- )- }}- {{/if}}- {{/if}}- </p>- </div>- </div>+ <EmptyState+ @body={{if+ @controller.name+ (i18n "directory.no_results_with_search")+ (if+ @controller.currentUser.staff+ (htmlSafe+ (i18n+ "directory.no_results.extra_body" basePath=(basePath)+ )+ )+ (i18n "directory.no_results.body")+ )+ }}+ />{{/if}}</ConditionalLoadingSpinner></div>diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-test.jsindex 07441d1955a..fd3c9ebf1d0 100644--- a/app/assets/javascripts/discourse/tests/acceptance/group-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/group-test.js@@ -250,7 +250,7 @@ acceptance("Group - Authenticated", function (needs) {await click(".nav-pills li a[title='Messages']");assert- .dom("span.empty-state-title")+ .dom(".empty-state__title").hasText(i18n("no_group_messages_title"),"should display the right text"diff --git a/app/assets/javascripts/discourse/tests/acceptance/new-topics-test.js b/app/assets/javascripts/discourse/tests/acceptance/new-topics-test.jsindex 02899131faf..33a072da4bd 100644--- a/app/assets/javascripts/discourse/tests/acceptance/new-topics-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/new-topics-test.js@@ -19,7 +19,7 @@ acceptance("New Topics - New new view enabled", function (needs) {test("visiting new page when there are no new topics", async function (assert) {await visit("/new");assert- .dom(".topic-list-bottom .empty-topic-filter__text")+ .dom(".topic-list-bottom .empty-state__title").hasText(i18n("topics.none.education.new_new"));});});diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-activity-all-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-activity-all-test.jsindex 4c61db9fcc5..a7320db87ff 100644--- a/app/assets/javascripts/discourse/tests/acceptance/user-activity-all-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/user-activity-all-test.js@@ -19,14 +19,14 @@ acceptance("User Activity / All - empty state", function (needs) {test("When looking at own activity page", async function (assert) {await visit(`/u/${currentUser}/activity`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_activity_title"));});test("When looking at another user's activity page", async function (assert) {await visit(`/u/${anotherUser}/activity`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_activity_title")); // the same title as when looking at own page});});diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-activity-likes-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-activity-likes-test.jsindex 9bfc7adf3bc..8cb86af98b9 100644--- a/app/assets/javascripts/discourse/tests/acceptance/user-activity-likes-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/user-activity-likes-test.js@@ -19,14 +19,14 @@ acceptance("User Activity / Likes - empty state", function (needs) {test("When looking at own likes page", async function (assert) {await visit(`/u/${currentUser}/activity/likes-given`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_likes_title"));});test("When looking at another user's likes page", async function (assert) {await visit(`/u/${anotherUser}/activity/likes-given`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_likes_title_others", { username: anotherUser }));diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-activity-replies-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-activity-replies-test.jsindex 3342d847167..bf04ec0d2e9 100644--- a/app/assets/javascripts/discourse/tests/acceptance/user-activity-replies-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/user-activity-replies-test.js@@ -20,14 +20,14 @@ acceptance("User Activity / Replies - empty state", function (needs) {test("When looking at own replies page", async function (assert) {await visit(`/u/${currentUser}/activity/replies`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_replies_title"));});test("When looking at another user's replies page", async function (assert) {await visit(`/u/${anotherUser}/activity/replies`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_replies_title_others", { username: anotherUser }));diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-activity-topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-activity-topic-test.jsindex 00bb4d2e7be..d2478525995 100644--- a/app/assets/javascripts/discourse/tests/acceptance/user-activity-topic-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/user-activity-topic-test.js@@ -59,14 +59,14 @@ acceptance("User Activity / Topics - empty state", function (needs) {test("When looking at the own activity page", async function (assert) {await visit(`/u/${currentUser}/activity/topics`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_topics_title"));});test("When looking at another user's activity page", async function (assert) {await visit(`/u/${anotherUser}/activity/topics`);assert- .dom("div.empty-state span.empty-state-title")+ .dom("div.empty-state .empty-state__title").hasText(i18n("user_activity.no_topics_title_others", { username: anotherUser }));diff --git a/app/assets/javascripts/discourse/tests/acceptance/users-test.js b/app/assets/javascripts/discourse/tests/acceptance/users-test.jsindex cce08881b57..b104d76450a 100644--- a/app/assets/javascripts/discourse/tests/acceptance/users-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/users-test.js@@ -120,7 +120,7 @@ acceptance("User Directory", function () {await visit("/u");assert- .dom(".empty-state-body")+ .dom(".empty-state__body").hasText(i18n("directory.no_results.body"),"a JIT message is shown when there are no users"@@ -140,7 +140,7 @@ acceptance("User Directory", function () {await visit("/u?name=somenamethatdoesnotexist");assert- .dom(".empty-state-body")+ .dom(".empty-state__body").hasText(i18n("directory.no_results_with_search"),"a different JIT message is used when there are no results for the search term"diff --git a/app/assets/javascripts/discourse/tests/integration/components/empty-state-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/empty-state-test.gjsindex cbf24840c23..7f4518ab5ee 100644--- a/app/assets/javascripts/discourse/tests/integration/components/empty-state-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/empty-state-test.gjs@@ -8,10 +8,12 @@ module("Integration | Component | empty-state", function (hooks) {test("it renders", async function (assert) {await render(- <template><EmptyState @title="title" @body="body" /></template>+ <template>+ <EmptyState @title="user.no_bookmarks_title" @body="body" />+ </template>);- assert.dom("[data-test-title]").hasText("title");- assert.dom("[data-test-body]").hasText("body");+ assert.dom("[data-test-title]").exists();+ assert.dom("[data-test-body]").exists();});});diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-menu/bookmarks-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/user-menu/bookmarks-list-test.gjsindex bebcd731dce..9186b9a73b3 100644--- a/app/assets/javascripts/discourse/tests/integration/components/user-menu/bookmarks-list-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/user-menu/bookmarks-list-test.gjs@@ -70,16 +70,16 @@ module(});await render(<template><BookmarksList /></template>);assert- .dom(".empty-state-title")+ .dom(".empty-state__title").hasText(i18n("user.no_bookmarks_title"), "empty state title is shown");assert- .dom(".empty-state-body")+ .dom(".empty-state__body").hasText(i18n("user.no_bookmarks_body", { icon: "" }),"empty state body is shown");assert- .dom(".empty-state-body svg.d-icon-bookmark")+ .dom(".empty-state__body svg.d-icon-bookmark").exists("icon is correctly rendered in the empty state body");});}diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-menu/likes-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/user-menu/likes-list-test.gjsindex de8e96ef24c..705d6d9dc6e 100644--- a/app/assets/javascripts/discourse/tests/integration/components/user-menu/likes-list-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/user-menu/likes-list-test.gjs@@ -18,13 +18,13 @@ module(await render(<template><LikesNotificationsList /></template>);assert- .dom(".empty-state-title")+ .dom(".empty-state__title").hasText(i18n("user.no_likes_title"),"empty state title for the likes tab is shown");assert- .dom(".empty-state-body a")+ .dom(".empty-state__body a").hasAttribute("href","/my/preferences/notifications",diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-menu/messages-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/user-menu/messages-list-test.gjsindex b0439e24aab..376516b4ef1 100644--- a/app/assets/javascripts/discourse/tests/integration/components/user-menu/messages-list-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/user-menu/messages-list-test.gjs@@ -291,13 +291,13 @@ module("Integration | Component | user-menu | messages-list", function (hooks) {await render(<template><MessagesList /></template>);assert- .dom(".empty-state-title")+ .dom(".empty-state__title").hasText(i18n("user.no_messages_title"), "empty state title is shown");assert- .dom(".empty-state-body svg.d-icon-envelope")+ .dom(".empty-state__body svg.d-icon-envelope").exists("icon is correctly rendered in the empty state body");assert- .dom(".empty-state-body a")+ .dom(".empty-state__body a").hasAttribute("href","/about",diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-menu/notifications-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/user-menu/notifications-list-test.gjsindex ce2db2e21c8..90ecacf5024 100644--- a/app/assets/javascripts/discourse/tests/integration/components/user-menu/notifications-list-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/user-menu/notifications-list-test.gjs@@ -45,8 +45,8 @@ module(test("empty state when there are no notifications", async function (assert) {notificationsData.clear();await render(<template><NotificationsList /></template>);- assert.dom(".empty-state .empty-state-title").exists();- assert.dom(".empty-state .empty-state-body").exists();+ assert.dom(".empty-state .empty-state__title").exists();+ assert.dom(".empty-state .empty-state__body").exists();});test("doesn't set filter_by_types in the params of the request that fetches the notifications", async function (assert) {diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-menu/other-notifications-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/user-menu/other-notifications-list-test.gjsindex 901fc153499..6631f5b4354 100644--- a/app/assets/javascripts/discourse/tests/integration/components/user-menu/other-notifications-list-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/user-menu/other-notifications-list-test.gjs@@ -18,9 +18,9 @@ module(test("empty state when there are no notifications", async function (assert) {await render(<template><OtherNotificationsList /></template>);- assert.dom(".empty-state .empty-state-body").exists();+ assert.dom(".empty-state .empty-state__body").exists();assert- .dom(".empty-state .empty-state-title")+ .dom(".empty-state .empty-state__title").hasText(i18n("user.no_other_notifications_title"));});}diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-menu/replies-notifications-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/user-menu/replies-notifications-list-test.gjsindex a742539436f..2d1dd1ff70f 100644--- a/app/assets/javascripts/discourse/tests/integration/components/user-menu/replies-notifications-list-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/user-menu/replies-notifications-list-test.gjs@@ -18,9 +18,9 @@ module(test("empty state when there are no notifications", async function (assert) {await render(<template><RepliesNotificationsList /></template>);- assert.dom(".empty-state .empty-state-body").exists();+ assert.dom(".empty-state .empty-state__body").exists();assert- .dom(".empty-state .empty-state-title")+ .dom(".empty-state .empty-state__title").hasText(i18n("user.no_notifications_title"));});}diff --git a/app/assets/stylesheets/common/base/_index.scss b/app/assets/stylesheets/common/base/_index.scssindex ca192170cfd..fe2cf15b1fe 100644--- a/app/assets/stylesheets/common/base/_index.scss+++ b/app/assets/stylesheets/common/base/_index.scss@@ -19,7 +19,6 @@@import "edit-topic-timer-modal";@import "ember-select";@import "emoji";-@import "empty-state";@import "exception";@import "explain-reviewable";@import "faqs";diff --git a/app/assets/stylesheets/common/base/empty-state.scss b/app/assets/stylesheets/common/base/empty-state.scssdeleted file mode 100644index b7cc375e7ba..00000000000--- a/app/assets/stylesheets/common/base/empty-state.scss+++ /dev/null@@ -1,19 +0,0 @@-.empty-state {- color: var(--primary);- margin: 0;- padding: 0.5em 1em;- display: flex;- flex-direction: column;-- .empty-state-title {- font-weight: 700;- padding: 0;- margin: 0;- font-size: var(--font-up-1);- }-- .empty-state-body {- padding: 0;- margin: 0;- }-}diff --git a/app/assets/stylesheets/common/base/menu-panel.scss b/app/assets/stylesheets/common/base/menu-panel.scssindex 05350d88436..552de96247c 100644--- a/app/assets/stylesheets/common/base/menu-panel.scss+++ b/app/assets/stylesheets/common/base/menu-panel.scss@@ -251,6 +251,10 @@.sidebar-search {width: 100%;}++ .empty-state {+ padding: 0.5em 1em;+ }}.search-menu .menu-panel {diff --git a/app/assets/stylesheets/common/base/new-user.scss b/app/assets/stylesheets/common/base/new-user.scssindex faf2038bacc..e491f64e9d7 100644--- a/app/assets/stylesheets/common/base/new-user.scss+++ b/app/assets/stylesheets/common/base/new-user.scss@@ -160,7 +160,6 @@}.empty-state {- padding: 0;margin: 1em 0;}diff --git a/app/assets/stylesheets/common/components/empty-states.scss b/app/assets/stylesheets/common/components/empty-states.scssindex 9c92079b23c..8765c56fcf5 100644--- a/app/assets/stylesheets/common/components/empty-states.scss+++ b/app/assets/stylesheets/common/components/empty-states.scss@@ -1,25 +1,38 @@@use "lib/viewport";-.empty-topic-filter {- margin: 0 auto;- width: 75%;- text-align: center;+.empty-state {+ &__container {+ &.--with-image {+ text-align: center;+ }- @include viewport.from(sm) {- padding-top: 7rem;- }+ &.--text-only {+ .empty-state__title {+ font-weight: bold;+ font-size: var(--font-up-1);+ }+ }- &__preferences-hint {- margin-top: 2rem;- font-size: var(--font-down-1);- color: var(--primary-medium);+ &.--empty-topic-filter {+ margin: 0 auto;+ width: 75%;- @include viewport.until(sm) {- position: absolute;- bottom: 3rem;- margin-inline: auto;- margin-top: 0;- left: 0;+ @include viewport.from(sm) {+ padding-top: 7rem;+ }+ }++ &.--empty-channels-list {+ display: flex;+ flex-direction: column;+ justify-content: center;+ align-items: center;+ gap: 1rem;+ height: 100%;++ .empty-state__image {+ margin-top: 0;+ }}}@@ -40,4 +53,22 @@&__cta {margin-top: 2rem;}++ &__tip {+ margin-top: 2rem;+ font-size: var(--font-down-1);+ color: var(--primary-medium);++ .d-icon {+ font-size: var(--font-down-1);+ }++ @include viewport.until(sm) {+ position: absolute;+ bottom: 3rem;+ margin-inline: auto;+ margin-top: 0;+ left: 0;+ }+ }}diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 2fbb784eb19..1ccfffd527e 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -2043,7 +2043,13 @@ en:removed: "Removed"search: "type to search invites…"user: "Invited User"- none: "No invites to display."+ none:+ title: "No invites to display."+ cta: "Create invite link"+ tip:+ prefix: "You can also send bulk invites by"+ action: "uploading a CSV file"+ suffix: ""truncated:one: "Showing the first invite."other: "Showing the first %{count} invites."@@ -3379,9 +3385,9 @@ en:filter: "There are no topics."education:topic_tracking_preferences: 'You can view and change your new topic tracking settings in <a href="%{basePath}/my/preferences/tracking">your preferences</a>.'- unread: "Nothing left unread...impressive!"- new_new: "Nothing new at the moment...check back soon!"- new: "Nothing new at the moment...check back soon!"+ unread: "Nothing left unread... impressive!"+ new_new: "Nothing new at the moment... check back soon!"+ new: "Nothing new at the moment... check back soon!"bottom:latest: "There are no more latest topics."diff --git a/plugins/chat/assets/javascripts/discourse/components/browse-channels.gjs b/plugins/chat/assets/javascripts/discourse/components/browse-channels.gjsindex e8c391c563b..e299dcef4e2 100644--- a/plugins/chat/assets/javascripts/discourse/components/browse-channels.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/browse-channels.gjs@@ -7,7 +7,7 @@ import { LinkTo } from "@ember/routing";import { schedule } from "@ember/runloop";import { service } from "@ember/service";import { eq } from "truth-helpers";-import DButton from "discourse/components/d-button";+import EmptyState from "discourse/components/empty-state";import FilterInput from "discourse/components/filter-input";import discourseDebounce from "discourse/lib/debounce";import { INPUT_DELAY } from "discourse/lib/environment";@@ -109,17 +109,12 @@ export default class BrowseChannels extends Component {</list.Item><list.EmptyState>- <span class="empty-state-title">- {{i18n "chat.empty_state.title"}}- </span>- <div class="empty-state-body">- <p>{{i18n "chat.empty_state.direct_message"}}</p>- <DButton- @action={{this.showChatNewMessageModal}}- @label="chat.empty_state.direct_message_cta"- class="btn-default"- />- </div>+ <EmptyState+ @title={{i18n "chat.empty_state.title"}}+ @body={{i18n "chat.empty_state.direct_message"}}+ @ctaLabel={{i18n "chat.empty_state.direct_message_cta"}}+ @ctaAction={{this.showChatNewMessageModal}}+ /></list.EmptyState></List></div>diff --git a/plugins/chat/assets/javascripts/discourse/components/channels-list-direct.gjs b/plugins/chat/assets/javascripts/discourse/components/channels-list-direct.gjsindex 3a9900784fa..5560c673ae5 100644--- a/plugins/chat/assets/javascripts/discourse/components/channels-list-direct.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/channels-list-direct.gjs@@ -5,14 +5,15 @@ import { action } from "@ember/object";import { service } from "@ember/service";import { and, not, or } from "truth-helpers";import DButton from "discourse/components/d-button";+import EmptyState from "discourse/components/empty-state";import PluginOutlet from "discourse/components/plugin-outlet";import concatClass from "discourse/helpers/concat-class";import icon from "discourse/helpers/d-icon";import lazyHash from "discourse/helpers/lazy-hash";import { i18n } from "discourse-i18n";import ChatModalNewMessage from "discourse/plugins/chat/discourse/components/chat/modal/new-message";-import EmptyChannelsList from "discourse/plugins/chat/discourse/components/empty-channels-list";import ChatChannelRow from "./chat-channel-row";+import ChatZero from "./svg/chat-zero";export default class ChannelsListDirect extends Component {@service chat;@@ -109,11 +110,15 @@ export default class ChannelsListDirect extends Component {}}>{{#if this.directMessageChannelsEmpty}}- <EmptyChannelsList+ <EmptyState+ @identifier="empty-channels-list"+ @svgContent={{ChatZero}}@title={{i18n "chat.no_direct_message_channels"}}- @ctaTitle={{i18n "chat.no_direct_message_channels_cta"}}+ @ctaLabel={{if+ this.canCreateDirectMessageChannel+ (i18n "chat.no_direct_message_channels_cta")+ }}@ctaAction={{this.openNewMessageModal}}- @showCTA={{this.canCreateDirectMessageChannel}}/>{{else}}{{#eachdiff --git a/plugins/chat/assets/javascripts/discourse/components/channels-list-public.gjs b/plugins/chat/assets/javascripts/discourse/components/channels-list-public.gjsindex eabe0b6dfc3..e1caaa638e8 100644--- a/plugins/chat/assets/javascripts/discourse/components/channels-list-public.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/channels-list-public.gjs@@ -5,13 +5,14 @@ import { action } from "@ember/object";import { LinkTo } from "@ember/routing";import { service } from "@ember/service";import { and } from "truth-helpers";+import EmptyState from "discourse/components/empty-state";import PluginOutlet from "discourse/components/plugin-outlet";import concatClass from "discourse/helpers/concat-class";import icon from "discourse/helpers/d-icon";import lazyHash from "discourse/helpers/lazy-hash";import { i18n } from "discourse-i18n";-import EmptyChannelsList from "discourse/plugins/chat/discourse/components/empty-channels-list";import ChatChannelRow from "./chat-channel-row";+import ChatZero from "./svg/chat-zero";export default class ChannelsListPublic extends Component {@service chatChannelsManager;@@ -101,11 +102,15 @@ export default class ChannelsListPublic extends Component {}}>{{#if this.chatChannelsManager.publicMessageChannelsEmpty}}- <EmptyChannelsList+ <EmptyState+ @identifier="empty-channels-list"+ @svgContent={{ChatZero}}@title={{i18n "chat.no_public_channels"}}- @ctaTitle={{i18n "chat.no_public_channels_cta"}}+ @ctaLabel={{if+ this.chatChannelsManager.displayPublicChannels+ (i18n "chat.no_public_channels_cta")+ }}@ctaAction={{this.openBrowseChannels}}- @showCTA={{this.chatChannelsManager.displayPublicChannels}}/>{{else}}{{#each this.channelList as |channel|}}diff --git a/plugins/chat/assets/javascripts/discourse/components/empty-channels-list.gjs b/plugins/chat/assets/javascripts/discourse/components/empty-channels-list.gjsdeleted file mode 100644index 4cc36776982..00000000000--- a/plugins/chat/assets/javascripts/discourse/components/empty-channels-list.gjs+++ /dev/null@@ -1,64 +0,0 @@-import DButton from "discourse/components/d-button";--const EmptyChannelsList = <template>- <div class="channel-list-empty-message">- <svg- width="217"- height="163"- viewBox="0 0 217 163"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M4 128.5C12.5 128.5 30.5 148.5 69.5 142.5C86.9422 139.817 168.5 84.5 197.5 73"- stroke="var(--tertiary-high)"- stroke-linecap="round"- stroke-dasharray="6 6"- />- <path- fill-rule="evenodd"- clip-rule="evenodd"- d="M53 15C39.7452 15 29 25.7452 29 39V96.4576C29 109.377 39.2089 119.913 52 120.437V137L74.3809 120.458H156C169.255 120.458 180 109.712 180 96.4576V39C180 25.7452 169.255 15 156 15H53Z"- fill="var(--secondary)"- />- <path- d="M52 120.437H52.5V119.957L52.0205 119.938L52 120.437ZM52 137H51.5V137.991L52.2972 137.402L52 137ZM74.3809 120.458V119.958H74.2162L74.0837 120.056L74.3809 120.458ZM29.5 39C29.5 26.0213 40.0213 15.5 53 15.5V14.5C39.469 14.5 28.5 25.469 28.5 39H29.5ZM29.5 96.4576V39H28.5V96.4576H29.5ZM52.0205 119.938C39.4962 119.424 29.5 109.108 29.5 96.4576H28.5C28.5 109.647 38.9216 120.402 51.9795 120.937L52.0205 119.938ZM52.5 137V120.437H51.5V137H52.5ZM74.0837 120.056L51.7028 136.598L52.2972 137.402L74.6781 120.86L74.0837 120.056ZM156 119.958H74.3809V120.958H156V119.958ZM179.5 96.4576C179.5 109.436 168.979 119.958 156 119.958V120.958C169.531 120.958 180.5 109.989 180.5 96.4576H179.5ZM179.5 39V96.4576H180.5V39H179.5ZM156 15.5C168.979 15.5 179.5 26.0213 179.5 39H180.5C180.5 25.469 169.531 14.5 156 14.5V15.5ZM53 15.5H156V14.5H53V15.5Z"- fill="var(--tertiary-high)"- />- <ellipse cx="104" cy="156" rx="96" ry="7" fill="var(--primary-low)" />- <path- d="M215.833 65.4678L209.881 73.3052C209.749 73.5001 209.525 73.6186 209.283 73.6212C209.158 73.6066 209.033 73.592 208.909 73.525C208.827 73.4803 208.755 73.415 208.695 73.3292L206.751 70.9161L204.851 71.9128C204.691 72.0124 204.513 71.9961 204.369 71.9179C204.142 71.7951 204.057 71.5092 204.18 71.2825L205.252 69.3042C205.341 69.1393 205.46 69.0174 205.598 68.959L213.217 65.6229L204.2 67.8014L202.557 65.7653C202.386 65.5394 202.333 65.244 202.478 64.9761C202.614 64.6765 202.849 64.5374 203.143 64.5366L215.222 64.2836C215.495 64.2716 215.784 64.4279 215.912 64.6838C216.04 64.9397 216.009 65.2428 215.833 65.4678Z"- fill="var(--tertiary-high)"- />- <ellipse- cx="148"- cy="18.4167"- rx="17"- ry="18.4167"- fill="var(--primary-low)"- />- <path- d="M147.883 8.27081C149.963 8.27081 151.589 9.013 152.761 10.4974C154.157 12.2552 154.855 15.1702 154.855 19.2425C154.855 23.305 154.152 26.2249 152.746 28.0023C151.584 29.4671 149.963 30.1995 147.883 30.1995C145.793 30.1995 144.108 29.3987 142.829 27.7972C141.55 26.1859 140.91 23.3196 140.91 19.1985C140.91 15.1556 141.613 12.2454 143.02 10.4681C144.182 9.00323 145.803 8.27081 147.883 8.27081ZM147.883 11.6839C147.385 11.6839 146.94 11.845 146.55 12.1673C146.159 12.4798 145.856 13.0462 145.642 13.8665C145.358 14.931 145.217 16.723 145.217 19.2425C145.217 21.762 145.344 23.4954 145.598 24.4427C145.852 25.3802 146.169 26.0052 146.55 26.3177C146.94 26.6302 147.385 26.7864 147.883 26.7864C148.381 26.7864 148.825 26.6302 149.216 26.3177C149.606 25.9954 149.909 25.4241 150.124 24.6038C150.407 23.5491 150.549 21.762 150.549 19.2425C150.549 16.723 150.422 14.9944 150.168 14.0569C149.914 13.1097 149.592 12.4798 149.201 12.1673C148.82 11.845 148.381 11.6839 147.883 11.6839Z"- fill="var(--primary)"- />- <path- d="M13.013 41.1986C13.4829 41.2395 13.9951 41.6417 14.228 42.2301C14.4696 42.8402 14.3716 43.484 14.057 43.8355L15.3252 47.0389C15.4373 47.3221 15.3665 47.6527 15.1482 47.8652C14.9298 48.0776 14.5988 48.1331 14.3251 48.0146L12.9866 47.4353C11.5265 46.8034 9.87709 46.7758 8.39524 47.3625L8.22091 47.4315L9.32521 50.2209C9.4805 50.6131 9.27441 51.0476 8.90395 51.1943L7.50927 51.7464C7.11702 51.9017 6.69115 51.7174 6.53585 51.3252L5.43155 48.5358C4.64704 48.8464 3.7953 48.4778 3.48472 47.6933L2.65649 45.6013C2.35453 44.8386 2.71451 43.965 3.49901 43.6545L6.46271 42.4811C7.94455 41.8945 9.12808 40.7453 9.7686 39.307L10.3478 37.9685C10.4663 37.6948 10.7455 37.5086 11.0502 37.514C11.3548 37.5195 11.6327 37.7119 11.7362 37.9734L13.013 41.1986ZM7.01486 43.8758L6.84052 43.9448L7.66875 46.0368L7.84309 45.9678C9.58644 45.2776 11.5232 45.2671 13.2748 45.9348L11.0058 40.2036C10.186 41.8893 8.75821 43.1856 7.01486 43.8758Z"- fill="var(--tertiary-high)"- />- <path- d="M148.762 128.636C149.155 128.701 149.422 129.101 149.358 129.494C149.29 129.91 148.913 130.181 148.52 130.116C148.103 130.048 147.833 129.671 147.901 129.255C147.965 128.862 148.346 128.568 148.762 128.636ZM151.353 129.061C151.746 129.125 152.013 129.525 151.948 129.918C151.888 130.288 151.484 130.578 151.114 130.518C150.721 130.453 150.427 130.073 150.491 129.679C150.559 129.263 150.936 128.992 151.353 129.061ZM153.943 129.485C154.336 129.549 154.626 129.953 154.539 130.343C154.471 130.759 154.094 131.03 153.701 130.965C153.307 130.901 153.014 130.52 153.082 130.104C153.146 129.711 153.527 129.417 153.943 129.485ZM152.02 124.99C155.281 125.524 157.558 128.153 157.126 130.79C156.694 133.427 153.705 135.146 150.443 134.612C149.68 134.486 148.959 134.25 148.345 133.935C147.572 134.307 146.367 134.704 144.956 134.473C144.725 134.435 144.536 134.285 144.504 134.042C144.469 133.823 144.53 133.595 144.718 133.46C144.718 133.46 145.564 132.791 146.059 131.946C145.428 131.011 145.132 129.918 145.31 128.831C145.746 126.171 148.735 124.452 152.02 124.99ZM150.625 133.501C153.262 133.933 155.659 132.64 155.996 130.581C156.329 128.546 154.451 126.528 151.815 126.096C149.178 125.664 146.754 126.977 146.421 129.013C146.258 130.007 146.622 130.827 146.966 131.334L147.369 131.923L147.008 132.529C146.84 132.834 146.625 133.131 146.394 133.378C146.98 133.284 147.484 133.105 147.845 132.927L148.338 132.675L148.843 132.924C149.391 133.204 150.001 133.399 150.625 133.501Z"- fill="var(--tertiary-high)"- />- </svg>-- <span class="channel-title">{{@title}}</span>-- {{#if @showCTA}}- <DButton @action={{@ctaAction}} class="btn btn-primary">- {{@ctaTitle}}- </DButton>- {{/if}}- </div>-</template>;--export default EmptyChannelsList;diff --git a/plugins/chat/assets/javascripts/discourse/components/svg/chat-zero.gjs b/plugins/chat/assets/javascripts/discourse/components/svg/chat-zero.gjsnew file mode 100644index 00000000000..e13980ace9c--- /dev/null+++ b/plugins/chat/assets/javascripts/discourse/components/svg/chat-zero.gjs@@ -0,0 +1,52 @@+const SvgChatZero = <template>+ <svg+ width="217"+ height="163"+ viewBox="0 0 217 163"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M4 128.5C12.5 128.5 30.5 148.5 69.5 142.5C86.9422 139.817 168.5 84.5 197.5 73"+ stroke="var(--tertiary-high)"+ stroke-linecap="round"+ stroke-dasharray="6 6"+ />+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"+ d="M53 15C39.7452 15 29 25.7452 29 39V96.4576C29 109.377 39.2089 119.913 52 120.437V137L74.3809 120.458H156C169.255 120.458 180 109.712 180 96.4576V39C180 25.7452 169.255 15 156 15H53Z"+ fill="var(--secondary)"+ />+ <path+ d="M52 120.437H52.5V119.957L52.0205 119.938L52 120.437ZM52 137H51.5V137.991L52.2972 137.402L52 137ZM74.3809 120.458V119.958H74.2162L74.0837 120.056L74.3809 120.458ZM29.5 39C29.5 26.0213 40.0213 15.5 53 15.5V14.5C39.469 14.5 28.5 25.469 28.5 39H29.5ZM29.5 96.4576V39H28.5V96.4576H29.5ZM52.0205 119.938C39.4962 119.424 29.5 109.108 29.5 96.4576H28.5C28.5 109.647 38.9216 120.402 51.9795 120.937L52.0205 119.938ZM52.5 137V120.437H51.5V137H52.5ZM74.0837 120.056L51.7028 136.598L52.2972 137.402L74.6781 120.86L74.0837 120.056ZM156 119.958H74.3809V120.958H156V119.958ZM179.5 96.4576C179.5 109.436 168.979 119.958 156 119.958V120.958C169.531 120.958 180.5 109.989 180.5 96.4576H179.5ZM179.5 39V96.4576H180.5V39H179.5ZM156 15.5C168.979 15.5 179.5 26.0213 179.5 39H180.5C180.5 25.469 169.531 14.5 156 14.5V15.5ZM53 15.5H156V14.5H53V15.5Z"+ fill="var(--tertiary-high)"+ />+ <ellipse cx="104" cy="156" rx="96" ry="7" fill="var(--primary-low)" />+ <path+ d="M215.833 65.4678L209.881 73.3052C209.749 73.5001 209.525 73.6186 209.283 73.6212C209.158 73.6066 209.033 73.592 208.909 73.525C208.827 73.4803 208.755 73.415 208.695 73.3292L206.751 70.9161L204.851 71.9128C204.691 72.0124 204.513 71.9961 204.369 71.9179C204.142 71.7951 204.057 71.5092 204.18 71.2825L205.252 69.3042C205.341 69.1393 205.46 69.0174 205.598 68.959L213.217 65.6229L204.2 67.8014L202.557 65.7653C202.386 65.5394 202.333 65.244 202.478 64.9761C202.614 64.6765 202.849 64.5374 203.143 64.5366L215.222 64.2836C215.495 64.2716 215.784 64.4279 215.912 64.6838C216.04 64.9397 216.009 65.2428 215.833 65.4678Z"+ fill="var(--tertiary-high)"+ />+ <ellipse+ cx="148"+ cy="18.4167"+ rx="17"+ ry="18.4167"+ fill="var(--primary-low)"+ />+ <path+ d="M147.883 8.27081C149.963 8.27081 151.589 9.013 152.761 10.4974C154.157 12.2552 154.855 15.1702 154.855 19.2425C154.855 23.305 154.152 26.2249 152.746 28.0023C151.584 29.4671 149.963 30.1995 147.883 30.1995C145.793 30.1995 144.108 29.3987 142.829 27.7972C141.55 26.1859 140.91 23.3196 140.91 19.1985C140.91 15.1556 141.613 12.2454 143.02 10.4681C144.182 9.00323 145.803 8.27081 147.883 8.27081ZM147.883 11.6839C147.385 11.6839 146.94 11.845 146.55 12.1673C146.159 12.4798 145.856 13.0462 145.642 13.8665C145.358 14.931 145.217 16.723 145.217 19.2425C145.217 21.762 145.344 23.4954 145.598 24.4427C145.852 25.3802 146.169 26.0052 146.55 26.3177C146.94 26.6302 147.385 26.7864 147.883 26.7864C148.381 26.7864 148.825 26.6302 149.216 26.3177C149.606 25.9954 149.909 25.4241 150.124 24.6038C150.407 23.5491 150.549 21.762 150.549 19.2425C150.549 16.723 150.422 14.9944 150.168 14.0569C149.914 13.1097 149.592 12.4798 149.201 12.1673C148.82 11.845 148.381 11.6839 147.883 11.6839Z"+ fill="var(--primary)"+ />+ <path+ d="M13.013 41.1986C13.4829 41.2395 13.9951 41.6417 14.228 42.2301C14.4696 42.8402 14.3716 43.484 14.057 43.8355L15.3252 47.0389C15.4373 47.3221 15.3665 47.6527 15.1482 47.8652C14.9298 48.0776 14.5988 48.1331 14.3251 48.0146L12.9866 47.4353C11.5265 46.8034 9.87709 46.7758 8.39524 47.3625L8.22091 47.4315L9.32521 50.2209C9.4805 50.6131 9.27441 51.0476 8.90395 51.1943L7.50927 51.7464C7.11702 51.9017 6.69115 51.7174 6.53585 51.3252L5.43155 48.5358C4.64704 48.8464 3.7953 48.4778 3.48472 47.6933L2.65649 45.6013C2.35453 44.8386 2.71451 43.965 3.49901 43.6545L6.46271 42.4811C7.94455 41.8945 9.12808 40.7453 9.7686 39.307L10.3478 37.9685C10.4663 37.6948 10.7455 37.5086 11.0502 37.514C11.3548 37.5195 11.6327 37.7119 11.7362 37.9734L13.013 41.1986ZM7.01486 43.8758L6.84052 43.9448L7.66875 46.0368L7.84309 45.9678C9.58644 45.2776 11.5232 45.2671 13.2748 45.9348L11.0058 40.2036C10.186 41.8893 8.75821 43.1856 7.01486 43.8758Z"+ fill="var(--tertiary-high)"+ />+ <path+ d="M148.762 128.636C149.155 128.701 149.422 129.101 149.358 129.494C149.29 129.91 148.913 130.181 148.52 130.116C148.103 130.048 147.833 129.671 147.901 129.255C147.965 128.862 148.346 128.568 148.762 128.636ZM151.353 129.061C151.746 129.125 152.013 129.525 151.948 129.918C151.888 130.288 151.484 130.578 151.114 130.518C150.721 130.453 150.427 130.073 150.491 129.679C150.559 129.263 150.936 128.992 151.353 129.061ZM153.943 129.485C154.336 129.549 154.626 129.953 154.539 130.343C154.471 130.759 154.094 131.03 153.701 130.965C153.307 130.901 153.014 130.52 153.082 130.104C153.146 129.711 153.527 129.417 153.943 129.485ZM152.02 124.99C155.281 125.524 157.558 128.153 157.126 130.79C156.694 133.427 153.705 135.146 150.443 134.612C149.68 134.486 148.959 134.25 148.345 133.935C147.572 134.307 146.367 134.704 144.956 134.473C144.725 134.435 144.536 134.285 144.504 134.042C144.469 133.823 144.53 133.595 144.718 133.46C144.718 133.46 145.564 132.791 146.059 131.946C145.428 131.011 145.132 129.918 145.31 128.831C145.746 126.171 148.735 124.452 152.02 124.99ZM150.625 133.501C153.262 133.933 155.659 132.64 155.996 130.581C156.329 128.546 154.451 126.528 151.815 126.096C149.178 125.664 146.754 126.977 146.421 129.013C146.258 130.007 146.622 130.827 146.966 131.334L147.369 131.923L147.008 132.529C146.84 132.834 146.625 133.131 146.394 133.378C146.98 133.284 147.484 133.105 147.845 132.927L148.338 132.675L148.843 132.924C149.391 133.204 150.001 133.399 150.625 133.501Z"+ fill="var(--tertiary-high)"+ />+ </svg>+</template>;++export default SvgChatZero;diff --git a/plugins/chat/assets/javascripts/discourse/components/user-menu/chat-notifications-list-empty-state.gjs b/plugins/chat/assets/javascripts/discourse/components/user-menu/chat-notifications-list-empty-state.gjsindex 4ba81f06273..1d46fba0012 100644--- a/plugins/chat/assets/javascripts/discourse/components/user-menu/chat-notifications-list-empty-state.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/user-menu/chat-notifications-list-empty-state.gjs@@ -1,23 +1,18 @@+import EmptyState from "discourse/components/empty-state";import getUrl from "discourse/helpers/get-url";import htmlSafe from "discourse/helpers/html-safe";import { i18n } from "discourse-i18n";const ChatNotificationsListEmptyState = <template>- <div class="empty-state">- <span class="empty-state-title">- {{i18n "user_menu.no_chat_notifications_title"}}- </span>- <div class="empty-state-body">- <p>- {{htmlSafe- (i18n- "user_menu.no_chat_notifications_body"- preferencesUrl=(getUrl "/my/preferences/notifications")- )- }}- </p>- </div>- </div>+ <EmptyState+ @title={{i18n "user_menu.no_chat_notifications_title"}}+ @body={{htmlSafe+ (i18n+ "user_menu.no_chat_notifications_body"+ preferencesUrl=(getUrl "/my/preferences/notifications")+ )+ }}+ /></template>;export default ChatNotificationsListEmptyState;diff --git a/plugins/chat/assets/stylesheets/common/chat-index.scss b/plugins/chat/assets/stylesheets/common/chat-index.scssindex dfb61525415..48b314a6974 100644--- a/plugins/chat/assets/stylesheets/common/chat-index.scss+++ b/plugins/chat/assets/stylesheets/common/chat-index.scss@@ -62,19 +62,6 @@}}}-- .channel-list-empty-message {- display: flex;- flex-direction: column;- justify-content: center;- align-items: center;- gap: 1rem;- height: 100%;-- .channel-title {- margin-bottom: 1rem;- }- }}.chat-channel-divider {diff --git a/plugins/chat/assets/stylesheets/common/chat-user-threads.scss b/plugins/chat/assets/stylesheets/common/chat-user-threads.scssindex 738b055c4d2..f2ecf0b6b1b 100644--- a/plugins/chat/assets/stylesheets/common/chat-user-threads.scss+++ b/plugins/chat/assets/stylesheets/common/chat-user-threads.scss@@ -49,6 +49,10 @@}}+.c-list-empty-state {+ grid-column: 1/-1;+}+.c-user-threads .empty-state-threads {display: flex;justify-content: center;diff --git a/plugins/chat/assets/stylesheets/desktop/chat-index-full-page.scss b/plugins/chat/assets/stylesheets/desktop/chat-index-full-page.scssindex 10ff04003f7..407fb52151a 100644--- a/plugins/chat/assets/stylesheets/desktop/chat-index-full-page.scss+++ b/plugins/chat/assets/stylesheets/desktop/chat-index-full-page.scss@@ -6,16 +6,6 @@background: var(--secondary);overflow-y: auto;- .channel-list-empty-message {- padding: 1rem;- text-align: center;-- svg,- .channel-title {- display: none;- }- }-.chat-channel-divider {padding: 2rem 1rem 0.5rem 1rem;diff --git a/plugins/chat/config/locales/client.en.yml b/plugins/chat/config/locales/client.en.ymlindex 5b2c31da255..ca5534460e6 100644--- a/plugins/chat/config/locales/client.en.yml+++ b/plugins/chat/config/locales/client.en.yml@@ -235,9 +235,9 @@ en:composer: "Chat composer"channels_list: "Chat channels list"- no_direct_message_channels: "You have not joined any direct messages, yet!"+ no_direct_message_channels: "You have not joined any direct messages yet!"no_direct_message_channels_cta: "Start a conversation"- no_public_channels: "You have not joined any channels, yet!"+ no_public_channels: "You have not joined any channels yet!"no_public_channels_cta: "Browse channels"kicked_from_channel: "You can no longer access this channel."only_chat_push_notifications:diff --git a/plugins/chat/spec/system/drawer/index_spec.rb b/plugins/chat/spec/system/drawer/index_spec.rbindex fa061eda00a..7a56bef6c79 100644--- a/plugins/chat/spec/system/drawer/index_spec.rb+++ b/plugins/chat/spec/system/drawer/index_spec.rb@@ -56,6 +56,6 @@ RSpec.describe "Drawer - index", type: :system dodrawer_page.visit_indexdrawer_page.click_direct_messagesexpect(page).to have_css("#c-footer-direct-messages.--active")- expect(page).to have_selector(".channel-list-empty-message")+ expect(page).to have_selector(".empty-state")endenddiff --git a/plugins/chat/spec/system/list_channels/drawer_spec.rb b/plugins/chat/spec/system/list_channels/drawer_spec.rbindex 49238244abc..169874bf3bb 100644--- a/plugins/chat/spec/system/list_channels/drawer_spec.rb+++ b/plugins/chat/spec/system/list_channels/drawer_spec.rb@@ -90,7 +90,7 @@ RSpec.describe "List channels | Drawer", type: :system docontext "when no category channels" doit "shows the empty channel list" dodrawer_page.visit_index- expect(drawer_page).to have_selector(".channel-list-empty-message")+ expect(drawer_page).to have_selector(".empty-state")endend@@ -231,7 +231,7 @@ RSpec.describe "List channels | Drawer", type: :system dodrawer_page.visit_indexdrawer_page.click_direct_messages- expect(drawer_page).to have_selector(".channel-list-empty-message")+ expect(drawer_page).to have_selector(".empty-state")endendenddiff --git a/plugins/chat/spec/system/list_channels/mobile_spec.rb b/plugins/chat/spec/system/list_channels/mobile_spec.rbindex 1427e3e5f45..36e22e0b3fc 100644--- a/plugins/chat/spec/system/list_channels/mobile_spec.rb+++ b/plugins/chat/spec/system/list_channels/mobile_spec.rb@@ -158,7 +158,7 @@ RSpec.describe "List channels | mobile", type: :system, mobile: true doit "shows the empty channel list" dovisit("/chat/channels")- expect(page).to have_selector(".channel-list-empty-message")+ expect(page).to have_selector(".empty-state")endcontext "when user can create channels" dodiff --git a/plugins/chat/spec/system/page_objects/chat/chat.rb b/plugins/chat/spec/system/page_objects/chat/chat.rbindex 3429a4009a8..bf249ccdaf3 100644--- a/plugins/chat/spec/system/page_objects/chat/chat.rb+++ b/plugins/chat/spec/system/page_objects/chat/chat.rb@@ -133,7 +133,7 @@ module PageObjectsenddef has_no_messages?- have_selector(".channel-list-empty-message")+ have_selector(".empty-state")enddef has_direct_message_channels_section?diff --git a/plugins/chat/test/javascripts/integration/components/user-menu/chat-notifications-list-test.gjs b/plugins/chat/test/javascripts/integration/components/user-menu/chat-notifications-list-test.gjsindex b05cde2f14f..63ce35a5445 100644--- a/plugins/chat/test/javascripts/integration/components/user-menu/chat-notifications-list-test.gjs+++ b/plugins/chat/test/javascripts/integration/components/user-menu/chat-notifications-list-test.gjs@@ -20,9 +20,9 @@ module(test("empty state when there are no notifications", async function (assert) {await render(template);- assert.dom(".empty-state .empty-state-body").exists();+ assert.dom(".empty-state .empty-state__body").exists();assert- .dom(".empty-state .empty-state-title")+ .dom(".empty-state .empty-state__title").hasText(i18n("user_menu.no_chat_notifications_title"));});}diff --git a/spec/system/create_invite_spec.rb b/spec/system/create_invite_spec.rbindex 969498d1390..0accca7c2ed 100644--- a/spec/system/create_invite_spec.rb+++ b/spec/system/create_invite_spec.rb@@ -4,6 +4,7 @@ describe "Creating Invites", type: :system dofab!(:group)fab!(:user) { Fabricate(:user, groups: [group]) }fab!(:topic) { Fabricate(:post).topic }+ fab!(:invite) { Fabricate(:invite, invited_by: user, email: "[email protected]") } # avoid empty statelet(:user_invited_pending_page) { PageObjects::Pages::UserInvitedPending.new }let(:create_invite_modal) { PageObjects::Modals::CreateInvite.new }let(:cdp) { PageObjects::CDP.new }@@ -46,7 +47,7 @@ describe "Creating Invites", type: :system docreate_invite_modal.close- expect(user_invited_pending_page.invites_list.size).to eq(1)+ expect(user_invited_pending_page.invites_list.size).to eq(2)expect(user_invited_pending_page.latest_invite).to be_link_type(key: invite_key,@@ -73,7 +74,7 @@ describe "Creating Invites", type: :system docreate_invite_modal.save_button.clickcreate_invite_modal.close- expect(user_invited_pending_page.invites_list.size).to eq(1)+ expect(user_invited_pending_page.invites_list.size).to eq(2)user_invited_pending_page.latest_invite.edit_button.clickend@@ -114,7 +115,7 @@ describe "Creating Invites", type: :system docreate_invite_modal.close- expect(user_invited_pending_page.invites_list.size).to eq(1)+ expect(user_invited_pending_page.invites_list.size).to eq(2)expect(user_invited_pending_page.latest_invite).to have_description("welcome")expect(user_invited_pending_page.latest_invite).to be_link_type(@@ -159,7 +160,7 @@ describe "Creating Invites", type: :system docreate_invite_modal.close- expect(user_invited_pending_page.invites_list.size).to eq(1)+ expect(user_invited_pending_page.invites_list.size).to eq(2)expect(user_invited_pending_page.latest_invite).to be_email_type("[email protected]")expect(user_invited_pending_page.latest_invite).to have_group(group)@@ -187,7 +188,7 @@ describe "Creating Invites", type: :system docreate_invite_modal.close- expect(user_invited_pending_page.invites_list.size).to eq(1)+ expect(user_invited_pending_page.invites_list.size).to eq(2)expect(user_invited_pending_page.latest_invite).to be_email_type("[email protected]")expect(ActionMailer::Base.deliveries).to eq([])end@@ -228,4 +229,22 @@ describe "Creating Invites", type: :system doexpect(expire_date).to be_within_one_minute_of(now + 1.day)endend++ context "in empty state" do+ fab!(:user_without_invites) { Fabricate(:user, groups: [group]) }+ let(:user_invited_pending_page_empty) { PageObjects::Pages::UserInvitedPending.new }+ let(:create_invite_modal_empty) { PageObjects::Modals::CreateInvite.new }++ before do+ SiteSetting.invite_allowed_groups = "#{group.id}"+ sign_in(user_without_invites)+ user_invited_pending_page_empty.visit(user_without_invites)+ end++ it "can open the invite modal from the empty state button" do+ find(".empty-state .btn-primary").click++ expect(page).to have_css(".create-invite-modal")+ end+ endend