sindresorhus / emoj

Find relevant emoji from text on the command-line :open_mouth: :sparkles: :raised_hands: :horse: :boom: :see_no_evil:
MIT License
2.36k stars 57 forks source link

Upgrade to Ink 2 #34

Closed vadimdemedes closed 4 years ago

vadimdemedes commented 5 years ago

πŸ’₯

sindresorhus commented 5 years ago

Notice how the first character is bold:

screen shot 2018-10-01 at 15 43 45
sindresorhus commented 5 years ago

After opening emoj, I write something, and when the result with the emojis comes back, everything moves one line up as the output is now larger. The output should be constant.

sindresorhus commented 5 years ago

There should be space above and below the prompt. Here's how the existing emoj looks:

screen shot 2018-10-01 at 15 52 20
sindresorhus commented 5 years ago

The emoj arrow picker is not accurate. This is the last tick it stop at before going to position 1 again:

screen shot 2018-10-01 at 15 53 03
sindresorhus commented 5 years ago

Nothing shows up if I write i like pizza in the prompt. That works in emoj v1.

sindresorhus commented 5 years ago

Error with fetching the emojis are not shown until the user exits (Ctrl+C).

❯ emoj
β€Ί foo

HTTPError: Response code 503 (Service Unavailable)
    at stream.catch.then.data (/Users/sindresorhus/dev/oss/emoj/node_modules/got/index.js:182:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
HTTPError: Response code 503 (Service Unavailable)
    at stream.catch.then.data (/Users/sindresorhus/dev/oss/emoj/node_modules/got/index.js:182:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
sindresorhus commented 5 years ago

This is looking great. So awesome that we can now just use React!!

vadimdemedes commented 5 years ago

Thanks for detailed feedback, fixed everything I could reproduce!

vadimdemedes commented 5 years ago

Nothing shows up if I write i like pizza in the prompt. That works in emoj v1.

Tried reproducing that, but results come up all the time for me:

screen shot 2018-10-06 at 7 07 51 pm
vadimdemedes commented 5 years ago

Error with fetching the emojis are not shown until the user exits (Ctrl+C).

Couldn't reproduce this one either. I caused an error by setting an invalid domain name when doing a DNS lookup, but it was correctly handled and offline message was shown.

sindresorhus commented 5 years ago

The indicator is still off:

screen shot 2018-10-10 at 18 21 18
amio commented 5 years ago

How about using background for picker indicator? or use brackets? [πŸ˜‚] πŸ˜” πŸ’”

vadimdemedes commented 5 years ago

That's actually not a bad idea, @sindresorhus what do you think? That would help with different widths of emojis.

sindresorhus commented 5 years ago

Good idea. Let’s use background.

sindresorhus commented 5 years ago

@vadimdemedes Want to finish this now that Ink v2 is out?

vadimdemedes commented 5 years ago

Yep, will do, added to todo!

sindresorhus commented 4 years ago

I'm just pinging all old PRs.

sindresorhus commented 4 years ago

I implemented the background color selector (and upgraded to latest Ink), but there's something funky going on with how Ink handles background colors. You get this if you select the last item:

Screenshot 2020-02-23 at 02 19 44

Seems like it slices off the end reset ansi escape code or something.

For reference, the first one looks ok:

Screenshot 2020-02-23 at 02 20 18
vadimdemedes commented 4 years ago

Hm, couldn't reproduce it with latest emoj. Also tried replacing bgGray with bgCyan to make it look like in the screenshot, but didn't help me either. 🀷