Give finished Rules a print path, folded launch counts, and a two-day follow-up.
Export is PDF, RULE.md, and Print on US Letter, with every shared term, no member names, and a takeaway that points at Ask an organizer. Finished Rules keep type and place so the team can read folded counts without a database, Umami can sit beside the app with no cookies, and the person who holds the pen gets working PDF and RULE.md links 48 hours later.
This commit is contained in:
1 parent
0efc907633
commit
d9c475a967
74 files changed
+2401
-630
No files matched your search
@@ -1,9 +1,13 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { RULE_VISIBILITY } from "../../lib/ruleVisibility";
|
||||
import {
|
||||
ASK_ORGANIZER_HASH,
|
||||
askOrganizerUrl,
|
||||
buildShareRuleUrl,
|
||||
formatShareUrlDisplay,
|
||||
isShareSlug,
|
||||
ruleExportMarkdownUrl,
|
||||
ruleExportPdfUrl,
|
||||
shareCopyUrl,
|
||||
shareRulePath,
|
||||
} from "../../lib/sharePaths";
|
||||
@@ -43,4 +47,17 @@ describe("sharePaths", () => {
|
||||
}),
|
||||
).toBe("https://communityrule.info/rules/rule-1");
|
||||
});
|
||||
|
||||
it("builds Ask an organizer and export URLs", () => {
|
||||
expect(ASK_ORGANIZER_HASH).toBe("ask-organizer");
|
||||
expect(askOrganizerUrl("https://communityrule.info/")).toBe(
|
||||
"https://communityrule.info/#ask-organizer",
|
||||
);
|
||||
expect(
|
||||
ruleExportPdfUrl("https://communityrule.info", "rule/1", "tok"),
|
||||
).toBe("https://communityrule.info/api/rules/rule%2F1/export/pdf?t=tok");
|
||||
expect(
|
||||
ruleExportMarkdownUrl("https://communityrule.info", "id", "tok"),
|
||||
).toBe("https://communityrule.info/api/rules/id/export/md?t=tok");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user