Show live cursors of online teammates on board🖱️

オープン
#645 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
56/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
express, javascript, node.js, react

調査の方向性

Start with server/index.js and client/src/pages/Dashboard.jsx, then check how the app initializes Socket.io and tracks connected users. The issue sketches cursor events and rendering; confirm the existing socket and user patterns before implementing them. Done when online teammates’ cursors appear on the board and disappear when they disconnect.

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

説明

enhancement good first issue

Show live cursors of online teammates on board

File: server/index.js + client/src/pages/Dashboard.jsx

Nobody knows where teammates are
looking on the board 💀
Figma has this — DevBoard should too fr!!

Fix: emit cursor position via Socket.io:
// server/index.js:
io.on('connection', (socket) => {
socket.on('cursor:move', ({ x, y, userId, name }) => {
socket.broadcast.emit('cursor:update',
{ x, y, userId, name })
})
socket.on('disconnect', () => {
socket.broadcast.emit('cursor:remove',
{ socketId: socket.id })
})
})

// Dashboard.jsx:
const [cursors, setCursors] = useState({})

useEffect(() => {
const handleMove = (e) => {
socket.emit('cursor:move', {
x: (e.clientX / window.innerWidth) * 100,
y: (e.clientY / window.innerHeight) * 100,
userId: user._id,
name: user.name
})
}
window.addEventListener('mousemove', handleMove)
return () => window.removeEventListener(
'mousemove', handleMove)
}, [])

socket.on('cursor:update', ({ x, y, userId, name }) => {
setCursors(prev => ({ ...prev, [userId]: { x, y, name }}))
})

// render cursors:
{Object.entries(cursors).map(([id, { x, y, name }]) => (

{name} ))}

Socket.io already installed ✅
~30 lines! This is LITERALLY Figma-level!! 🔥

主要言語
JavaScript
スター
39
フォーク
105
平均マージ
2日 10時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

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

anoopcodehack/DevBoard のほかの issue

anoopcodehack/DevBoard の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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