cyyynthia / pronoundb.org

A browser extension that lets people know how to refer to each other on various places of the Internet. Available on Chrome, Firefox, and Edge.
https://pronoundb.org
BSD 3-Clause "New" or "Revised" License
270 stars 22 forks source link

Add support for Reddit #12

Open cyyynthia opened 3 years ago

cyyynthia commented 3 years ago

Relevant documentation:

cyyynthia commented 2 years ago

It is. Interaction with Reddit's API will be quite small, just a matter of configuring the internal oauth abstract layer and fetching the authenticated user's profile. Most of the work will be on the extension part, to add pronouns throughout the Reddit interface.

As usernames are an immutable account property on Reddit, they can safely be considered IDs for PronounDB's purposes. It'll be easier than trying to scrape the Reddit's actual ID.

Last note, if you start working on it I'd be preferable to support both the modern and old Reddit interfaces.

Enderchief commented 1 year ago

Hi there :wave: I've been using pronoundb for a while now and I would like to implement this. I do know my way around the reddit api pretty well and I think I could figure out the extension stuff.

My biggest question is development and testing. For now, I am just working on the api part of pronoundb and it think it's done but I have some issues.

  1. eslint, I cannot get it to run in packages/api I run pnpm run lint and get this
$ pnpm run lint

> @pronoundb/api@ lint redacted/pronoundb.org.git/issue/12/packages/api
> eslint --ext ts --ext tsx src

Oops! Something went wrong! :(

ESLint: 8.31.0

ESLint couldn't determine the plugin "@typescript-eslint" uniquely.

- redacted/pronoundb.org.git/issue/12/node_modules/.pnpm/@typescript-eslint+eslint-plugin@5.48.0_k73wpmdolxikpyqun3p36akaaq/node_modules/@typescript-eslint/eslint-plugin/dist/index.js (loaded in ".eslintrc.json » ../../.eslintrc.json")
- redacted/pronoundb.org.git/issue/12/node_modules/.pnpm/@typescript-eslint+eslint-plugin@5.48.0_m2kn7xiag5lymyarkgri27ztxm/node_modules/@typescript-eslint/eslint-plugin/dist/index.js (loaded in "../../.eslintrc.json")

Please remove the "plugins" setting from either config or remove either plugin installation.

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

 ELIFECYCLE  Command failed with exit code 2.
  1. typescript, running pnpm build also gives typescript errors. the good thing is at least it still builds
  2. when doing docker-compose up in the main root folder. I got it all built and running but how do I test it from there?

Sorry for the long message. :pensive:

cyyynthia commented 1 year ago

Hey there,

The eslint issues I'm not very sure why they happen, they've been a problem for a while that I've dealt with a sub-optimal method. Try adding "root": true to the files in the packages/. If it doesn't work, my "solution" was to nuke node_modules folders (all) and pnpm i again.

I can't really help you for the TypeScript issues if I don't know what these are. I know for a fact mistress branch should build, so it's probably a weird issue (I've had these happen a long time ago).

Once the containers are up, everything should be available on localhost:8080. Frontend is broken iirc because of some weird quirks in passing --host to Vite that no longer works (feel free to fix it) and the API should be on localhost:8080/api. If it yields Bad Gateway, restart the nginx contianer. I suck at configuring compose and dependencies aren't properly set ugh.


2 extra notes: