mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
* feat: Allow document links to suppress view recording Adds a suppressView query parameter that prevents a view from being recorded when a document is opened, removing it from the URL afterwards so that copied links record views as normal. * refactor: Use useConsumeQueryParam to read suppressView Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
13 lines
349 B
TypeScript
13 lines
349 B
TypeScript
import { suppressView } from "./suppressView";
|
|
|
|
describe("suppressView", () => {
|
|
it("should append the parameter to a path", () => {
|
|
expect(suppressView("/doc/test-abc")).toEqual(
|
|
"/doc/test-abc?suppressView=true"
|
|
);
|
|
expect(suppressView("/doc/test-abc?a=1")).toEqual(
|
|
"/doc/test-abc?a=1&suppressView=true"
|
|
);
|
|
});
|
|
});
|