Keep an unsent post as a draft

オープン 初心者向け
#110 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
80/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

apps/web/src/components/Composer.tsx から始めてください。コンポーザーのテキストが state のどこにあるか、投稿成功時にどこでリセットされるかを確認し、そのテキストをストレージに書き込むデバウンス付きの effect を追加します。ドラフトのキーにするサインイン中のユーザー ID は apps/web/src/store/auth.ts を読んで取得し、ログアウトの処理に組み込んでドラフトを削除してください。プライベートモードでの失敗に備えて、読み書きは try/catch で囲みます。npm run typecheck、npm test、npm run lint を実行します。完了条件は、リロードでテキストが復元されること、投稿でテキストがクリアされること、ログアウトでドラフトが消えることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement good first issue web

If you refresh or close the tab while writing, the text is lost.

What to do

Save the composer text as you type (debounced) and restore it on load. Clear it after a successful post. Wrap storage calls in try/catch, and keep the draft per signed-in user so it never shows for someone else on a shared computer.

Where to look

apps/web/src/components/Composer.tsx, apps/web/src/store/auth.ts.

Done when

A reload keeps the draft, posting clears it, and logging out removes it.

How to work on it

Fork the repo, branch from main, and follow CONTRIBUTING.md. Run npm run typecheck, npm test and npm run lint before opening a PR. Comment here if you'd like to take it, and ask if anything is unclear.


Generated by Claude Code

主要言語
TypeScript
スター
6
フォーク
6
平均マージ
1時間 59分
マージ済み PR(30日)
59

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Haseeb-MernStack/commune のほかの issue

Haseeb-MernStack/commune の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。