querysub 0.504.0 → 0.505.0

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": "querysub",
3
- "version": "0.504.0",
3
+ "version": "0.505.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -7,6 +7,7 @@ import { nextId, sort } from "socket-function/src/misc";
7
7
  import { formatDateTime, formatTime } from "socket-function/src/formatting/format";
8
8
  import { Querysub } from "../../../4-querysub/Querysub";
9
9
  import { URLParam } from "../../../library-components/URLParam";
10
+ import { mainResets } from "../../../library-components/urlResetGroups";
10
11
  import { ATag } from "../../../library-components/ATag";
11
12
  import { Button } from "../../../library-components/Button";
12
13
  import { InputLabel } from "../../../library-components/InputLabel";
@@ -16,8 +17,8 @@ import { TicketsController, watchTickets } from "./tickets";
16
17
  import { isTicketFinished, Ticket, TicketComment, TicketPatchFile, TicketState, TICKET_STATES } from "./ticketTypes";
17
18
 
18
19
  export const ticketIdURL = new URLParam("ticketid", "");
19
- // "unfinished" hides tickets in a final state (fixed / not-a-bug).
20
- export const ticketFilterURL = new URLParam("ticketfilter", "");
20
+ // "unfinished" hides tickets in a final state (fixed / not-a-bug). Resets when the page changes, so the filter doesn't confusingly stick around.
21
+ export const ticketFilterURL = new URLParam("ticketfilter", "", { reset: [mainResets] });
21
22
 
22
23
  const TITLE_MAX_LENGTH = 200;
23
24
  const COMMENT_TEXTAREA_MIN_HEIGHT = 250;
@@ -205,7 +206,7 @@ class TicketList extends qreact.Component {
205
206
  return <div className={css.vbox(16).pad2(16).fillBoth.minHeight(0)}>
206
207
  <div className={css.hbox(16)}>
207
208
  <h2>Tickets ({sorted.length}{showUnfinishedOnly && " unfinished" || ""})</h2>
208
- <ATag values={[ticketFilterURL.getOverride(showUnfinishedOnly && "" || "unfinished")]}>
209
+ <ATag values={[ticketFilterURL.getOverride(showUnfinishedOnly ? "" : "unfinished")]}>
209
210
  {showUnfinishedOnly && "Show All" || "Show Unfinished Only"}
210
211
  </ATag>
211
212
  <Button