mrusme / superhighway84

USENET-inspired, uncensorable, decentralized internet discussion system running on IPFS & OrbitDB
https://xn--gckvb8fzb.com/superhighway84
GNU General Public License v3.0
694 stars 24 forks source link

Add help and shortcuts reference view #37

Closed mprimi closed 2 years ago

mprimi commented 2 years ago

Pressing '?' or 'z' displays a help modal.

Currently displays some placeholder text and shortcuts. However the C- shortcuts are invisible characters.

Also does a little refactoring of the shortcuts.

mprimi commented 2 years ago

@mrusme Do not merge, this is work in progress.

The thing works, but I need to clean up the PR.

edit: now ready for review/merge

mprimi commented 2 years ago

@mrusme one thing I don't know how to resolve, I wonder what you think:

If you try this branch, hitting '?' won't do anything. That's because:

So anyone that has a config file, will not have the help command mapped.

I see multiple ways out of this, but I wonder what you think.

mrusme commented 2 years ago

@mprimi yupp been having that exact issue with new shortcuts, hence the users would manually need to delete all shortcuts from the config in order to get the new ones. As you pointed out there are multiple ways to solve this issue, e.g. checking the ones that are there and only appending the new ones. I just haven't had the time to take care of implementing any of this yet.

If you feel like, go ahead and try something like that. I won't reject the PR if it doesn't take care of that though, as it's technically not part of what you're actually trying to solve here.

mprimi commented 2 years ago

@mrusme ready for review -- happy to make change if you don't like where state is created/composed/passed.

mprimi commented 2 years ago

@mrusme I see my PRs are creating merge commits. I seem to remember you don't like them. Do you know you can set the PRs to merge as --ff-only? i.e. no merge commit. It's in the project settings somewhere.

(this means a PR may need to rebase before it can be merged, if HEAD moved, but that seems fair to ask)