Compare commits

..
Author SHA1 Message Date
Typosaurus 880e993ed8 ticket #91 attempt 1 2026-07-19 21:07:05 +00:00
6 changed files with 14 additions and 7 deletions
File diff suppressed because one or more lines are too long
+5
View File
@@ -172,6 +172,7 @@
text-align: left;
cursor: pointer;
overflow: hidden;
touch-action: manipulation;
}
.poll-option[disabled] {
@@ -182,6 +183,10 @@
border-color: var(--border-light);
}
.poll-option:not([disabled]):active {
background-color: var(--bg-card-hover);
}
.poll-option.chosen {
border-color: var(--accent);
}
+1 -1
View File
@@ -16,7 +16,7 @@ export class MessagesLayout {
}
this.thread = document.querySelector(".messages-thread");
this.form = document.querySelector(".messages-input-area");
this.input = this.form ? this.form.querySelector('textarea[name="content"]') : null;
this.input = this.form ? this.form.querySelector('input[name="content"]') : null;
this.upload = this.form ? this.form.querySelector("dp-upload") : null;
this.sendBtn = this.form ? this.form.querySelector(".messages-send-btn") : null;
this._uploading = false;
+4 -2
View File
@@ -5,7 +5,8 @@ import { OptimisticAction } from "./OptimisticAction.js";
export class PollManager extends OptimisticAction {
constructor() {
super();
document.addEventListener("click", (event) => this.onClick(event));
this.container = null;
document.addEventListener("pointerdown", (event) => this.onClick(event));
document.addEventListener("submit", (event) => this.onSubmit(event), true);
}
@@ -42,7 +43,8 @@ export class PollManager extends OptimisticAction {
}
const pollUid = poll.dataset.pollUid;
const optionUid = option.dataset.optionUid;
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, null, (result) => this.render(poll, result));
this.container = poll;
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, this.container, (result) => this.render(poll, result));
}
render(poll, result) {
+1 -1
View File
@@ -176,7 +176,7 @@ def test_send_message_appears_in_thread(alice):
f"{BASE_URL}/messages?with_uid={bob['uid']}", wait_until="domcontentloaded"
)
msg = f"Hello bob {int(time.time() * 1000)}"
page.fill("textarea[name='content']", msg)
page.fill("input[name='content']", msg)
page.locator(".messages-send-btn").click()
page.wait_for_url("**/messages**", wait_until="domcontentloaded")
page.locator(f".message-bubble:has-text('{msg}')").first.wait_for(state="visible")
+2 -2
View File
@@ -440,7 +440,7 @@ def test_message_notification(app_server, browser, seeded_db):
pb.goto(f"{BASE_URL}/messages?search=alice_test", wait_until="domcontentloaded")
pb.wait_for_timeout(2000)
msg_input = pb.locator("textarea[name='content']").first
msg_input = pb.locator("input[name='content']").first
msg_input.wait_for(state="visible", timeout=10000)
msg_input.fill("Hello from bob_test!")
pb.locator("button[type='submit']").last.click()
@@ -753,7 +753,7 @@ def test_message_notification_click_opens_conversation(app_server, browser, seed
pb.goto(f"{BASE_URL}/messages?search=alice_test", wait_until="domcontentloaded")
pb.wait_for_timeout(2000)
msg_input = pb.locator("textarea[name='content']").first
msg_input = pb.locator("input[name='content']").first
msg_input.wait_for(state="visible", timeout=10000)
msg_input.fill("Click-through message from bob")
pb.locator("button[type='submit']").last.click()