mirror of
https://github.com/wassname/talk.git
synced 2026-08-07 11:29:44 +08:00
[next] Permalink View (#1987)
* feat: Implement converation thread * Update unit tests * test: adapt integration tests * test: refactor denormalization helpers * test: Include multiple parents in permalink View * test: add integration test for loading previous parent comments * feat: use dashed & solid time line * feat: use new conversation thread design * feat: add header from new design * test: update snapshots * fix: better scrolling behavior * feat: add user box * fix: add translations * fix: typo * fix: plural translation * fix: paddings * feat: better styling for level 0 comments * fix: gutter size * fix: update iframe url with new comment id * test: add unit tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { commitLocalUpdate, Environment } from "relay-runtime";
|
||||
|
||||
import { getURLWithCommentID } from "talk-framework/helpers";
|
||||
import { TalkContext } from "talk-framework/lib/bootstrap";
|
||||
import { createMutationContainer } from "talk-framework/lib/relay";
|
||||
import { LOCAL_ID } from "talk-framework/lib/relay/withLocalStateContainer";
|
||||
@@ -19,6 +20,16 @@ export async function commit(
|
||||
const record = store.get(LOCAL_ID)!;
|
||||
record.setValue(input.id, "commentID");
|
||||
record.setValue("COMMENTS", "activeTab");
|
||||
|
||||
// Change iframe url, this is important
|
||||
// because it is used to cleanly initialized
|
||||
// a user session.
|
||||
window.history.replaceState(
|
||||
window.history.state,
|
||||
document.title,
|
||||
getURLWithCommentID(location.href, input.id || undefined)
|
||||
);
|
||||
|
||||
if (pym) {
|
||||
// This sets the comment id on the parent url.
|
||||
pym.sendMessage("setCommentID", input.id || "");
|
||||
|
||||
Reference in New Issue
Block a user