@remit/ui 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/ui",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src"
@@ -11,7 +11,7 @@ describe("MailActionToolbar", () => {
11
11
  );
12
12
  assert.match(html, /aria-label="Reply"/);
13
13
  assert.match(html, /aria-label="Move to Trash"/);
14
- assert.match(html, /aria-label="Flag"/);
14
+ assert.match(html, /aria-label="Star"/);
15
15
  assert.match(html, /aria-label="Move to mailbox"/);
16
16
  // No archive verb — Remit is IMAP-backed (move-to-folder is the equivalent).
17
17
  assert.doesNotMatch(html, /aria-label="Archive"/);
@@ -27,7 +27,7 @@ describe("MailActionToolbar", () => {
27
27
  assert.match(html, /aria-label="Forward"/);
28
28
  assert.doesNotMatch(html, /aria-label="Archive"/);
29
29
  assert.doesNotMatch(html, /aria-label="Move to Trash"/);
30
- assert.doesNotMatch(html, /aria-label="Flag"/);
30
+ assert.doesNotMatch(html, /aria-label="Star"/);
31
31
  assert.doesNotMatch(html, /aria-label="Move to mailbox"/);
32
32
  });
33
33
 
@@ -81,7 +81,7 @@ export function MailActionToolbar({
81
81
  replyAllTitle = "Reply all (a)",
82
82
  forwardTitle = "Forward (f)",
83
83
  deleteTitle = "Move to Trash (#)",
84
- flagTitle = "Flag (s)",
84
+ flagTitle = "Star (s)",
85
85
  children,
86
86
  className,
87
87
  }: MailActionToolbarProps) {
@@ -158,7 +158,7 @@ export function MailActionToolbar({
158
158
  />
159
159
  }
160
160
  title={flagTitle}
161
- aria-label="Flag"
161
+ aria-label="Star"
162
162
  onClick={act("flag", onToggleStar)}
163
163
  />
164
164
  </>
@@ -20,7 +20,7 @@ describe("MobileMessageActionBar", () => {
20
20
  }),
21
21
  }),
22
22
  );
23
- assert.equal(countMatches(html, 'aria-label="Flag"'), 1);
23
+ assert.equal(countMatches(html, 'aria-label="Star"'), 1);
24
24
  assert.equal(countMatches(html, 'aria-label="Move to folder"'), 1);
25
25
  assert.equal(countMatches(html, 'aria-label="Move to Trash"'), 1);
26
26
  assert.doesNotMatch(html, /aria-label="Archive"/);
@@ -30,7 +30,7 @@ describe("MobileMessageActionBar", () => {
30
30
  const html = renderToString(
31
31
  createElement(MobileMessageActionBar, { ...base, isStarred: true }),
32
32
  );
33
- assert.match(html, /aria-label="Remove flag"/);
33
+ assert.match(html, /aria-label="Unstar"/);
34
34
  assert.match(html, /aria-pressed="true"/);
35
35
  });
36
36
 
@@ -141,9 +141,9 @@ export function MobileMessageActionBar({
141
141
  />
142
142
  }
143
143
  onClick={act("star", onToggleStar)}
144
- aria-label={isStarred ? "Remove flag" : "Flag"}
144
+ aria-label={isStarred ? "Unstar" : "Star"}
145
145
  aria-pressed={isStarred}
146
- title={isStarred ? "Remove flag" : "Flag"}
146
+ title={isStarred ? "Unstar" : "Star"}
147
147
  className={TOUCH}
148
148
  />
149
149
  {moveSlot}
@@ -87,7 +87,7 @@ describe("MobileReadingPane", () => {
87
87
  // One expanded message ⇒ one Reply / Flag / Trash cluster; the two
88
88
  // collapsed rows carry no bar.
89
89
  assert.equal(countMatches(html, 'aria-label="Reply"'), 1);
90
- assert.equal(countMatches(html, 'aria-label="Flag"'), 1);
90
+ assert.equal(countMatches(html, 'aria-label="Star"'), 1);
91
91
  assert.equal(countMatches(html, 'aria-label="Move to Trash"'), 1);
92
92
  });
93
93
 
@@ -69,6 +69,18 @@ describe("NavSidebar", () => {
69
69
  assert.match(html, /Daily brief/);
70
70
  });
71
71
 
72
+ it("labels the \\Flagged virtual mailbox 'Starred'", () => {
73
+ const html = renderToString(
74
+ createElement(NavSidebar, {
75
+ accounts,
76
+ selectedNavId: "flagged",
77
+ onSelectNav: () => undefined,
78
+ }),
79
+ );
80
+ assert.match(html, /Starred/);
81
+ assert.doesNotMatch(html, /Flagged/);
82
+ });
83
+
72
84
  it("renders system and custom mailbox names", () => {
73
85
  const html = renderToString(
74
86
  createElement(NavSidebar, {
@@ -580,8 +580,8 @@ export function NavSidebar({
580
580
  navId="flagged"
581
581
  linkComponent={linkComponent}
582
582
  icon={<Star className="size-4" />}
583
- label="Flagged"
584
- ariaLabel="Flagged"
583
+ label="Starred"
584
+ ariaLabel="Starred"
585
585
  active={selectedNavId === "flagged"}
586
586
  onClick={() => onSelectNav?.("flagged")}
587
587
  />
@@ -60,13 +60,20 @@ describe("inboxFilterConfig", () => {
60
60
  );
61
61
  });
62
62
 
63
- it("adds Has attachment to Unread and Flagged", () => {
63
+ it("adds Has attachment to Unread and Starred", () => {
64
64
  assert.deepEqual(
65
65
  inboxFilterConfig().filters.map((f) => f.id),
66
66
  ["unread", "flagged", "attachment"],
67
67
  );
68
68
  });
69
69
 
70
+ it("labels the IMAP \\Flagged filter 'Starred'", () => {
71
+ assert.deepEqual(
72
+ inboxFilterConfig().filters.map((f) => f.label),
73
+ ["Unread", "Starred", "Has attachment"],
74
+ );
75
+ });
76
+
70
77
  it("never offers an accounts source group", () => {
71
78
  assert.equal(inboxFilterConfig().sources, undefined);
72
79
  });
@@ -43,7 +43,8 @@ const MESSAGE_CATEGORIES: FilterSheetCategory[] = [
43
43
  ];
44
44
 
45
45
  const UNREAD: FilterSheetFilter = { id: "unread", label: "Unread" };
46
- const FLAGGED: FilterSheetFilter = { id: "flagged", label: "Flagged" };
46
+ // `flagged` is the wire name (IMAP \Flagged); the user-facing label is "Starred".
47
+ const FLAGGED: FilterSheetFilter = { id: "flagged", label: "Starred" };
47
48
  const HAS_ATTACHMENT: FilterSheetFilter = {
48
49
  id: "attachment",
49
50
  label: "Has attachment",