Giter Club home page Giter Club logo

pairpad's Introduction

Hi there, I'm Aadhav! I love building stuff for fun! πŸ› οΈ

You can find an extensive list of what I've built over the years.

Need more info? Find more about me here β†’ aadhav.me/about

If you’re interested in hiring me β€” please reach out to me! email: contact <at> aadhav.me

pairpad's People

Contributors

benmuth avatar burntcarrot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pairpad's Issues

Status bar showing the active users

A nice addition would be to have a separate status bar containing the active users.

Would this work:

  • The clients would have a local list of active clients
  • Every time a new client joins, the server broadcasts this as a message to the clients
  • The clients update their local state with the newly-added user
  • The editor displays the list

The other way would be to use the server's existing activeClients map, but the clients might need to fetch the list at specific intervals from the server.

Cursor movement using up and down arrow keys

Right now, the cursor movement happens using the left and right arrow keys.

For a better user experience, navigation using the up and down arrow keys would be nice to have.

I have a basic idea on how it would work:

  • compute the length of each "block"/segment inside the editor
  • get the largest block, and set the max length to the block's length
  • use the max length to "pad" other blocks virtually
  • now, safely compute cursor positions
  • incase the cursor position "overflows", set the cursor to the block's end_pos + 1

Local cursor position isn't updated by remote edits

Screen.Recording.2022-12-21.at.12.48.27.PM.mov

As shown in the video, as the bottom editor inserts and deletes, the top editor's cursor moves backwards and forwards. The cursor position should be updated as remote edits come in (so that the cursor stays on the 'h' in this example).

Screen.Recording.2022-12-21.at.12.52.44.PM.mov

Another example of incorrect behavior. The bottom editor's cursor should stay on the 'w' as the top editor inserts and deletes characters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.